public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] tst_net.sh: Filter out tst_ns_exec TINFO messages
@ 2025-01-16 13:09 Petr Vorel
  2025-01-17  7:03 ` Li Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2025-01-16 13:09 UTC (permalink / raw)
  To: ltp

This is a workaround to filter out tst_ns_exec.c TINFO messages printed
on stderr by tst_has_slow_kconfig(). tst_ns_exec.c is used by default by
$LTP_NETNS in tst_rhost_run().

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

Fixes: 893ca0abe7 ("lib: multiply the timeout if detect slow kconfigs")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi,

alternative to Li's TST_NO_SLOW_KCONFIG_CHECK suggestion:
https://lore.kernel.org/ltp/CAEemH2d6RJ8yd4TcLt-z49fmNKt7eAGg=VhdASkNtE=7cR7bgg@mail.gmail.com/

Maybe even both could be applied.
WDYT?

Kind regards,
Petr

 testcases/lib/tst_net.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index ee0ae1cad7..4e8786b704 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -265,6 +265,8 @@ tst_rhost_run()
 		[ "$safe" ] && \
 			tst_brk_ TBROK "'$cmd' failed on '$RHOST': '$output'"
 	fi
+	# strip out tst_ns_exec TINFO messages
+	output=$(echo "$output" | grep -v 'TINFO:')
 
 	[ -z "$out" -a -n "$output" ] && echo "$output"
 
-- 
2.47.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH 1/1] tst_net.sh: Filter out tst_ns_exec TINFO messages
  2025-01-16 13:09 [LTP] [PATCH 1/1] tst_net.sh: Filter out tst_ns_exec TINFO messages Petr Vorel
@ 2025-01-17  7:03 ` Li Wang
  2025-01-17  7:08   ` Petr Vorel
  0 siblings, 1 reply; 3+ messages in thread
From: Li Wang @ 2025-01-17  7:03 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

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

> This is a workaround to filter out tst_ns_exec.c TINFO messages printed
> on stderr by tst_has_slow_kconfig(). tst_ns_exec.c is used by default by
> $LTP_NETNS in tst_rhost_run().
>
> 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
>
> Fixes: 893ca0abe7 ("lib: multiply the timeout if detect slow kconfigs")
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
>

Reviewed-by: Li Wang <liwang@redhat.com>

---
> Hi,
>
> alternative to Li's TST_NO_SLOW_KCONFIG_CHECK suggestion:
>
> https://lore.kernel.org/ltp/CAEemH2d6RJ8yd4TcLt-z49fmNKt7eAGg=VhdASkNtE=7cR7bgg@mail.gmail.com/
>
> Maybe even both could be applied.
> WDYT?
>

Agreed, this could avoid some other new TINFO in the future.
Also, I will post the TST_NO_SLOW_KCONIFG_CHECK patch soon.



>
> Kind regards,
> Petr
>
>  testcases/lib/tst_net.sh | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
> index ee0ae1cad7..4e8786b704 100644
> --- a/testcases/lib/tst_net.sh
> +++ b/testcases/lib/tst_net.sh
> @@ -265,6 +265,8 @@ tst_rhost_run()
>                 [ "$safe" ] && \
>                         tst_brk_ TBROK "'$cmd' failed on '$RHOST':
> '$output'"
>         fi
> +       # strip out tst_ns_exec TINFO messages
> +       output=$(echo "$output" | grep -v 'TINFO:')
>
>         [ -z "$out" -a -n "$output" ] && echo "$output"
>
> --
> 2.47.1
>
>

-- 
Regards,
Li Wang

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH 1/1] tst_net.sh: Filter out tst_ns_exec TINFO messages
  2025-01-17  7:03 ` Li Wang
@ 2025-01-17  7:08   ` Petr Vorel
  0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2025-01-17  7:08 UTC (permalink / raw)
  To: Li Wang; +Cc: ltp

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

> > This is a workaround to filter out tst_ns_exec.c TINFO messages printed
> > on stderr by tst_has_slow_kconfig(). tst_ns_exec.c is used by default by
> > $LTP_NETNS in tst_rhost_run().

> > 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

> > Fixes: 893ca0abe7 ("lib: multiply the timeout if detect slow kconfigs")
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>


> Reviewed-by: Li Wang <liwang@redhat.com>

> ---
> > Hi,

> > alternative to Li's TST_NO_SLOW_KCONFIG_CHECK suggestion:

> > https://lore.kernel.org/ltp/CAEemH2d6RJ8yd4TcLt-z49fmNKt7eAGg=VhdASkNtE=7cR7bgg@mail.gmail.com/

> > Maybe even both could be applied.
> > WDYT?


> Agreed, this could avoid some other new TINFO in the future.
> Also, I will post the TST_NO_SLOW_KCONIFG_CHECK patch soon.

Thinking about it twice, filtering TINFO would mean to filter netstress.c
messages for rhost. We will have to rely on TST_NO_SLOW_KCONIFG_CHECK.

Kind regards,
Petr


> > Kind regards,
> > Petr

> >  testcases/lib/tst_net.sh | 2 ++
> >  1 file changed, 2 insertions(+)

> > diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
> > index ee0ae1cad7..4e8786b704 100644
> > --- a/testcases/lib/tst_net.sh
> > +++ b/testcases/lib/tst_net.sh
> > @@ -265,6 +265,8 @@ tst_rhost_run()
> >                 [ "$safe" ] && \
> >                         tst_brk_ TBROK "'$cmd' failed on '$RHOST':
> > '$output'"
> >         fi
> > +       # strip out tst_ns_exec TINFO messages
> > +       output=$(echo "$output" | grep -v 'TINFO:')

> >         [ -z "$out" -a -n "$output" ] && echo "$output"

> > --
> > 2.47.1

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-17  7:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-16 13:09 [LTP] [PATCH 1/1] tst_net.sh: Filter out tst_ns_exec TINFO messages Petr Vorel
2025-01-17  7:03 ` Li Wang
2025-01-17  7:08   ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox