From 2545416782c89dd9080e6bdd4fadc2cb0333a9d2 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 7 Nov 2023 10:30:13 +0100 Subject: tests: shell: skip comment tests if kernel lacks support Skip tests that require comment support Signed-off-by: Pablo Neira Ayuso --- tests/shell/testcases/optionals/comments_chain_0 | 2 ++ tests/shell/testcases/optionals/comments_objects_0 | 2 ++ tests/shell/testcases/optionals/comments_table_0 | 2 ++ 3 files changed, 6 insertions(+) (limited to 'tests/shell/testcases/optionals') diff --git a/tests/shell/testcases/optionals/comments_chain_0 b/tests/shell/testcases/optionals/comments_chain_0 index fba961c7..1a84cfa6 100755 --- a/tests/shell/testcases/optionals/comments_chain_0 +++ b/tests/shell/testcases/optionals/comments_chain_0 @@ -1,5 +1,7 @@ #!/bin/bash +# NFT_TEST_REQUIRES(NFT_TEST_HAVE_comment) + EXPECTED='table ip test_table { chain test_chain { comment "test" diff --git a/tests/shell/testcases/optionals/comments_objects_0 b/tests/shell/testcases/optionals/comments_objects_0 index 301f5518..28041ebd 100755 --- a/tests/shell/testcases/optionals/comments_objects_0 +++ b/tests/shell/testcases/optionals/comments_objects_0 @@ -1,5 +1,7 @@ #!/bin/bash +# NFT_TEST_REQUIRES(NFT_TEST_HAVE_comment) + set -e COMMENT128="12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678" diff --git a/tests/shell/testcases/optionals/comments_table_0 b/tests/shell/testcases/optionals/comments_table_0 index a0dfd749..56bb206b 100755 --- a/tests/shell/testcases/optionals/comments_table_0 +++ b/tests/shell/testcases/optionals/comments_table_0 @@ -1,5 +1,7 @@ #!/bin/bash +# NFT_TEST_REQUIRES(NFT_TEST_HAVE_comment) + # comments are shown $NFT add table test { comment \"test_comment\"\; } -- cgit v1.2.3