public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] tst_net.sh: Filter out tst_ns_exec TINFO messages
Date: Fri, 17 Jan 2025 08:08:39 +0100	[thread overview]
Message-ID: <20250117070839.GA729073@pevik> (raw)
In-Reply-To: <CAEemH2duAZvjNn_7WdV-P4QbhDNEDez4OcPkLv3xsqFuzxe_-w@mail.gmail.com>

> 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

      reply	other threads:[~2025-01-17  7:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250117070839.GA729073@pevik \
    --to=pvorel@suse.cz \
    --cc=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox