<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 19 Apr 2021 at 11:53, Antony Antony <<a href="mailto:antony@phenome.org" target="_blank">antony@phenome.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, Apr 17, 2021 at 08:33:18PM -0400, Andrew Cagney wrote:<br>
> BTW, I took a look at swan-prep --dnssec.  As best I can the big difference<br>
> between namespaces and KVM is when the config files are installed:<br>
> <br>
> - with KVMs the nsd and unbound directories are set up before the test is run<br>
> (during transmogrify)<br>
<br>
transmogrifying once is not a best solution for unbound and nsd.<br>
some tests can modify the config files. So next test may start with a wrong<br>
file.<br>
<br>
I think the swan-prep should to copy fresh config files every time.<br></blockquote><div><br></div>Moving the nsd/unbound stuff out of transmogrify makes sense.<br><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> - with namespaces, the nsd and unbound directories are set up as part of some<br>
> interesting mounts by swan-prep<br>
> <br>
> would things be more straight forward if, for namespaces, the directories were<br>
> set up behind the scenes before the test starts (I'm mainly thinking of those<br>
<br>
the namespace directories and files, which are bind mount, should be setup<br>
in swan-prep.  especially because we want to restart inside a vm(east or<br>
west..) manually, inside a namespace, without resetting the all namespaces<br>
of a test. So I think we should leave those tasks in swan-prep. It should<br>
not be in namespace test runner.<br></blockquote><div><br></div>I don't follow.</div><br><div class="gmail_quote">For KVMs, runner is required to establish a minimal environment before the first *.sh command is run:</div><div class="gmail_quote">- all the VMs are booted<br></div><div class="gmail_quote">- at the bash prompt<br></div><div class="gmail_quote">- /testing is mounted</div><div class="gmail_quote">- CWD is the directory containing the tests</div><div class="gmail_quote">- where applicable, libreswan is installed</div><div class="gmail_quote">- hostname is set</div><div class="gmail_quote">- /etc is in a state fit to be scribbled on<br></div><div class="gmail_quote"><div>(I'm sure there is other stuff)</div><div>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.<br></div><div><br></div><div>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.<br></div><div><br></div><div>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.<br></div><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I feel it would be sad to see if you move swan-prep into several shell<br>
scripts, instead of fixing swan-prep.<br></blockquote><div><br></div><div> </div></div></div>