[Swan-dev] regarding: testing: adding missing : ==== end ==== to nicinit

Paul Wouters paul at nohats.ca
Tue Jan 28 21:59:41 UTC 2020


On Tue, 28 Jan 2020, Antony Antony wrote:

>> I see people using cut and paste and suddenly seeing multiple markers and missing markers. So I prefer to not use it if we can avoid them.
>
> for now I prefer marker over  "netkey-vti-04/final.sh:hostname | grep nic >
> /dev/null || ipsec whack --trafficstatus"

I understand that is your preference if _any_ solution is needed. But you
didn't answer my real question. Is there any test case that functionally
needs to run final.sh on nic? Do we have a test that is simple enough
that it uses init/run/final, yet needs to do something on nic in the
final.sh? Without that current requirement, why would we need to use
any of these hacks with markers or hostname grepping ? Then we should
just not run final.sh on nic ever.

> The other alternative 00-host.sh scripts seems overload for most tests.

I see some tests that do something specific on nic, like enabling
firewall rules midway, but those use the numbered sh scripts because
they switch and sync a lot between hosts.

> I guesss we will have a mix three methods for a while.
>
> I haven't noticed  any sideffects when running tests in namespace " : ====
> end ====" in nicinit.sh. Could you try certoe-04-poc-packet did I break it
> for namesapce running?

I just re-tested and it didn't break. But if this is our only use for
adding markers to a lot of tests that we don't see the bad stuff we run
on nic (like ipsec trafficstatus) then I don't really see a
justification for complicating all our final.sh's with it, with the
inevitable copy and paste errors.

Paul


More information about the Swan-dev mailing list