From b878cb7d83855f4420791561b63aa4b96d73663a Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Fri, 8 Jun 2018 14:41:08 +0200 Subject: tests: shell: add quotes when using <<<-style here document bash 4.3.30 removes newlines in RULESET when "" are omitted, which then causes nft -f to complain about invalid syntax. As a result, all test cases that use this here-doc style fail. Signed-off-by: Florian Westphal --- tests/shell/testcases/nft-f/0001define_slash_0 | 2 +- tests/shell/testcases/nft-f/0006action_object_0 | 2 +- tests/shell/testcases/nft-f/0007action_object_set_segfault_1 | 2 +- tests/shell/testcases/nft-f/0008split_tables_0 | 2 +- tests/shell/testcases/nft-f/0009variable_0 | 2 +- tests/shell/testcases/nft-f/0010variable_0 | 2 +- tests/shell/testcases/nft-f/0012different_defines_0 | 2 +- tests/shell/testcases/nft-f/0013defines_1 | 2 +- tests/shell/testcases/nft-f/0014defines_1 | 2 +- tests/shell/testcases/nft-f/0015defines_1 | 2 +- tests/shell/testcases/nft-f/0016redefines_1 | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) (limited to 'tests/shell/testcases/nft-f') diff --git a/tests/shell/testcases/nft-f/0001define_slash_0 b/tests/shell/testcases/nft-f/0001define_slash_0 index 8712fbf8..93c48115 100755 --- a/tests/shell/testcases/nft-f/0001define_slash_0 +++ b/tests/shell/testcases/nft-f/0001define_slash_0 @@ -8,4 +8,4 @@ define net = 1.1.1.1/24 set -e -$NFT -f - <<< $RULESET +$NFT -f - <<< "$RULESET" diff --git a/tests/shell/testcases/nft-f/0006action_object_0 b/tests/shell/testcases/nft-f/0006action_object_0 index 6e3b0b2e..b9766f2d 100755 --- a/tests/shell/testcases/nft-f/0006action_object_0 +++ b/tests/shell/testcases/nft-f/0006action_object_0 @@ -50,7 +50,7 @@ RULESET=$(for family in $FAMILIES ; do generate2 $family done) -$NFT -f - <<< $RULESET +$NFT -f - <<< "$RULESET" if [ $? -ne 0 ] ; then echo "E: unable to load ruleset 2" >&2 exit 1 diff --git a/tests/shell/testcases/nft-f/0007action_object_set_segfault_1 b/tests/shell/testcases/nft-f/0007action_object_set_segfault_1 index 7649a496..933a2f62 100755 --- a/tests/shell/testcases/nft-f/0007action_object_set_segfault_1 +++ b/tests/shell/testcases/nft-f/0007action_object_set_segfault_1 @@ -10,4 +10,4 @@ add set t s {type ipv4_addr\;} add rule t c ip saddr @s " -$NFT -f - <<< $RULESET 2>/dev/null +$NFT -f - <<< "$RULESET" 2>/dev/null diff --git a/tests/shell/testcases/nft-f/0008split_tables_0 b/tests/shell/testcases/nft-f/0008split_tables_0 index 14cdd499..c4ca717f 100755 --- a/tests/shell/testcases/nft-f/0008split_tables_0 +++ b/tests/shell/testcases/nft-f/0008split_tables_0 @@ -15,7 +15,7 @@ table inet filter { } }" -$NFT -f - <<< $RULESET +$NFT -f - <<< "$RULESET" if [ $? -ne 0 ] ; then echo "E: unable to load good ruleset" >&2 exit 1 diff --git a/tests/shell/testcases/nft-f/0009variable_0 b/tests/shell/testcases/nft-f/0009variable_0 index 8ff6b7cf..e073d86c 100755 --- a/tests/shell/testcases/nft-f/0009variable_0 +++ b/tests/shell/testcases/nft-f/0009variable_0 @@ -11,4 +11,4 @@ table inet forward { } }" -$NFT -f - <<< $RULESET +$NFT -f - <<< "$RULESET" diff --git a/tests/shell/testcases/nft-f/0010variable_0 b/tests/shell/testcases/nft-f/0010variable_0 index be02c6bf..69c80c79 100755 --- a/tests/shell/testcases/nft-f/0010variable_0 +++ b/tests/shell/testcases/nft-f/0010variable_0 @@ -10,4 +10,4 @@ table inet filter { add element inet filter whitelist_v4 \$whitelist_v4 " -$NFT -f - <<< $RULESET +$NFT -f - <<< "$RULESET" diff --git a/tests/shell/testcases/nft-f/0012different_defines_0 b/tests/shell/testcases/nft-f/0012different_defines_0 index c17b06b1..0bdbd1b5 100755 --- a/tests/shell/testcases/nft-f/0012different_defines_0 +++ b/tests/shell/testcases/nft-f/0012different_defines_0 @@ -33,4 +33,4 @@ table inet t { }" set -e -$NFT -f - <<< $RULESET +$NFT -f - <<< "$RULESET" diff --git a/tests/shell/testcases/nft-f/0013defines_1 b/tests/shell/testcases/nft-f/0013defines_1 index b6d575c9..1dd5b569 100755 --- a/tests/shell/testcases/nft-f/0013defines_1 +++ b/tests/shell/testcases/nft-f/0013defines_1 @@ -14,4 +14,4 @@ table ip t { } }" -$NFT -f - <<< $RULESET +$NFT -f - <<< "$RULESET" diff --git a/tests/shell/testcases/nft-f/0014defines_1 b/tests/shell/testcases/nft-f/0014defines_1 index 77d766ec..c8e73c24 100755 --- a/tests/shell/testcases/nft-f/0014defines_1 +++ b/tests/shell/testcases/nft-f/0014defines_1 @@ -14,4 +14,4 @@ table ip t { } }" -$NFT -f - <<< $RULESET +$NFT -f - <<< "$RULESET" diff --git a/tests/shell/testcases/nft-f/0015defines_1 b/tests/shell/testcases/nft-f/0015defines_1 index 8aaa7bb1..489c65b5 100755 --- a/tests/shell/testcases/nft-f/0015defines_1 +++ b/tests/shell/testcases/nft-f/0015defines_1 @@ -13,4 +13,4 @@ table ip t { } }" -$NFT -f - <<< $RULESET +$NFT -f - <<< "$RULESET" diff --git a/tests/shell/testcases/nft-f/0016redefines_1 b/tests/shell/testcases/nft-f/0016redefines_1 index 9a6a764a..ed702c90 100755 --- a/tests/shell/testcases/nft-f/0016redefines_1 +++ b/tests/shell/testcases/nft-f/0016redefines_1 @@ -21,7 +21,7 @@ EXPECTED="table ip x { } }" -$NFT -f - <<< $RULESET +$NFT -f - <<< "$RULESET" GET="$($NFT list ruleset)" -- cgit v1.2.3