summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/netns/0003many_0
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/netns/0003many_0')
-rwxr-xr-xtests/shell/testcases/netns/0003many_012
1 files changed, 1 insertions, 11 deletions
diff --git a/tests/shell/testcases/netns/0003many_0 b/tests/shell/testcases/netns/0003many_0
index 03da6eec..c3595de8 100755
--- a/tests/shell/testcases/netns/0003many_0
+++ b/tests/shell/testcases/netns/0003many_0
@@ -11,14 +11,6 @@ if [ ! -x "$IP" ] ; then
exit 1
fi
-tmpfile=$(mktemp)
-if [ ! -w $tmpfile ] ; then
- echo "Failed to create tmp file" >&2
- exit 0
-fi
-
-trap "rm -rf $tmpfile" EXIT # cleanup if aborted
-
RULESET="table ip t {
set s {
type ipv4_addr
@@ -86,8 +78,6 @@ table arp t {
}
}"
-echo "$RULESET" > $tmpfile
-
function test_netns()
{
local NETNS_NAME=$1
@@ -97,7 +87,7 @@ function test_netns()
exit 1
fi
- $IP netns exec $NETNS_NAME $NFT -f $tmpfile
+ $IP netns exec $NETNS_NAME $NFT -f - <<< $RULESET
if [ $? -ne 0 ] ; then
echo "E: unable to load ruleset in netns" >&2
$IP netns del $NETNS_NAME