Signed-off-by: Eric Garver <eric@xxxxxxxxxxx> --- tests/shell/testcases/cache/0007_echo_cache_init_0 | 14 ++++++++++++++ .../cache/dumps/0007_echo_cache_init_0.nft | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100755 tests/shell/testcases/cache/0007_echo_cache_init_0 create mode 100644 tests/shell/testcases/cache/dumps/0007_echo_cache_init_0.nft diff --git a/tests/shell/testcases/cache/0007_echo_cache_init_0 b/tests/shell/testcases/cache/0007_echo_cache_init_0 new file mode 100755 index 000000000000..280a0d06bdc3 --- /dev/null +++ b/tests/shell/testcases/cache/0007_echo_cache_init_0 @@ -0,0 +1,14 @@ +#!/bin/bash + +set -e + +$NFT -i >/dev/null <<EOF +add table inet t +add chain inet t c +add rule inet t c accept comment "first" +add rule inet t c accept comment "third" +EOF + +# make sure the rule cache gets initialized when using echo option +# +$NFT --echo add rule inet t c index 0 accept comment '"second"' >/dev/null diff --git a/tests/shell/testcases/cache/dumps/0007_echo_cache_init_0.nft b/tests/shell/testcases/cache/dumps/0007_echo_cache_init_0.nft new file mode 100644 index 000000000000..c774ee72a683 --- /dev/null +++ b/tests/shell/testcases/cache/dumps/0007_echo_cache_init_0.nft @@ -0,0 +1,7 @@ +table inet t { + chain c { + accept comment "first" + accept comment "second" + accept comment "third" + } +} -- 2.20.1