From: Petr Vorel <pvorel@suse.cz>
To: coolgw <coolgw1126@gmail.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] Add containers/share to PATH when call init_ltp_netspace
Date: Fri, 6 Jan 2023 10:31:30 +0100 [thread overview]
Message-ID: <Y7fqcrPRV1KNsagV@pevik> (raw)
In-Reply-To: <20230105142559.20174-1-wegao@suse.com>
Hi Wei,
> When run single test case use command such as:
> LTP_SHELL_API_TESTS=shell/net/tst_rhost_run.sh make test-shell
> Error msg such as "ns_create: command not found" will popup, so
> need update PATH before call ns_create etc..
Once fixed, it should be here:
Fixes: #991
> Signed-off-by: WEI GAO <wegao@suse.com>
> ---
> testcases/lib/tst_net.sh | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
> diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
> index ceb45c98d..cd370e26f 100644
> --- a/testcases/lib/tst_net.sh
> +++ b/testcases/lib/tst_net.sh
> @@ -128,10 +128,13 @@ tst_net_require_ipv6()
> init_ltp_netspace()
> {
> + PATH="$PWD/../../testcases/kernel/containers/share/:$PATH"
> + tst_res TINFO "PATH='$PATH'"
This is not acceptable. The path should go to the test itself (tst_net.sh should
be either proper installed, then it expect ns_clone and other binaries to be
properly in /opt/ltp/testcases/bin and $PATH set to it. Or, if it's used for a
development, user is required to set the correct $PATH already.)
The reason why it should be in tst_rhost_run.sh is to allow testing instead of
make install. But user still needs to run make in required directories to have
required binaries at least compiled (if not installed).
NOTE: there are only 2 network shell API tests and the other tst_ipaddr_un.sh
does not use namespaces, that's why it goes just to this test.
> +
> local pid
> if [ ! -f /var/run/netns/ltp_ns -a -z "$LTP_NETNS" ]; then
> - tst_require_cmds ip
> + tst_require_cmds ip ns_create ns_exec ns_ifmov
This is wrong:
s/ns_ifmov/ns_ifmove/
(copy & paste is your friend to prevent silly errors)
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2023-01-06 9:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 14:25 [LTP] [PATCH v2] Add containers/share to PATH when call init_ltp_netspace coolgw
2023-01-06 9:31 ` 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=Y7fqcrPRV1KNsagV@pevik \
--to=pvorel@suse.cz \
--cc=coolgw1126@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.