Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4813F21D5BF for ; Tue, 5 Aug 2025 19:40:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.216.245.30 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754422852; cv=none; b=F/KoXM3rpsGNrwvG1pD38/3K1sc6aASwVAzdrkdon3l+hPsAT83ZwavpQW9Q0HEmZFl4QEj2nStTNOLSWGz49Aa3Ed/pULh2iP3MwZOvGnM/q1gBGSmzpbMzjk4KBJGuzaV/seO2vLvbLlrQ7jR1ux3P/9NvCEiIHCNwtOXJeaw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754422852; c=relaxed/simple; bh=KuFg2113LSpz5NAbo/0HgPHY2DbbmDlcMzPhugHIxTo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kK0ymU1rb4G1tv32DR+eBhhvuCsl1FkMQeZwRh32Dva2sP+tgXGW7aha5EAg4hJfhockkX4N1KMOO1LK0gBhk6POy+rrtexpze4KbCdFtYsN1xGsp91HdWGIuvknGB9dNtJfrYoJ0KhSjSyqulCb6gI6TntMqcu6kgLjGhsGvg0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de; spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc; arc=none smtp.client-ip=91.216.245.30 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc Received: by Chamillionaire.breakpoint.cc (Postfix, from userid 1003) id D64B061830; Tue, 5 Aug 2025 21:40:41 +0200 (CEST) From: Florian Westphal To: Cc: Florian Westphal Subject: [PATCH nft 2/2] tests: shell: add parser and packetpath test Date: Tue, 5 Aug 2025 21:40:15 +0200 Message-ID: <20250805194032.18288-2-fw@strlen.de> X-Mailer: git-send-email 2.49.1 In-Reply-To: <20250805194032.18288-1-fw@strlen.de> References: <20250805194032.18288-1-fw@strlen.de> Precedence: bulk X-Mailing-List: netfilter-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit One to validate parsing, and one to test that packets match the expected mapping. omits json file because of: internal:0:0-0: Error: Expression type payload not allowed in context (RHS, STMT). i.e. there is more work to be done on json side to support this. Signed-off-by: Florian Westphal --- I suggest to defer this until after 1.1.4 is out. .../bitwise/bitwise_in_sets_and_maps | 27 ++++++++ .../dumps/bitwise_in_sets_and_maps.nft | 17 ++++++ .../testcases/packetpath/bitwise_with_map | 61 +++++++++++++++++++ .../packetpath/dumps/bitwise_with_map.nft | 16 +++++ 4 files changed, 121 insertions(+) create mode 100755 tests/shell/testcases/bitwise/bitwise_in_sets_and_maps create mode 100644 tests/shell/testcases/bitwise/dumps/bitwise_in_sets_and_maps.nft create mode 100755 tests/shell/testcases/packetpath/bitwise_with_map create mode 100644 tests/shell/testcases/packetpath/dumps/bitwise_with_map.nft diff --git a/tests/shell/testcases/bitwise/bitwise_in_sets_and_maps b/tests/shell/testcases/bitwise/bitwise_in_sets_and_maps new file mode 100755 index 000000000000..4f5044f512aa --- /dev/null +++ b/tests/shell/testcases/bitwise/bitwise_in_sets_and_maps @@ -0,0 +1,27 @@ +#!/bin/bash + +# NFT_TEST_REQUIRES(NFT_TEST_HAVE_bitshift) + +set -e + +$NFT -f - <