Skip to content

Commit

Permalink
runtest: pass timeouts down to tests: use it in one test
Browse files Browse the repository at this point in the history
A few tests implement their own timeouts to let them see whether dtrace
has started up properly.  This is less than ideal when valgrind is in
use, since that routinely causes startup to slow down by an order of
magnitude.  The runtest script adapts the script-wide timeout, but
this is not passed down to tests so they cannot do the same even if
they wanted to.

So pass down $timeout, and adjust one test that spuriously fails.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
  • Loading branch information
nickalcock committed Mar 1, 2022
1 parent 2bd9c2c commit 1f065d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ for dt in $dtrace; do
base=${base%.sh}
base=${base%.c}
testonly="$(basename $_test)"
timeout="$TIMEOUT"
export timeout="$TIMEOUT"

# Hidden files and editor backup files are not tests.

Expand Down
2 changes: 1 addition & 1 deletion test/unittest/providers/tst.dtrace_cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ out=/tmp/output.$$
$dtrace $dt_flags -n BEGIN,END &>> $out &
pid=$!

for iter in 1 2 3 4 5 6; do
for iter in $(seq 1 $((timeout/2))); do
sleep 1
if grep -q :BEGIN $out; then
iter=0
Expand Down

0 comments on commit 1f065d8

Please sign in to comment.