[LTP] [REGRESSION] Broken tests using tst_net.sh by 893ca0abe7 (was: [PATCH 1/2] lib: multiply the timeout if detect slow kconfigs)

Li Wang liwang@redhat.com
Thu Jan 16 13:10:42 CET 2025


On Thu, Jan 16, 2025 at 4:38 PM Petr Vorel <pvorel@suse.cz> wrote:

> ...
> > > init_ltp_netspace()
> > > {
> > >         ...
> > >                 pid="$(ROD tst_ns_create net,mnt)"
> > >         ...
> > >         export LTP_NETNS="${LTP_NETNS:-tst_ns_exec $pid net,mnt}"
>
> > > I will probably solve it by adding yet another parameter to
> > > tst_rhost_run(),
> > > which ignores stderr and use it for tst_ns_{create,exec}. But maybe
> there
> > > is
> > > another solution (or another problem).
>
>
> > Or, another way is just to set 'tst_test->timeout ==
> TST_UNLIMITED_TIMEOUT'
> > in those testcase/lib tools.
>
> Or, we could have yet another flag TST_SKIP_SLOW_DETECTION which could be
> used
> for these tools.
>

Sounds better. But maybe name it TST_NO_SLOW_CONFIG_CHECK ?

diff --git a/lib/tst_test.c b/lib/tst_test.c
index b204ad975..1e9504f29 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -1702,8 +1702,10 @@ unsigned int tst_multiply_timeout(unsigned int
timeout)
        if (timeout < 1)
                tst_brk(TBROK, "timeout must to be >= 1! (%d)", timeout);

+#ifndef TST_NO_SLOW_CONFIG_CHECK
        if (tst_has_slow_kconfig())
                timeout *= 4;
+#endif

        return timeout * timeout_mul;
 }
diff --git a/testcases/lib/tst_ns_exec.c b/testcases/lib/tst_ns_exec.c
index 6a8e39339..a1b780ab7 100644
--- a/testcases/lib/tst_ns_exec.c
+++ b/testcases/lib/tst_ns_exec.c
@@ -14,6 +14,7 @@
  */

 #define TST_NO_DEFAULT_MAIN
+#define TST_NO_SLOW_CONFIG_CHECK

 #include <stdio.h>
 #include <sys/wait.h>


-- 
Regards,
Li Wang


More information about the ltp mailing list