From patchwork Mon Oct 16 13:12:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haller X-Patchwork-Id: 1849360 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=P+2L+9l2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4S8Hbq1H7dz20Zj for ; Tue, 17 Oct 2023 00:13:11 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230056AbjJPNNK (ORCPT ); Mon, 16 Oct 2023 09:13:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjJPNNK (ORCPT ); Mon, 16 Oct 2023 09:13:10 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3210A2 for ; Mon, 16 Oct 2023 06:12:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697461944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=noFKdPUgAvckGV7mweXpb2n7vkYJCaBf0ycnMOO3sq0=; b=P+2L+9l2v6iN9Qun8ZzCOvImy8QRoe2ur2I90B47OlNDzQsG6qEDamxHOz8Uq1NDwkrkbw VWD5p5QVw1uilyYvbGQH/N0E4wPW47uhpKFgRHR63ObaM4CdNCQhiivRHnaUCDQML916tw 29dQ0C1kvpkLH6WujWxGHr3ml4Rm/bo= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-633-5vijGf7hM6-baWbILwxGgg-1; Mon, 16 Oct 2023 09:12:22 -0400 X-MC-Unique: 5vijGf7hM6-baWbILwxGgg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9203929ABA34 for ; Mon, 16 Oct 2023 13:12:21 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.156]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EDF4A492BEE; Mon, 16 Oct 2023 13:12:20 +0000 (UTC) From: Thomas Haller To: NetFilter Cc: Thomas Haller Subject: [PATCH nft 1/3] tests/shell: skip "table_onoff" test if kernel patch is missing Date: Mon, 16 Oct 2023 15:12:07 +0200 Message-ID: <20231016131209.1127298-1-thaller@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Passing the test suite must not require latest kernel patches. If test "table_onoff" appears to not work due to a missing kernel patch, skip it. If you run a special kernel and expect that all test pass, set NFT_TEST_FAIL_ON_SKIP=y to catch unexpected skips. Fixes: bcca2d67656f ('tests: add test for dormant on/off/on bug') Signed-off-by: Thomas Haller --- tests/shell/testcases/transactions/table_onoff | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/shell/testcases/transactions/table_onoff b/tests/shell/testcases/transactions/table_onoff index 831d4614c1f2..d5ad09ef334c 100755 --- a/tests/shell/testcases/transactions/table_onoff +++ b/tests/shell/testcases/transactions/table_onoff @@ -11,7 +11,8 @@ delete table ip t EOF if [ $? -eq 0 ]; then - exit 1 + echo "Command to re-awaken a dormant table did not fail. Assume https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c9bd26513b3a11b3adb3c2ed8a31a01a87173ff1 is missing" + exit 77 fi set -e From patchwork Mon Oct 16 13:12:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haller X-Patchwork-Id: 1849361 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bwKnV+Mc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4S8Hbz2zJQz20Zj for ; Tue, 17 Oct 2023 00:13:19 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230219AbjJPNNT (ORCPT ); Mon, 16 Oct 2023 09:13:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjJPNNS (ORCPT ); Mon, 16 Oct 2023 09:13:18 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DDB29B for ; Mon, 16 Oct 2023 06:12:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697461954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1y3lAEXq7Igxwx9He2QGbOzFagcl4qGCk6Baxl0Vhec=; b=bwKnV+Mc07eKYVIzZtoPgd33s9bpIjC0HOYuw5oZ5uKGhZ/g/5vZ6decwKFA47MGXAWcVt IzEyTWv0dVmLmwu1btDBmDG4v+L230lKYAkknfj+Po9vxEUYob0kegJQ1PYtDRsxW/wpP0 cfhSrTabFmOvfJ8p2Jeio3MGGSXk190= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-615-g4hbPAbjOqSAOtoOeLwOSQ-1; Mon, 16 Oct 2023 09:12:22 -0400 X-MC-Unique: g4hbPAbjOqSAOtoOeLwOSQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7308185A5A8 for ; Mon, 16 Oct 2023 13:12:22 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.156]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DF3DB492BEE; Mon, 16 Oct 2023 13:12:21 +0000 (UTC) From: Thomas Haller To: NetFilter Cc: Thomas Haller Subject: [PATCH nft 2/3] tests/shell: skip "vlan_8021ad_tag" test instead of failing Date: Mon, 16 Oct 2023 15:12:08 +0200 Message-ID: <20231016131209.1127298-2-thaller@redhat.com> In-Reply-To: <20231016131209.1127298-1-thaller@redhat.com> References: <20231016131209.1127298-1-thaller@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org The test "vlan_8021ad_tag" requires recent kernel patches to pass. This makes the test suite unusable to contributors, who don't also run the required kernel. Instead of failing, just skip the test. If you run with a kernel that is supposed to pass all tests, consider setting NFT_TEST_FAIL_ON_SKIP=y. Fixes: 74cf3d16d8e9 ('tests: shell: add vlan match test case') Signed-off-by: Thomas Haller --- tests/shell/testcases/packetpath/vlan_8021ad_tag | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/shell/testcases/packetpath/vlan_8021ad_tag b/tests/shell/testcases/packetpath/vlan_8021ad_tag index 379a5710c1cb..246427062323 100755 --- a/tests/shell/testcases/packetpath/vlan_8021ad_tag +++ b/tests/shell/testcases/packetpath/vlan_8021ad_tag @@ -47,4 +47,9 @@ EOF ip netns exec "$ns1" ping -c 1 10.1.1.2 ip netns exec "$ns2" $NFT list ruleset -ip netns exec "$ns2" $NFT list chain netdev t c | grep 'counter packets 1 bytes 84' +OUT="$(ip netns exec "$ns2" $NFT list chain netdev t c)" + +if ! printf "%s" "$OUT" | grep -q 'counter packets 1 bytes 84' ; then + echo "Filter did not match. Assume kernel lacks fix https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=af84f9e447a65b4b9f79e7e5d69e19039b431c56" + exit 77 +fi From patchwork Mon Oct 16 13:12:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haller X-Patchwork-Id: 1849359 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=dc5bTj9K; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4S8Hbm5zt5z20Zj for ; Tue, 17 Oct 2023 00:13:08 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230017AbjJPNNG (ORCPT ); Mon, 16 Oct 2023 09:13:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjJPNNG (ORCPT ); Mon, 16 Oct 2023 09:13:06 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4DACAB for ; Mon, 16 Oct 2023 06:12:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697461945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vPbL7CLbF4+myvjVEiH0ztdpRmqSoihSooDfuw2zU0A=; b=dc5bTj9KrMyjrvahibhft/Aenwc8zGncJ3ztyqNIsMcy1Fk9leURO3KpI3UlLYyapvTAUy r0SMVEDNvnAKaKni48hiJc6SCDI0hTDmRKx2TriHBlgjZiGXTs0x9aU4611uDEbbn0WdiN VjL7D5F9l37uwOQlRPRANxVMKa2apDo= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-624-ft6iWH1APKyHiwQ8nUAOnQ-1; Mon, 16 Oct 2023 09:12:23 -0400 X-MC-Unique: ft6iWH1APKyHiwQ8nUAOnQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6B078380391A for ; Mon, 16 Oct 2023 13:12:23 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.156]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C51F3492BEE; Mon, 16 Oct 2023 13:12:22 +0000 (UTC) From: Thomas Haller To: NetFilter Cc: Thomas Haller Subject: [PATCH nft 3/3] tests/shell: add missing "vlan_8021ad_tag.nodump" file Date: Mon, 16 Oct 2023 15:12:09 +0200 Message-ID: <20231016131209.1127298-3-thaller@redhat.com> In-Reply-To: <20231016131209.1127298-1-thaller@redhat.com> References: <20231016131209.1127298-1-thaller@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org This is an inconsistency. The test should have either a .nft or a .nodump file. "./tools/check-tree.sh" enforces that and will in the future run by `make check`. Fixes: 74cf3d16d8e9 ('tests: shell: add vlan match test case') Signed-off-by: Thomas Haller --- tests/shell/testcases/packetpath/dumps/vlan_8021ad_tag.nodump | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/shell/testcases/packetpath/dumps/vlan_8021ad_tag.nodump diff --git a/tests/shell/testcases/packetpath/dumps/vlan_8021ad_tag.nodump b/tests/shell/testcases/packetpath/dumps/vlan_8021ad_tag.nodump new file mode 100644 index 000000000000..e69de29bb2d1