clock_gettime03: Extend tolerance on slow kernel configs
PATCH 1/1 clock_gettime03: Extend tolerance on slow kernel configs
Debugging/instrumentation kernel configs (like KASAN, LOCKDEP, etc.) can significantly degrade performance, causing the time namespace offset checks to exceed the default 10ms tolerance.
Use tst_has_slow_kconfig() to detect these slow configurations and multiply the delta tolerance by 10, preventing false test failures on slow/debug kernels.
--- testcases/kernel/syscalls/clock_gettime/clock_gettime03.c | 6 ++++++ 1 file changed, 6 insertions(+)
testcases/kernel/syscalls/clock_gettime/clock_gettime03.c +6 -0
@@ -16,6 +16,7 @@#include "time64_variants.h" #include "tst_safe_clocks.h" #include "tst_timer.h" +#include "tst_kconfig.h" #include "lapi/sched.h" static struct tcase {
@@ -117,6 +118,11 @@ static void setup(void) delta *=10 ; } +if (tst_has_slow_kconfig ()) { +tst_res (TINFO ,"Slow kernel config detected, multiply the delta by 10." ); + delta *=10 ; + } + now.type = then.type = parent_then.type = tv->ts_type;tst_res (TINFO ,"Testing variant: %s" , variants[tst_variant].desc); parent_ns =SAFE_OPEN ("/proc/self/ns/time_for_children" ,O_RDONLY );
Signature · 5 lines
2.55.0.508.g3f0d502094-goog -- Mailing list info: https://lists.linux.it/listinfo/ltp
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Wake,
Quoted 1 line · Wake Liu
clock_gettime03: Extend tolerance on slow kernel configs
Verdict - Reviewed
---
Note:
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Andrea Cervesato via ltp
AppliedMerged, Thanks!
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp