[PATCH] ctdb-scripts: Invoke pstree with -l option (bug 13531)
amitay at gmail.com
Mon Jul 16 04:24:05 UTC 2018
On Sun, Jul 15, 2018 at 4:46 PM, Martin Schwenke via samba-technical
<samba-technical at lists.samba.org> wrote:
> This should get rid of the current flappiness in various CTDB tests that
> use the pstree command, most notably ctdb/tests/eventd/eventd_022.sh,
> which I've seen flapping quite a bit.
> As the commit message says, a couple of recent commits have lengthened
> the command string printed by pstree. This, in combination with the
> deep directory structure used by autobuild on sn-devel, is probably
> enough to take the test the flapping point. Then it probably comes
> down to the width of the PID printed in the original (unfiltered)
> pstree output. Wow! :-)
> ... and sorry about that... you never think about these things until
> they happen. Who knew that pstree truncates long lines? :-(
> I ran a private autobuild on sn-devel, running just the ctdb tests, in a
> loop this passed 9 times in a row (until I killed it).
> Please review and maybe push...
NACK. Let's not make commands non-portable more than necessary.
There is no real point in trying to match the output of pstree in
tests. We have two options.
1. Define PSTREE_CMD appropriately (this takes care of portability),
so we can match expected output.
2. Filter out pstree output before matching. Easier done in eventd
tests as we can just drop pstree command from debug-script.sh.
We can pick 1 or 2, or some combination of 1 and 2.
More information about the samba-technical