diff mbox series

tests: monitor: use correct $nft value in EXIT trap

Message ID 20210127140203.2099010-1-snemec@redhat.com
State Accepted
Delegated to: Pablo Neira
Headers show
Series tests: monitor: use correct $nft value in EXIT trap | expand

Commit Message

Štěpán Němec Jan. 27, 2021, 2:02 p.m. UTC
With double quotes, $nft was being expanded to the default value even
in presence of the -H option.

Signed-off-by: Štěpán Němec <snemec@redhat.com>
Helped-by: Tomáš Doležal <todoleza@redhat.com>
Acked-by: Phil Sutter <phil@nwl.cc>
---
 tests/monitor/run-tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Phil Sutter Jan. 27, 2021, 10:51 p.m. UTC | #1
On Wed, Jan 27, 2021 at 03:02:03PM +0100, Štěpán Němec wrote:
> With double quotes, $nft was being expanded to the default value even
> in presence of the -H option.
> 
> Signed-off-by: Štěpán Němec <snemec@redhat.com>
> Helped-by: Tomáš Doležal <todoleza@redhat.com>
> Acked-by: Phil Sutter <phil@nwl.cc>

Applied, thanks!
Štěpán Němec Jan. 28, 2021, 7:30 a.m. UTC | #2
On Wed, 27 Jan 2021 23:51:34 +0100
Phil Sutter wrote:

> Applied, thanks!

Thank you, and I apologize to everyone involved for the lack of proper
tag prefix in the Subject; I only realized too late I should have added
the "nft".
diff mbox series

Patch

diff --git a/tests/monitor/run-tests.sh b/tests/monitor/run-tests.sh
index 5a736fc6..1fe613c7 100755
--- a/tests/monitor/run-tests.sh
+++ b/tests/monitor/run-tests.sh
@@ -19,7 +19,7 @@  if [ ! -d $testdir ]; then
 	echo "Failed to create test directory" >&2
 	exit 1
 fi
-trap "rm -rf $testdir; $nft flush ruleset" EXIT
+trap 'rm -rf $testdir; $nft flush ruleset' EXIT
 
 command_file=$(mktemp -p $testdir)
 output_file=$(mktemp -p $testdir)