Commit 02d5e99
testcases/lib: Fix tst_ns_* helpers
Replaces SAFE_CLONE() with tst_clone() in the tst_ns_* helpers.
The reason for the replacement is that SAFE_CLONE() uses
TST_RETRY_FUNC() which calls tst_multiply_timeout(). The problem with
that is that the tst_multiply_timeout() is a test library function that
started to print TINFO messages recently and that we rely on parsing the
output from the tst_ns_* helpers.
The reason SAFE_CLONE() started to call TST_RETRY_FUNC() is that in the
case that we create new namespaces with the clone call, we may end up
creating them faster than kernel can clean them up which is described in:
commit 7d88208
Author: Petr Vorel <[email protected]>
Date: Mon Mar 28 22:46:43 2022 +0200
lib: Retry safe_clone() on ENOSPC
This combined with the newly introduced changes in the test library that
check for kernel debugging options that may need to adjust default
timeouts:
commit 893ca0a
Author: Li Wang <[email protected]>
Date: Sun Dec 22 15:22:49 2024 +0800
lib: multiply the timeout if detect slow kconfigs
which adds tst_has_slow_kconfig() into the tst_multiply_timeout() causes
the TINFO messages to be printed.
The reason why we can safely replace the SAFE_CLONE() with tst_clone()
here is that we are not creating new namspaces in the tst_ns_* helpers,
but rather than that cloning a new process to be executed inside of the
namespace, hence we do not need to retry on ENOSPC.
Link: https://lore.kernel.org/ltp/[email protected]/
Reviewed-by: Li Wang <[email protected]>
Reviewed-by: Petr Vorel <[email protected]>
Tested-by: Petr Vorel <[email protected]>
Signed-off-by: Cyril Hrubis <[email protected]>1 parent 5bd7355 commit 02d5e99
2 files changed
+12
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 26 | | |
33 | 27 | | |
34 | 28 | | |
| |||
66 | 60 | | |
67 | 61 | | |
68 | 62 | | |
69 | | - | |
70 | | - | |
71 | 63 | | |
72 | 64 | | |
73 | 65 | | |
| |||
80 | 72 | | |
81 | 73 | | |
82 | 74 | | |
83 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
84 | 81 | | |
85 | 82 | | |
86 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 23 | | |
30 | 24 | | |
31 | 25 | | |
| |||
71 | 65 | | |
72 | 66 | | |
73 | 67 | | |
74 | | - | |
75 | | - | |
76 | 68 | | |
77 | 69 | | |
78 | 70 | | |
| |||
100 | 92 | | |
101 | 93 | | |
102 | 94 | | |
103 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
104 | 101 | | |
105 | 102 | | |
106 | 103 | | |
| |||
0 commit comments