[Swan-dev] testing and unstable dns

Andrew Cagney andrew.cagney at gmail.com
Mon Apr 19 18:02:39 UTC 2021


On Mon, 19 Apr 2021 at 11:53, Antony Antony <antony at phenome.org> wrote:

> On Sat, Apr 17, 2021 at 08:33:18PM -0400, Andrew Cagney wrote:
> > BTW, I took a look at swan-prep --dnssec.  As best I can the big
> difference
> > between namespaces and KVM is when the config files are installed:
> >
> > - with KVMs the nsd and unbound directories are set up before the test
> is run
> > (during transmogrify)
>
> transmogrifying once is not a best solution for unbound and nsd.
> some tests can modify the config files. So next test may start with a wrong
> file.
>
> I think the swan-prep should to copy fresh config files every time.
>

Moving the nsd/unbound stuff out of transmogrify makes sense.


>
> > - with namespaces, the nsd and unbound directories are set up as part of
> some
> > interesting mounts by swan-prep
> >
> > would things be more straight forward if, for namespaces, the
> directories were
> > set up behind the scenes before the test starts (I'm mainly thinking of
> those
>
> the namespace directories and files, which are bind mount, should be setup
> in swan-prep.  especially because we want to restart inside a vm(east or
> west..) manually, inside a namespace, without resetting the all namespaces
> of a test. So I think we should leave those tasks in swan-prep. It should
> not be in namespace test runner.
>

I don't follow.

For KVMs, runner is required to establish a minimal environment before the
first *.sh command is run:
- all the VMs are booted
- at the bash prompt
- /testing is mounted
- CWD is the directory containing the tests
- where applicable, libreswan is installed
- hostname is set
- /etc is in a state fit to be scribbled on
(I'm sure there is other stuff)
while this is currently implemented by walking the VM through a
boot-and-login sequence, there's nothing to rule out using snapshots, say.
Just as long as the environment is established before the test starts.

If I were to type "reboot" in such a vm, then I'll need to first manually
re-establish the above before entering the first shell command.  Why should
namespaces be different?  If namespaces and KVM established some minimum
environment before running tests then I think the odds of tests runing
under both frameworks would be greatly improved.

BTW, I'd take the above list as a starting point for discussion.  Currently
swan-prep has to deal with cleaning up from previous tests, I think that's
a bug.


> I feel it would be sad to see if you move swan-prep into several shell
> scripts, instead of fixing swan-prep.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20210419/f1020b0e/attachment.html>


More information about the Swan-dev mailing list