From: Cyril Hrubis <chrubis@suse.cz>
To: Matus Marhefka <mmarhefk@redhat.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH 2/2 v3] containers/netns tests rewritten
Date: Wed, 19 Aug 2015 15:44:38 +0200 [thread overview]
Message-ID: <20150819134438.GA22714@rei.suse.de> (raw)
In-Reply-To: <1439899125-7646-1-git-send-email-mmarhefk@redhat.com>
Hi!
> +cleanup()
> +{
> + tst_rmdir
> + ip link del dummy0 2>/dev/null
> + kill -9 $NS_HANDLE 2>/dev/null
> +}
> +
> +tst_tmpdir
> +NS_HANDLE=$(ns_create net mnt)
> +if [ $? -eq 1 ]; then
> + tst_resm TINFO "$NS_HANDLE"
> + tst_brkm TBROK "unable to create a new network namespace"
> +fi
> +TST_CLEANUP=cleanup
> +ls /sys/class/net >sysfs_before
> +
> +
> +ns_exec $NS_HANDLE ip link add dummy0 type dummy || \
> + tst_brkm TBROK "failed to add a new dummy device"
> +ns_exec $NS_HANDLE mount -t sysfs none /sys 2>/dev/null
> +kill -9 $NS_HANDLE
I'm a bit puzzled here. Why do we have to mount the sysfs in the
namespace if we aren't doing anything with it?
Also shouldn't we destroy the namespace after we save the sysfs_after?
> +ls /sys/class/net >sysfs_after
> +diff sysfs_before sysfs_after
> +if [ $? -eq 0 ]; then
> + tst_resm TPASS "sysfs not affected by a separate namespace"
> +else
> + tst_resm TFAIL "sysfs affected by a separate namespace"
> +fi
> +
> +tst_exit
Otherwise I'm ready to push these two patches (I did minor fixes in the
first one to silence compiler warnings though).
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2015-08-19 13:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 12:22 [LTP] [PATCH 1/2] added helper tools for creating and working with namespaces Matus Marhefka
2015-07-14 12:22 ` [LTP] [PATCH 2/2] containers/netns tests rewritten Matus Marhefka
2015-07-14 13:09 ` Cyril Hrubis
[not found] ` <1436958405-21403-1-git-send-email-mmarhefk@redhat.com>
2015-07-27 14:48 ` [LTP] [PATCH 2/2 v2] " Cyril Hrubis
[not found] ` <1439899125-7646-1-git-send-email-mmarhefk@redhat.com>
2015-08-19 13:44 ` Cyril Hrubis [this message]
[not found] ` <1244717184.10704034.1439998635401.JavaMail.zimbra@redhat.com>
2015-08-19 16:26 ` [LTP] [PATCH 2/2 v3] " Cyril Hrubis
[not found] ` <2086887252.11104808.1440076288678.JavaMail.zimbra@redhat.com>
2015-08-20 13:27 ` Cyril Hrubis
[not found] ` <1988094172.11156810.1440082049224.JavaMail.zimbra@redhat.com>
2015-08-20 14:56 ` Cyril Hrubis
2015-07-14 13:02 ` [LTP] [PATCH 1/2] added helper tools for creating and working with namespaces Cyril Hrubis
[not found] ` <1436958370-21366-1-git-send-email-mmarhefk@redhat.com>
2015-07-27 14:16 ` [LTP] [PATCH 1/2 v2] " Cyril Hrubis
[not found] ` <1439899089-7601-1-git-send-email-mmarhefk@redhat.com>
2015-08-26 15:05 ` [LTP] [PATCH 1/2 v3] " Cyril Hrubis
2015-08-27 11:55 ` Cyril Hrubis
[not found] ` <55DF1280.5080300@redhat.com>
2015-08-27 13:47 ` Cyril Hrubis
[not found] ` <55DF19FC.3030501@redhat.com>
2015-08-27 14:13 ` Cyril Hrubis
[not found] ` <55DF1D60.8090702@redhat.com>
2015-08-27 14:26 ` Cyril Hrubis
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=20150819134438.GA22714@rei.suse.de \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
--cc=mmarhefk@redhat.com \
/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