From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] testcases/lib: tst_net.sh: Do not use stderr in tst_rhost_run()
Date: Fri, 17 Jan 2025 14:45:01 +0100 [thread overview]
Message-ID: <Z4pe3estBHBQ0RTm@yuki.lan> (raw)
In-Reply-To: <20250117132753.GA766927@pevik>
Hi!
> I'm not sure about this. Maybe it's safe, because stderr gets to the output.
> But in case some network test need to verify something which is defined on
> stderr it will fails (when tst_rhost_run is run with -s).
That's why I send the first patch that I know is 100% safe.
> FYI *without* this patch:
>
> # route-redirect.sh
> ...
> route-redirect 1 TINFO: timeout per run is 0h 5m 0s
> route-redirect 1 TBROK: 'ns-icmp_redirector -I ltp_ns_veth1 -b' failed on '': 'sh: 1: ns-icmp_redirector: not found'
> route-redirect 1 TWARN: 'killall -SIGHUP ns-icmp_redirector' failed on '': 'ns-icmp_redirector: no process found'
> ns-icmp_redirector: no process found
>
> and *with* this patch:
>
> # route-redirect.sh
> ...
> route-redirect 1 TINFO: timeout per run is 0h 5m 0s
> sh: 1: ns-icmp_redirector: not found
> route-redirect 1 TBROK: 'ns-icmp_redirector -I ltp_ns_veth1 -b' failed on '': ''
> ns-icmp_redirector: no process found
> route-redirect 1 TWARN: 'killall -SIGHUP ns-icmp_redirector' failed on '': ''
>
> Info is there, but not on the same line (second '').
>
> Also with the change below it would be more meaningful (fixing first empty ''):
>
> route-redirect 1 TBROK: 'ns-icmp_redirector -I ltp_ns_veth1 -b' failed on NETNS: 'sh: 1: ns-icmp_redirector: not found'
> route-redirect 1 TWARN: 'killall -SIGHUP ns-icmp_redirector' failed on NETNS: 'ns-icmp_redirector: no process found'
> ns-icmp_redirector: no process found
>
> I also wrote conditional quiet on stderr (not sent to ML), but actually if we
> merge this and need sometimes to parse stderr, the opposite would be needed.
I supose that we would need to explicitly tell the tst_rhost_run() if we
want stderr included or not. That's probably something to be done after
the release.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-01-17 13:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-17 12:24 [LTP] [PATCH 1/2] testcases/lib: Fix tst_ns_* helpers Cyril Hrubis
2025-01-17 12:24 ` [LTP] [PATCH 2/2] testcases/lib: tst_net.sh: Do not use stderr in tst_rhost_run() Cyril Hrubis
2025-01-17 12:33 ` Cyril Hrubis
2025-01-17 13:27 ` Petr Vorel
2025-01-17 13:45 ` Cyril Hrubis [this message]
2025-01-17 14:16 ` Petr Vorel
2025-01-17 12:40 ` Li Wang
2025-01-17 12:33 ` [LTP] [PATCH 1/2] testcases/lib: Fix tst_ns_* helpers Li Wang
2025-01-17 12:44 ` Petr Vorel
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=Z4pe3estBHBQ0RTm@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
/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