[Swan-dev] regarding: testing: adding missing : ==== end ==== to nicinit
antony at phenome.org
Tue Jan 28 15:22:51 UTC 2020
On Tue, Jan 28, 2020 at 09:19:52AM -0500, Andrew Cagney wrote:
> On Tue, 28 Jan 2020 at 06:31, Antony Antony <antony at phenome.org> wrote:
> > the markers should be used in nicinit for simple tests where we use
> > eastinit.sh, nicinit.sh and final.sh
Lets start from the basics. For the record I am not involving swantest or
anything else. Leave it alone for now! Just look at testing.lirbeswan.org,
or "make kvm-test"
Paul was refering to commit:
I added " : ==== end ====" in nicinit. Now look at the result after and
iptables -t nat -F
iptables -t nat -F
if [ -f /sbin/ausearch ]; then ausearch -r -m avc -ts recent ; fi
If the nic does not need final.sh it can be sanitized away using
": ==== end ====" marker.
There are cases where you need something like final.sh on nic that is fine.
But majority of test cases where it is not needed, better use
": ==== end ===="
And it is better split to nn-<host>[-foo*].sh tests.
Here is case with out ": ==== end ====" in nicinit.sh
If we add acbcf816e6b3e commit to certoe-03-cop-whack that nic.console.txt
will be much cleaner. and can avoid lines such as the following in the
hostname | grep nic > /dev/null || ipsec whack --trafficstatus
I argue 8a628e94cbb7 "hostname | grep nic" is the wrong direction to go.
grep "==== end ===" */nicinit.sh |wc -l
grep ausearch */nic.console.txt |wc -l
so why not use ": ==== end ===="?
Why do you think it is a bad idea?
AFIK markers are not part of test kvmrunner, afik it is part of the
sanitizer. If my argument is correct, a logical step would be - the
kvmrunner check for ": ==== end ====" in nicinit.sh, if it finds it can
avoid running final.sh on nic, possibly can shave off a second or two.
But that is minor optimization.
More information about the Swan-dev