-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PATCH v5] validation: random: limit duration of some tests #2110
[PATCH v5] validation: random: limit duration of some tests #2110
Conversation
b18a3df
to
0a68fcf
Compare
test/validation/api/random/random.c
Outdated
@@ -252,6 +254,9 @@ static void random_test_frequency(odp_random_kind_t kind) | |||
bits, chisq, cells - 1, crit, res_str(chisq < crit)); | |||
|
|||
CU_ASSERT(chisq < crit); | |||
|
|||
if (odp_time_local_ns() - start > 5 * ODP_TIME_SEC_IN_NS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need 5 secs here and in the other place? Wouldn't just 1 sec be enough? That is about the point where lowering the time out does not speed up the test much more due to the constant overhead of running the test (or else I would suggest less than 1 sec timeout).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some environments, with a one second limit, we break after executing the loop just once, and that's with bits=1, which is a kind of a special case. But I don't think that matters much. In the other place one second is probably fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One could check if (bits > 1 && odp_time_local_ns() - start > ODP_TIME_SEC_IN_NS)
, but I'm fine with this version. The check can be optimized later if deemed necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Time limit is one second in v3, because there's not enough reasons for a longer limit.
0a68fcf
to
db3c024
Compare
v3:
|
db3c024
to
5625374
Compare
v4:
|
Two of the randomness tests are too slow with ARM RNG true random. Limit the time that those tests are allowed to run. This saves about one minute in some environments. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
Rename the -t,--threads option to -c,--num_cpu, to conform to the convention used by most of the other test programs. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
To reduce output clutter, remove an unnecessary odp_shm_print_all() call. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
Add option -t,--time, which can be used to set a target test duration per random data type. The default is 500 msec, so the default test duration is half a second times the number of available random data types. This saves about half a minute in some environments. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
5625374
to
81d052a
Compare
v5:
|
No description provided.