Skip to content

Commit

Permalink
tests: Fix *bsd failure in OVS_APP_EXIT_AND_WAIT.
Browse files Browse the repository at this point in the history
When using the default user shell in FreeBSD and NetBSD and executing
a test in which the app name parameter to OVS_APP_EXIT_AND_WAIT
contains backticks (e.g. "`pwd`/unixctl"), TMPPID expands to:

    `cat "$OVS_RUNDIR"/"`pwd`"/unixctl.pid 2>/dev/null`

This results in an "unterminated quoted string" syntax error from
the shell.

Correct this by replacing backticks with $(...) in OVS_APP_EXIT_AND_WAIT.
Verified via "make check" under NetBSD 7 and Fedora 23.

Fixes: f9b11f2 ("tests: Make OVS_APP_EXIT_AND_WAIT() wait for process termination")
Reported-by: Aaron Conole <[email protected]>
Signed-off-by: Lance Richardson <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
hlrichardson authored and blp committed Mar 31, 2016
1 parent a6be657 commit 7562379
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/ovs-macros.at
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ dnl
dnl Ask the daemon named DAEMON to exit, via ovs-appctl, and then waits for it
dnl to exit.
m4_define([OVS_APP_EXIT_AND_WAIT],
[TMPPID=`cat "$OVS_RUNDIR"/$1.pid 2>/dev/null`
[TMPPID=$(cat "$OVS_RUNDIR"/$1.pid 2>/dev/null)
AT_CHECK([ovs-appctl -t $1 exit])
OVS_WAIT_WHILE([kill -0 $TMPPID 2>/dev/null])])

Expand Down

0 comments on commit 7562379

Please sign in to comment.