Re: [nft PATCH 1/3] tests/shell: mount all of "/var/run" in "test-wrapper.sh"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2023-10-06 at 13:51 +0200, Pablo Neira Ayuso wrote:
> On Fri, Oct 06, 2023 at 11:42:18AM +0200, Thomas Haller wrote:
> > After reboot, "/var/run/netns" does not exist before we run the
> > first
> > `ip netns add` command. Previously, "test-wrapper.sh" would mount a
> > tmpfs on that directory, but that fails, if the directory doesn't
> > exist.
> > You will notice this, by deleting /var/run/netns (which only root
> > can
> > delete or create, and which is wiped on reboot).
> > 
> > Instead, mount all of "/var/run". Then we can also create
> > /var/run/netns
> > directory.
> 
> Maybe create a specify mount point for this? This will be created
> once, then it will remain there for those that run tests?

Hi Pablo,

I don't understand. Could you please elaborate?

Note that the last commit adds a "--setup-host" option. I considered
whether that should also `mkdir -p /var/run/netns`, but I decided
against it, because Patch 1/3 solves it better (and makes it
unnecessary).

As tests run in parallel, they all should use their own private
/var/run/netns to not interfere with each other. Hence, they test-
wrapper.sh would still (at least) remount /var/run/netns. While at it,
Patch 1/3 remounting /var/run is even preferable, because there should
be nothing in /var/run that is required by tests or that should be
shared (or if we ever learn that there would be something, than special
action could be taken).


Thomas





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux