[LTP] [PATCH v2 1/1] lib: Multiply slow config only for a real tests

Petr Vorel pvorel@suse.cz
Fri Jan 17 11:18:04 CET 2025


> > Hi!
> > > This fixes errors on shell tests on netns backend (the default):

> > >     # PATH="/opt/ltp/testcases/bin:$PATH" ping01.sh
> > >     ...
> > >     ping01 1 TINFO: initialize 'rhost' 'ltp_ns_veth1' interface
> > >     /opt/ltp/testcases/bin/ping01.sh: 142: [: tst_kconfig.c:88:: unexpected operator
> > >     tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
> > >     tst_kconfig.c:667: TINFO: CONFIG_LATENCYTOP kernel option detected which might slow the execution
> > >     tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
> > >     tst_kconfig.c:667: TINFO: CONFIG_LATENCYTOP kernel option detected which might slow the execution
> > >     tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
> > >     tst_kconfig.c:667: TINFO: CONFIG_LATENCYTOP kernel option detected which might slow the execution
> > >     tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
> > >     tst_kconfig.c:667: TINFO: CONFIG_LATENCYTOP kernel option detected which might slow the execution
> > >     tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
> > >     tst_kconfig.c:667: TINFO: CONFIG_LATENCYTOP kernel option detected which might slow the execution
> > >     tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
> > >     tst_kconfig.c:667: TINFO: CONFIG_LATENCYTOP kernel option detected which might slow the execution
> > >     tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
> > >     tst_kconfig.c:667: TINFO: CONFIG_LATENCYTOP kernel option detected which might slow the execution
> > >     tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
> > >     tst_kconfig.c:667: TINFO: CONFIG_LATENCYTOP kernel option detected which might slow the execution
> > >     /opt/ltp/testcases/bin/ping01.sh: 142: [: tst_kconfig.c:88:: unexpected operator
> > >     ping01 1 TINFO: add remote addr 10.0.0.1/24
> > >     tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
> > >     tst_kconfig.c:667: TINFO: CONFIG_LATENCYTOP kernel option detected which might slow the execution
> > >     /opt/ltp/testcases/bin/ping01.sh: 142: [: tst_kconfig.c:88:: unexpected operator
> > >     ping01 1 TINFO: add remote addr fd00:1:1:1::1/64
> > >     tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
> > >     tst_kconfig.c:667: TINFO: CONFIG_LATENCYTOP kernel option detected which might slow the execution
> > >     /opt/ltp/testcases/bin/ping01.sh: 1: eval: tst_kconfig.c:88:: not found
> > >     /opt/ltp/testcases/bin/ping01.sh: 1: eval: 34mTINFO:: not found
> > >     /opt/ltp/testcases/bin/ping01.sh: 1: eval: 34mTINFO:: not found
> > >     /opt/ltp/testcases/bin/ping01.sh: 142: [: tst_kconfig.c:88:: unexpected operator
> > >     /opt/ltp/testcases/bin/ping01.sh: 1: eval: tst_kconfig.c:88:: not found
> > >     /opt/ltp/testcases/bin/ping01.sh: 1: eval: 34mTINFO:: not found
> > >     /opt/ltp/testcases/bin/ping01.sh: 1: eval: 34mTINFO:: not found
> > >     ping01 1 TINFO: Network config (local -- remote):
> > >     ping01 1 TINFO: ltp_ns_veth2 -- ltp_ns_veth1
> > >     ping01 1 TINFO: 10.0.0.2/24 -- 10.0.0.1/24

> > This looks like there is something fundamentally wrong there. If there
> > is a TST_NO_DEFAULT_MAIN defined in the test, the test does not call
> > tst_run_tcases() and the timeout shouln't be set up.

> FYI tst_test.c:510 safe_clone(): call tst_multiply_timeout()

via:
tst_max_delay_ = tst_multiply_timeout(MAX_DELAY * 1000000);

I wonder if this should be wrapped with
#ifndef TST_NO_DEFAULT_MAIN

Kind regards,
Petr

> Kind regards,
> Petr


More information about the ltp mailing list