summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/listing/0008ruleset_arp_0
blob: fff0fee3244dcd6e016049666c0c935ec4af21e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

# listing ruleset per family

EXPECTED="table arp test {
}"

set -e

$NFT add table ip test
$NFT add table ip6 test
$NFT add table inet test
$NFT add table arp test
$NFT add table bridge test

GET="$($NFT list ruleset arp)"
if [ "$EXPECTED" != "$GET" ] ; then
	DIFF="$(which diff)"
	[ -x $DIFF ] && $DIFF -u <(echo "$EXPECTED") <(echo "$GET")
	exit 1
fi