Source-Changes archive

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

CVS commit: src/tests/net/arp



Module Name:    src
Committed By:   kre
Date:           Thu Nov 23 06:22:12 UTC 2017

Modified Files:
        src/tests/net/arp: t_arp.sh

Log Message:
Clean up the arp_rtm subtest...

1. Be assertive when claiming the pid of the background route monitor command,
   not polite...  (ie: $! will give you the pid, $? is just 0 there).
2. Since "wait 0" simply (always) exits with status 127, immediately (we
   know without thinking that we have no child with pid 0) the waits were
   ineffective - now (after fix #1) they work .. which requires the
   route monitor that watches the arp -d to exit after 1 message, not 2,
   as 1 is all it gets.   (If there really should be 2, someone needs to
   find out why the kernel is sending only 1 - I am not that someone).
3. The file contents need to be read only once, no matter how many patterns
   we need to look for, save some work, and do it that way (this is not
   really a bug,m but saving time for the ATF tests is always a good thing.)

Not sure if this will stop it randomly failing on bablyon5, but it might.
(The likely cause is that the "route.monitor" has not flushed its stdout
buffers at the time the "grep -A 3"  [aside: why that way to read the file??]
is performed, so fails to find its expected output ... the route monitor would
get an extra message once interfaces start being destroyed, I assume, and
would exit then, flushing its buffer, but by then it is too late.
If that is/was the cause, then it should be fixed now.)


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/tests/net/arp/t_arp.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index