Add a regression test for re-owning an already dormant PERSIST table. The test creates a dormant PERSIST OWNER table, lets the owning nft process exit so the table becomes an orphan, adds a basechain while the table is still dormant, and re-owns the orphan. This exercises the kernel path fixed by "netfilter: nf_tables: only disable tables on a dormant transition". The test only issues the three nft commands; run-tests.sh already checks whether the kernel was tainted. Signed-off-by: Ma Xinmeng <1564938642@qq.com> --- .../shell/testcases/transactions/0052dormant_table_adopt_0 | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 tests/shell/testcases/transactions/0052dormant_table_adopt_0 diff --git a/tests/shell/testcases/transactions/0052dormant_table_adopt_0 b/tests/shell/testcases/transactions/0052dormant_table_adopt_0 new file mode 100755 index 0000000..73ae4f2 --- /dev/null +++ b/tests/shell/testcases/transactions/0052dormant_table_adopt_0 @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +$NFT add table ip t '{ flags dormant,persist,owner; }' +$NFT add chain ip t c '{ type filter hook output priority 0; }' +$NFT add table ip t '{ flags dormant,persist,owner; }' -- 2.56.0.windows.4.niugit