summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/sets/0014malformed_set_is_not_defined_0
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/sets/0014malformed_set_is_not_defined_0')
-rwxr-xr-xtests/shell/testcases/sets/0014malformed_set_is_not_defined_014
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/shell/testcases/sets/0014malformed_set_is_not_defined_0 b/tests/shell/testcases/sets/0014malformed_set_is_not_defined_0
index 5d1a2dab..61d6b49c 100755
--- a/tests/shell/testcases/sets/0014malformed_set_is_not_defined_0
+++ b/tests/shell/testcases/sets/0014malformed_set_is_not_defined_0
@@ -7,22 +7,14 @@
# In this case, nft should error out because the set doesn't exist instead of
# segfaulting
-tmpfile=$(mktemp)
-if [ ! -w $tmpfile ] ; then
- echo "Failed to create tmp file" >&2
- exit 0
-fi
-
-trap "rm -rf $tmpfile" EXIT # cleanup if aborted
-
-echo "
+RULESET="
add table t
add chain t c
add set t s {type ipv4_addr\;}
add rule t c ip saddr @s
-" >$tmpfile
+"
-$NFT -f $tmpfile
+$NFT -f - <<< $RULESET
ret=$?
trap - EXIT