From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 6/7] net/test: Add basic testing for tst_rhost_run
Date: Mon, 20 Jul 2020 19:36:06 +0200 [thread overview]
Message-ID: <20200720173606.GB20642@dell5510> (raw)
In-Reply-To: <9a30538f-bb7b-3fb9-7102-2f75b2d7de8c@163.com>
Hi Yang,
> > > Hi Petr,
> > > 1) Do you want to discard stderr as well? For example:
> > > -------------------------------------------------
> > > # which gre >/dev/null
> > > /usr/bin/which: no gre in
> > > (/opt/ltp/testcases/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin)
> > That's not needed because tst_rhost_run already redirect stderr to stdout.
> Hi Petr,
> I think you means tst_rhost_run -c 'which grep' >/dev/null rather than
> tst_rhost_run -c 'which grep > /dev/null'
> The current code just discard stdout, for example:
> -------------------------------------------------------
> [root@Fedora-30-workstation net]# ./tst_rhost_run.sh
> ...
> tst_rhost_run 1 TINFO: NETNS: ns_exec 3079 net,mnt sh -c " which gre >
> /dev/null || echo RTERR" 2>&1
> which: no gre in (./../../../../testcases/lib/:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/root/bin:/opt/ltp/testcases/bin)
I'm sorry, I accidentally tested on which version from debianutils which prints
also errors to stdout. which from GNU which (used in openSUSE/SLES, Fedora/RHEL)
prints errors to stderr => you're right stderr should be redirected.
On the other hand when not redirected, you can see PATH.
Kind regards,
Petr
next prev parent reply other threads:[~2020-07-20 17:36 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-10 17:20 [LTP] [PATCH v2 0/7] tst_net.sh: Remove rsh, update docs add debug & test Petr Vorel
2020-07-10 17:20 ` [LTP] [PATCH v2 1/7] tst_net.sh: Remove rsh support Petr Vorel
2020-07-20 7:37 ` Xiao Yang
2020-07-10 17:20 ` [LTP] [PATCH v2 2/7] tst_net.sh: Use ssh in LTP_RSH Petr Vorel
2020-07-20 8:17 ` Xiao Yang
2020-07-20 8:26 ` Xiao Yang
2020-07-20 9:03 ` Petr Vorel
2020-07-20 8:43 ` Petr Vorel
2020-07-10 17:20 ` [LTP] [PATCH v2 3/7] net: Remove rsh, rcp, rlogin tests Petr Vorel
2020-07-20 8:31 ` Xiao Yang
2020-07-10 17:20 ` [LTP] [PATCH v2 4/7] net: Update README.md Petr Vorel
2020-07-20 9:48 ` Xiao Yang
2020-07-20 14:15 ` Petr Vorel
2020-07-21 2:35 ` Xiao Yang
2020-07-21 6:11 ` Petr Vorel
2020-07-10 17:20 ` [LTP] [PATCH v2 5/7] tst_net.sh: Drop 'sh -c' use from ssh in tst_rhost_run Petr Vorel
2020-07-20 8:49 ` Xiao Yang
2020-07-10 17:20 ` [LTP] [PATCH v2 6/7] net/test: Add basic testing for tst_rhost_run Petr Vorel
2020-07-20 9:02 ` Xiao Yang
2020-07-20 11:53 ` Petr Vorel
2020-07-20 12:30 ` Xiao Yang
2020-07-20 17:36 ` Petr Vorel [this message]
2020-07-10 17:20 ` [LTP] [PATCH v2 7/7] tst_net.sh/tst_rhost_run: Add debugging Petr Vorel
2020-07-20 9:23 ` Xiao Yang
2020-07-10 17:22 ` [LTP] [PATCH v2 0/7] tst_net.sh: Remove rsh, update docs add debug & test Petr Vorel
2020-07-30 8:16 ` 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=20200720173606.GB20642@dell5510 \
--to=pvorel@suse.cz \
--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