Skip to contentSkip to conversation

clock_gettime04: print more info to help debugging

PATCH Superseded Li Wang 3 participants 10 messages Mar 9, 2021 – Mar 10, 2021

lore
Share & tools
lore

Li Wang

author
#0 lore raw

PATCH v2 1/1 clock_gettime04: print more info to help debugging

We catch some sporadically failures[1] like below, but we don't know which test loop it comes from. So adding more prints to help locate issue.

tst_test.c:1286: TINFO: Timeout per run is 0h 05m 00s
vdso_helpers.c:76: TINFO: Couldn't find vdso_gettime64()
clock_gettime04.c:157: TPASS: CLOCK_REALTIME: Difference between successive readings is reasonable clock_gettime04.c:150: TFAIL: CLOCK_REALTIME_COARSE: Difference between successive readings greater than 5 ms (1): 8 clock_gettime04.c:157: TPASS: CLOCK_MONOTONIC: Difference between successive readings is reasonable clock_gettime04.c:150: TFAIL: CLOCK_MONOTONIC_COARSE: Difference between successive readings greater than 5 ms (0): 5 clock_gettime04.c:157: TPASS: CLOCK_MONOTONIC_RAW: Difference between successive readings is reasonable clock_gettime04.c:157: TPASS: CLOCK_BOOTTIME: Difference between successive readings is reasonable

After patching, it will show more details about the iteration:

tst_test.c:1288: TINFO: Timeout per run is 0h 05m 00s
vdso_helpers.c:76: TINFO: Couldn't find vdso_gettime64()
clock_gettime04.c:158: TPASS: CLOCK_REALTIME: Difference between successive readings is reasonable for following variants:

  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:162: TINFO:   - gettimeofday
  clock_gettime04.c:158: TPASS: CLOCK_REALTIME_COARSE: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:158: TPASS: CLOCK_MONOTONIC: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:158: TPASS: CLOCK_MONOTONIC_COARSE: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:158: TPASS: CLOCK_MONOTONIC_RAW: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:158: TPASS: CLOCK_BOOTTIME: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec

[1] it occurs on a x86_64 (not virtualized) with kernel 5.11.0.

---
 .../kernel/syscalls/clock_gettime/clock_gettime04.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
testcases/kernel/syscalls/clock_gettime/clock_gettime04.c +9 -4
index 5f8264cc6..4a395f394 100644
@@ -147,15 +147,20 @@ static void run(unsigned int i)
 			diff /= 1000000;
 
 			if (diff >= delta) {
-				tst_res(TFAIL, "%s: Difference between successive readings greater than %lld ms (%d): %lld",
-					tst_clock_name(clks[i]), delta, j, diff);
+				tst_res(TFAIL, "%s(%s): Difference between successive readings greater than %lld ms (%d): %lld",
+					tst_clock_name(clks[i]), tv->desc, delta, j, diff);
 				return;
 			}
 		}
 	} while (--count);
 
-	tst_res(TPASS, "%s: Difference between successive readings is reasonable",
-		tst_clock_name(clks[i]));
+	tst_res(TPASS, "%s: Difference between successive readings is reasonable for following variants:",
+			tst_clock_name(clks[i]));
+	for (j = 0; j < ARRAY_SIZE(variants); j++) {
+		if (variants[j].clock_gettime == my_gettimeofday && clks[i] != CLOCK_REALTIME)
+			continue;
+		tst_res(TINFO, "\t- %s", variants[j].desc);
+	}
 }
 
 static struct tst_test test = {
Signature · 1 line
2.21.3
#1 lore raw

PATCH v2 1/1 clock_gettime04: print more info to help debugging

Quoted 42 lines · Li Wang

We catch some sporadically failures[1] like below, but we don't know which test loop it comes from. So adding more prints to help locate issue.

tst_test.c:1286: TINFO: Timeout per run is 0h 05m 00s
vdso_helpers.c:76: TINFO: Couldn't find vdso_gettime64()
clock_gettime04.c:157: TPASS: CLOCK_REALTIME: Difference between successive readings is reasonable clock_gettime04.c:150: TFAIL: CLOCK_REALTIME_COARSE: Difference between successive readings greater than 5 ms (1): 8 clock_gettime04.c:157: TPASS: CLOCK_MONOTONIC: Difference between successive readings is reasonable clock_gettime04.c:150: TFAIL: CLOCK_MONOTONIC_COARSE: Difference between successive readings greater than 5 ms (0): 5 clock_gettime04.c:157: TPASS: CLOCK_MONOTONIC_RAW: Difference between successive readings is reasonable clock_gettime04.c:157: TPASS: CLOCK_BOOTTIME: Difference between successive readings is reasonable

After patching, it will show more details about the iteration:

tst_test.c:1288: TINFO: Timeout per run is 0h 05m 00s
vdso_helpers.c:76: TINFO: Couldn't find vdso_gettime64()
clock_gettime04.c:158: TPASS: CLOCK_REALTIME: Difference between successive readings is reasonable for following variants:

  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:162: TINFO:   - gettimeofday
  clock_gettime04.c:158: TPASS: CLOCK_REALTIME_COARSE: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:158: TPASS: CLOCK_MONOTONIC: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:158: TPASS: CLOCK_MONOTONIC_COARSE: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:158: TPASS: CLOCK_MONOTONIC_RAW: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:158: TPASS: CLOCK_BOOTTIME: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
Quoted 6 lines

[1] it occurs on a x86_64 (not virtualized) with kernel 5.11.0.

---
 .../kernel/syscalls/clock_gettime/clock_gettime04.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
Signature · 1 line
viresh
#2 lore raw

PATCH v2 1/1 clock_gettime04: print more info to help debugging

Hi Li, Viresh,

Quoted 34 lines · Li Wang
Quoted 33 lines

We catch some sporadically failures[1] like below, but we don't know which test loop it comes from. So adding more prints to help locate issue.

tst_test.c:1286: TINFO: Timeout per run is 0h 05m 00s
vdso_helpers.c:76: TINFO: Couldn't find vdso_gettime64()
clock_gettime04.c:157: TPASS: CLOCK_REALTIME: Difference between successive readings is reasonable clock_gettime04.c:150: TFAIL: CLOCK_REALTIME_COARSE: Difference between successive readings greater than 5 ms (1): 8 clock_gettime04.c:157: TPASS: CLOCK_MONOTONIC: Difference between successive readings is reasonable clock_gettime04.c:150: TFAIL: CLOCK_MONOTONIC_COARSE: Difference between successive readings greater than 5 ms (0): 5 clock_gettime04.c:157: TPASS: CLOCK_MONOTONIC_RAW: Difference between successive readings is reasonable clock_gettime04.c:157: TPASS: CLOCK_BOOTTIME: Difference between successive readings is reasonable

After patching, it will show more details about the iteration:

tst_test.c:1288: TINFO: Timeout per run is 0h 05m 00s
vdso_helpers.c:76: TINFO: Couldn't find vdso_gettime64()
clock_gettime04.c:158: TPASS: CLOCK_REALTIME: Difference between successive readings is reasonable for following variants:

  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:162: TINFO:   - gettimeofday
  clock_gettime04.c:158: TPASS: CLOCK_REALTIME_COARSE: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:158: TPASS: CLOCK_MONOTONIC: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:158: TPASS: CLOCK_MONOTONIC_COARSE: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
Quoted 8 lines
Quoted 8 lines

clock_gettime04.c:158: TPASS: CLOCK_MONOTONIC_RAW: Difference between successive readings is reasonable for following variants:

  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:158: TPASS: CLOCK_BOOTTIME: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec

Sorry for putting my opinion late. Instead of repeating variants (duplicity) I'd prefer just print variants once at the beginning + print which variant failed.

BTW Some time ago I planned to print test variants in the library, so it does not have to be copy pasted in every test which uses variants. Variants could deserve some code optimisation anyway.

Kind regards,
Petr

#3 lore raw

PATCH v2 1/1 clock_gettime04: print more info to help debugging

Quoted 45 lines · Petr Vorel

Hi Li, Viresh,

Quoted 34 lines · Li Wang
Quoted 33 lines

We catch some sporadically failures[1] like below, but we don't know which test loop it comes from. So adding more prints to help locate issue.

tst_test.c:1286: TINFO: Timeout per run is 0h 05m 00s
vdso_helpers.c:76: TINFO: Couldn't find vdso_gettime64()
clock_gettime04.c:157: TPASS: CLOCK_REALTIME: Difference between successive readings is reasonable clock_gettime04.c:150: TFAIL: CLOCK_REALTIME_COARSE: Difference between successive readings greater than 5 ms (1): 8 clock_gettime04.c:157: TPASS: CLOCK_MONOTONIC: Difference between successive readings is reasonable clock_gettime04.c:150: TFAIL: CLOCK_MONOTONIC_COARSE: Difference between successive readings greater than 5 ms (0): 5 clock_gettime04.c:157: TPASS: CLOCK_MONOTONIC_RAW: Difference between successive readings is reasonable clock_gettime04.c:157: TPASS: CLOCK_BOOTTIME: Difference between successive readings is reasonable

After patching, it will show more details about the iteration:

tst_test.c:1288: TINFO: Timeout per run is 0h 05m 00s
vdso_helpers.c:76: TINFO: Couldn't find vdso_gettime64()
clock_gettime04.c:158: TPASS: CLOCK_REALTIME: Difference between successive readings is reasonable for following variants:

  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:162: TINFO:   - gettimeofday
  clock_gettime04.c:158: TPASS: CLOCK_REALTIME_COARSE: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:158: TPASS: CLOCK_MONOTONIC: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:158: TPASS: CLOCK_MONOTONIC_COARSE: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
Quoted 8 lines
Quoted 8 lines

clock_gettime04.c:158: TPASS: CLOCK_MONOTONIC_RAW: Difference between successive readings is reasonable for following variants:

  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
  clock_gettime04.c:158: TPASS: CLOCK_BOOTTIME: Difference between successive readings is reasonable for following variants:
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec
Quoted 3 lines

Sorry for putting my opinion late. Instead of repeating variants (duplicity) I'd prefer just print variants once at the beginning + print which variant failed.

I too thought about that, but then realized that the variant list isn't same for all the clocks, like gettimeofday only there for CLOCK_REALTIME and so let it go.

Signature · 1 line
viresh
author
#4 lore raw

PATCH v2 1/1 clock_gettime04: print more info to help debugging

Quoted 8 lines · Viresh Kumar

...

Quoted 1 line
Quoted 1 line
Quoted 1 line

clock_gettime04.c:158: TPASS: CLOCK_BOOTTIME: Difference between

successive readings is reasonable for following variants:

Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
  clock_gettime04.c:162: TINFO:   - vDSO or syscall with libc spec
  clock_gettime04.c:162: TINFO:   - syscall with old kernel spec
  clock_gettime04.c:162: TINFO:   - vDSO with old kernel spec

Sorry for putting my opinion late. Instead of repeating variants

Quoted 9 lines

(duplicity)

Quoted 1 line

I'd prefer just print variants once at the beginning + print which

variant

Quoted 1 line

failed.

I too thought about that, but then realized that the variant list isn't same for all the clocks, like gettimeofday only there for CLOCK_REALTIME and so let it go.

But we can put the printing behind the 'gettimeofday+CLOCK_REALTIME' checking.
Just similar to what I did in patch V1, is that your mean, Petr?

testcases/kernel/syscalls/clock_gettime/clock_gettime04.c +0 -0
@@ -108,6 +108,9 @@ static void run(unsigned int i)
                        if (tv->clock_gettime == my_gettimeofday && clks[i]

!= CLOCK_REALTIME)

                                continue;

+ if (count == 10000)
+ tst_res(TINFO, "\t- %s", tv->desc);
+

                        ret = tv->clock_gettime(clks[i], tst_ts_get(&ts));
                        if (ret) {
                                /*

@@ -139,8 +142,8 @@ static void run(unsigned int i)

                        diff = end + slack - start;
                        if (diff < 0) {

- tst_res(TFAIL, "%s: Time travelled
backwards (%d): %lld ns",
- tst_clock_name(clks[i]), j, diff);
+ tst_res(TFAIL, "%s(%s): Time travelled
backwards (%d): %lld ns",
+ tst_clock_name(clks[i]), tv->desc,

j, diff);
                                return;
                        }
Signature · 5 lines
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210310/52a86054/attachment.htm>
#5 lore raw

PATCH v2 1/1 clock_gettime04: print more info to help debugging

Quoted 28 lines · Li Wang

But we can put the printing behind the 'gettimeofday+CLOCK_REALTIME' checking.
Just similar to what I did in patch V1, is that your mean, Petr?

testcases/kernel/syscalls/clock_gettime/clock_gettime04.c +3 -0
@@ -108,6 +108,9 @@ static void run(unsigned int i)
                        if (tv->clock_gettime == my_gettimeofday && clks[i]
 != CLOCK_REALTIME)
                                continue;
 
+                       if (count == 10000)
+                                tst_res(TINFO, "\t- %s", tv->desc);
+
                        ret = tv->clock_gettime(clks[i], tst_ts_get(&ts));
                        if (ret) {
                                /*
testcases/kernel/syscalls/clock_gettime/clock_gettime04.c +2 -2
@@ -139,8 +142,8 @@ static void run(unsigned int i)
 
                        diff = end + slack - start;
                        if (diff < 0) {
-                               tst_res(TFAIL, "%s: Time travelled
 backwards (%d): %lld ns",
-                                       tst_clock_name(clks[i]), j, diff);
+                               tst_res(TFAIL, "%s(%s): Time travelled
 backwards (%d): %lld ns",
+                                       tst_clock_name(clks[i]), tv->desc,
 j, diff);
Quoted 2 lines
                                return;
                        }

I think it would be worth keeping it simple then and just print all variants only once from setup(). Leave the special case of REALTIME clock.

Signature · 1 line
viresh
#6 lore raw

PATCH v2 1/1 clock_gettime04: print more info to help debugging

Hi Li, Viresh, Cyril,

Quoted 32 lines · Li Wang
Quoted 28 lines

But we can put the printing behind the 'gettimeofday+CLOCK_REALTIME' checking.
Just similar to what I did in patch V1, is that your mean, Petr?

testcases/kernel/syscalls/clock_gettime/clock_gettime04.c +3 -0
@@ -108,6 +108,9 @@ static void run(unsigned int i)
                        if (tv->clock_gettime == my_gettimeofday && clks[i]
 != CLOCK_REALTIME)
                                continue;
 
+                       if (count == 10000)
+                                tst_res(TINFO, "\t- %s", tv->desc);
+
                        ret = tv->clock_gettime(clks[i], tst_ts_get(&ts));
                        if (ret) {
                                /*
testcases/kernel/syscalls/clock_gettime/clock_gettime04.c +2 -2
@@ -139,8 +142,8 @@ static void run(unsigned int i)
 
                        diff = end + slack - start;
                        if (diff < 0) {
-                               tst_res(TFAIL, "%s: Time travelled
 backwards (%d): %lld ns",
-                                       tst_clock_name(clks[i]), j, diff);
+                               tst_res(TFAIL, "%s(%s): Time travelled
 backwards (%d): %lld ns",
+                                       tst_clock_name(clks[i]), tv->desc,
 j, diff);
Quoted 2 lines
                                return;
                        }
Quoted 3 lines

I think it would be worth keeping it simple then and just print all variants only once from setup(). Leave the special case of REALTIME clock.

+1.

From a long term, I'd like some easy solution when printing would be handled in the library. Some time ago I posted a patch which turned .test_variants from int into array of string description [1]. Cyril didn't see much value at it and didn't like that it introduced more ifdefs (together with Viresh).
But now we have docparse, could we reconsider this approach? Maybe we could keep .test_variants and introduce .test_variants_desc for tests which are simple enough. Or, maybe there is a cleaner solution for clock_adjtime0* tests which I don't see.

Kind regards,
Petr

[1] https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/

author
#7 lore raw

PATCH v2 1/1 clock_gettime04: print more info to help debugging

Hi Petr,

Petr Vorel <[email protected]> wrote:

...

Quoted 4 lines
Quoted 4 lines

I think it would be worth keeping it simple then and just print all variants only once from setup(). Leave the special case of REALTIME clock.

Quoted 8 lines

+1.

From a long term, I'd like some easy solution when printing would be handled in
the library. Some time ago I posted a patch which turned .test_variants from int
into array of string description [1]. Cyril didn't see much value at it and

I look back at patch[1], IMHO, splitting the test variant struct is not a good idea.
I'd rather go print variants[i].desc in the library directly but not split it to make
struct here and there :).

Quoted 9 lines

didn't like that it introduced more ifdefs (together with Viresh). But now we have docparse, could we reconsider this approach? Maybe we could keep
.test_variants and introduce .test_variants_desc for tests which are simple enough.
Or, maybe there is a cleaner solution for clock_adjtime0* tests which I don't
see.

Maybe there is. We can have more time to thinking/discussing this.

So, would you mind if I merge this V2 patch first?

(Since we're encountering a sporadical(we can't reproduce it manually) failure. Hope this can print more useful info to locate the issue.)

Quoted 8 lines

Kind regards,
Petr

[1]
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/

Signature · 5 lines
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210310/57019987/attachment.htm>
#8 lore raw

PATCH v2 1/1 clock_gettime04: print more info to help debugging

Hi Li,

Quoted 11 lines
Quoted 5 lines

From a long term, I'd like some easy solution when printing would be handled in
the library. Some time ago I posted a patch which turned .test_variants from int
into array of string description [1]. Cyril didn't see much value at it and

I look back at patch[1], IMHO, splitting the test variant struct is not a good idea.
I'd rather go print variants[i].desc in the library directly but not split it to make
struct here and there :).

Thanks a lot for having a look. Make sense, I'll try to send v2 soon.

Quoted 10 lines
Quoted 8 lines

didn't like that it introduced more ifdefs (together with Viresh). But now we have docparse, could we reconsider this approach? Maybe we could keep
.test_variants and introduce .test_variants_desc for tests which are simple enough.
Or, maybe there is a cleaner solution for clock_adjtime0* tests which I don't
see.

Quoted 6 lines

Maybe there is. We can have more time to thinking/discussing this.

So, would you mind if I merge this V2 patch first?

(Since we're encountering a sporadical(we can't reproduce it manually) failure. Hope this can print more useful info to locate the issue.)

Although I'd slightly prefer if it printed everything once in the setup, it's not important and we've already spent quite a lot of time with it, so sure, go ahead :)

Kind regards,
Petr

author
#9 lore raw

PATCH v2 1/1 clock_gettime04: print more info to help debugging

Petr Vorel <[email protected]> wrote:

...

Quoted 6 lines
Quoted 5 lines

So, would you mind if I merge this V2 patch first?

(Since we're encountering a sporadical(we can't reproduce it manually) failure. Hope this can print more useful info to locate the issue.)

Quoted 7 lines

Although I'd slightly prefer if it printed everything once in the setup, it's
not important and we've already spent quite a lot of time with it, so sure, go ahead :)

Thank you so much, Petr! Merged.

Signature · 5 lines
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210310/55890a8b/attachment.htm>