From patchwork Wed Oct 20 12:45:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xaB0xJtww6FuIE7Em21lYw==?= X-Patchwork-Id: 1543871 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=fYEdi6zz; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HZ9Kv5CHnz9sNH for ; Wed, 20 Oct 2021 23:44:35 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230077AbhJTMqs (ORCPT ); Wed, 20 Oct 2021 08:46:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50278 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229941AbhJTMqs (ORCPT ); Wed, 20 Oct 2021 08:46:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634733873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X2vLvjDbbPmVdBAwPo3y12lvJp+8OYfuPpTQbXbHwTA=; b=fYEdi6zzEg0fM5JGfQP9Zimm6U9OxZM4LHO2VXgKoeooF/nG9e7n4v6OXi3yNbZkBpbtki KIJGC+2HWcruBEs+q01wXYwCaWEh5Mklyv2nEcOhz+uc1dqUEJXXg9H9xktvU/9MTsXK3g xT6YVSbKaYOl26Ypt1FkpFhU/ukgjpI= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-58-h6-j95qHPHKrZcGyokAM7Q-1; Wed, 20 Oct 2021 08:44:32 -0400 X-MC-Unique: h6-j95qHPHKrZcGyokAM7Q-1 Received: by mail-wm1-f72.google.com with SMTP id c5-20020a05600c0ac500b0030dba7cafc9so4151160wmr.5 for ; Wed, 20 Oct 2021 05:44:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=X2vLvjDbbPmVdBAwPo3y12lvJp+8OYfuPpTQbXbHwTA=; b=j/PU6nm79vefr/yT4plnq8a2GOZtnjE48zJ3zSjry+K+MClPHYC8VT/CWvIZguo9tJ 1vVHO2he1+U6+ys/LRXL0c9DYiVN2IwlYh/Cyvr+birPeWlT4V4eOantep9PzaYWcdJd 3zS26J8RnwXDkw/cyqSKXtBkBwVUfXKmux3L7hkkJ/aNL6xIM0/cLiFRUpLVqFUaAo/7 TLv5orCfzdD/W+lM9Gz9oUwebAMA7uf3IQSLrVh0N30Oc6+RkXrwUtjugsZqdxyRYdlE MMzkqAxBg7YRsk77dlAXg2nQPV52QdS6gEjX3upqKK02sgWDtZkVbHHeFOgnunatcEgf 8osA== X-Gm-Message-State: AOAM532eDMTO60UV9/s/TLfqkN70JhkTOWKyZl228M3mDSEgFGiIRxOg tGT0r3/wjS54WBsNijnJHxEAgk6Rk0aNWY7ceFdRuHpp78OrJREK9uqvcq5Pp0az/EuUXhe3HSD nPAGfmuCUAHdATorJ7K4zpOr5o3IKltvBWeXMdukfMzkE3yMDowhkpm5w3SlZrdM1ElHLLpzZTl UvrA== X-Received: by 2002:a7b:cf06:: with SMTP id l6mr13595873wmg.129.1634733870726; Wed, 20 Oct 2021 05:44:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwakAFv0hVI/AdHp420L5lMpZmFODQl7MFle5rKrwRfyWjcyOlWzD/svarjycb6oCgtzeUKWg== X-Received: by 2002:a7b:cf06:: with SMTP id l6mr13595857wmg.129.1634733870524; Wed, 20 Oct 2021 05:44:30 -0700 (PDT) Received: from localhost ([185.112.167.53]) by smtp.gmail.com with ESMTPSA id i203sm4990112wma.48.2021.10.20.05.44.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 05:44:30 -0700 (PDT) From: =?utf-8?b?xaB0xJtww6FuIE7Em21lYw==?= To: netfilter-devel@vger.kernel.org, Pablo Neira Ayuso Subject: [PATCH nft 1/3] tests: shell: README: copy edit Date: Wed, 20 Oct 2021 14:45:10 +0200 Message-Id: <20211020124512.490288-1-snemec@redhat.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Signed-off-by: Štěpán Němec --- tests/shell/README | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) base-commit: 2139913694a9850c9160920b2c638aac4828f9bb diff --git a/tests/shell/README b/tests/shell/README index e0279bbdc30c..35f6e3785f0e 100644 --- a/tests/shell/README +++ b/tests/shell/README @@ -1,16 +1,17 @@ -This test-suite is intended to perform tests of higher level than -the other regression test-suite. +This test suite is intended to perform tests on a higher level +than the other regression test suites. -It can run arbitrary executables which can perform any test apart of testing -the nft syntax or netlink code (which is what the regression tests does). +It can run arbitrary executables which can perform any test, not +limited to testing the nft syntax or netlink code (which is what +the regression tests do). To run the test suite (as root): $ cd tests/shell # ./run-tests.sh -Test files are executables files with the pattern <>, where N is the -expected return code of the executable. Since they are located with `find', -test-files can be spread in any sub-directories. +Test files are executable files matching the pattern <>, +where N is the expected return code of the executable. Since they +are located with `find', test files can be put in any subdirectory. You can turn on a verbose execution by calling: # ./run-tests.sh -v @@ -18,11 +19,11 @@ You can turn on a verbose execution by calling: And generate missing dump files with: # ./run-tests.sh -g -Before each call to the test-files, `nft flush ruleset' will be called. -Also, test-files will receive the environment variable $NFT which contains the -path to the nftables binary being tested. +Before each test file invocation, `nft flush ruleset' will be called. +Also, test file process environment will include the variable $NFT +which contains the path to the nft binary being tested. You can pass an arbitrary $NFT value as well: # NFT=/usr/local/sbin/nft ./run-tests.sh -By default the tests are run with the nft binary at '../../src/nft' +By default, the tests are run with the nft binary at '../../src/nft' From patchwork Wed Oct 20 12:45:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xaB0xJtww6FuIE7Em21lYw==?= X-Patchwork-Id: 1543872 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=EtL7aPqG; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HZ9Kw4pZqz9sNH for ; Wed, 20 Oct 2021 23:44:36 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230182AbhJTMqt (ORCPT ); Wed, 20 Oct 2021 08:46:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36547 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229941AbhJTMqt (ORCPT ); Wed, 20 Oct 2021 08:46:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634733874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pa2LKXSooiIQ+HcGUIqS+XYS3QcGVUwLfppkL3xPIy4=; b=EtL7aPqGps0Y8Us6lfGDEoQtBJp1nHZvGdForgWE3w2OAWV9MaS4F2e356hzIDTmpIGmET Kr9SXBLh4LJHWQdlsNYIkKNaNmTvPArriB7qhCvxtnmUbJ5ArFBUPtGA9TZPBzBYFS2+nM eX9CFfOyUYgqpel1UZN4jR3YPKIaeCI= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-335-ZzBiouX0NUSwC3RnHmojOw-1; Wed, 20 Oct 2021 08:44:33 -0400 X-MC-Unique: ZzBiouX0NUSwC3RnHmojOw-1 Received: by mail-wm1-f69.google.com with SMTP id u14-20020a05600c19ce00b0030d8549d49aso2149503wmq.0 for ; Wed, 20 Oct 2021 05:44:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pa2LKXSooiIQ+HcGUIqS+XYS3QcGVUwLfppkL3xPIy4=; b=ne/0HfBDKUARmvE6yMAznAcHvscNQ4cQzk4wWqqWLLrNV3ggECnNWlXbfC2mV976f6 zuv/2dI5LhxKbrvyYo/ryl95aTBrvUkufxLAUaufsQQ+zqm4KHUZhEu6JzORdqPaXsMh KMgMq4UbTPKtKiRMC3e5XQkTVpq+jA+cT7rz2RPD95cclKXbl28L1Rdsv5gJBqHHhvQU byxuNN4W0Jr+I8gNnxCcQfTdHBWeDiGi9jQto1H0X/r90QmJY7PYy/wI0zaxgJkPBuES 35P6SNSkhnSOW8C+X1VQXvGg8+nN3g4qFHOw/mIO898CjX2cBl9I7G6hZzoQiCca+SnG m/Xw== X-Gm-Message-State: AOAM532soVX3lv930d6N1L9d9+czD25wo1AG2hwls2iCGUw0B+NCqAXG XRFtk0XHI8kJQ5UTGGUAbeCGQeYyxn23OXccSztwptxBqTSowX3aLbRl7gOQXQZ8xe1UvMgToHs odnrZWJAHhkkYi/GCwEwzUIXm6qXEGCzVC3a3JZ6fi9yY+QB/wcwpqM+tIuGcJmB/T/B58ZHUga OKnw== X-Received: by 2002:a1c:a1c2:: with SMTP id k185mr13688990wme.144.1634733871875; Wed, 20 Oct 2021 05:44:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEe8tSe3tGhA6u4BiytzrXX9NVjzVEN0CNIcayEoATHudezsvI7AYR+SLRkfQ9JNuEOrX0gg== X-Received: by 2002:a1c:a1c2:: with SMTP id k185mr13688974wme.144.1634733871635; Wed, 20 Oct 2021 05:44:31 -0700 (PDT) Received: from localhost ([185.112.167.53]) by smtp.gmail.com with ESMTPSA id e9sm1933448wrn.2.2021.10.20.05.44.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 05:44:31 -0700 (PDT) From: =?utf-8?b?xaB0xJtww6FuIE7Em21lYw==?= To: netfilter-devel@vger.kernel.org, Pablo Neira Ayuso Subject: [PATCH nft 2/3] tests: shell: README: $NFT does not have to be a path to a binary Date: Wed, 20 Oct 2021 14:45:11 +0200 Message-Id: <20211020124512.490288-2-snemec@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211020124512.490288-1-snemec@redhat.com> References: <20211020124512.490288-1-snemec@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Fixes: 7c8a44b25c22 ("tests: shell: Allow wrappers to be passed as nft command") Signed-off-by: Štěpán Němec --- tests/shell/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/shell/README b/tests/shell/README index 35f6e3785f0e..4dd595d99556 100644 --- a/tests/shell/README +++ b/tests/shell/README @@ -21,7 +21,7 @@ And generate missing dump files with: Before each test file invocation, `nft flush ruleset' will be called. Also, test file process environment will include the variable $NFT -which contains the path to the nft binary being tested. +which contains the nft command being tested. You can pass an arbitrary $NFT value as well: # NFT=/usr/local/sbin/nft ./run-tests.sh From patchwork Wed Oct 20 12:45:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xaB0xJtww6FuIE7Em21lYw==?= X-Patchwork-Id: 1543873 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=TUJI4NBh; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HZ9Kz4QkGz9sNH for ; Wed, 20 Oct 2021 23:44:39 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230213AbhJTMqv (ORCPT ); Wed, 20 Oct 2021 08:46:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36362 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229941AbhJTMqu (ORCPT ); Wed, 20 Oct 2021 08:46:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634733875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yoVEqs0X+chOaruAr+WaBrmtXAzBeR0cIkgLtd+1h2U=; b=TUJI4NBhoVYIeWG5J29FYxRRcwfkE2THjlKwLsvnP0D8vTio4p2m7st7g3DPLd6E/MhNaj jzv4F5h+UFsO9Dx3iubeSvFh6N+WvR9DPe2/V7dytiO/PGx8U1bEikk5ycZ4ND7GPbz2+L B3T42ClG5lMWTPiHWkZUAqhFuRrsN3c= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-481-kSkmJObiO7SW0qEirhwbpA-1; Wed, 20 Oct 2021 08:44:34 -0400 X-MC-Unique: kSkmJObiO7SW0qEirhwbpA-1 Received: by mail-wm1-f69.google.com with SMTP id f20-20020a05600c155400b0030db7b29174so3124733wmg.2 for ; Wed, 20 Oct 2021 05:44:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yoVEqs0X+chOaruAr+WaBrmtXAzBeR0cIkgLtd+1h2U=; b=FbvSxhCyEzQxx3jOOMcKVSEJ0H91iZslhypBB79qdqjcqJPJaeRxrri7ss4e5/vX6y FVo84d19KfCweYJHW3eZtpHj1Icre/MVcvdjfV9FBvGB2HoG9VLQsPZ1G6fqgc70ueb0 U0NzdqpyggigGuz2/hFzkmTOhvkll8EI0GMBTCJ6mtJ+m3H0r4Wmo8wNoy9iPcI4tjzK BxTFFyAUt6xoS5UsAZjarDbUgjq7fx0NS7g4z0oxBazo5Q6Ps5iauvG4V3fB3egEgwbL YQxIqbqpABeCMsB3IkTbmWXqqvBCpKy46TjbIVhQjpRrvab1deJ13T4a5C8TODXjUIyD U4GA== X-Gm-Message-State: AOAM530oMizrtspdr1L2Yj91d7GLnmC4sHAkbXfvykvIJcPY+1FhqKgX 8c8D1LyHEwtC3hBGtApXKOoOIoOSrcUBNwf6Bei+5CWdN2Bi/skiaeFEUsnIG7oeCykWsE7/aTa qRW4uXVwf20hAIJbQ4bMg24bSCYls7p6yIqUl3mTP6ZpYoK+sNw63K6JJilSyS5eKWp6PhqVAsy gNHw== X-Received: by 2002:a5d:6da9:: with SMTP id u9mr53430861wrs.84.1634733872829; Wed, 20 Oct 2021 05:44:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzC8w5Xtqp4tnTJn6TZ3nlmxK3CxGMDsatWEuJGk9Xbc3siXQQKW0pUOaL8TL8k6EmueA7pBQ== X-Received: by 2002:a5d:6da9:: with SMTP id u9mr53430838wrs.84.1634733872615; Wed, 20 Oct 2021 05:44:32 -0700 (PDT) Received: from localhost ([185.112.167.53]) by smtp.gmail.com with ESMTPSA id n12sm2211274wms.27.2021.10.20.05.44.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 05:44:32 -0700 (PDT) From: =?utf-8?b?xaB0xJtww6FuIE7Em21lYw==?= To: netfilter-devel@vger.kernel.org, Pablo Neira Ayuso Subject: [PATCH nft 3/3] tests: shell: README: clarify test file name convention Date: Wed, 20 Oct 2021 14:45:12 +0200 Message-Id: <20211020124512.490288-3-snemec@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211020124512.490288-1-snemec@redhat.com> References: <20211020124512.490288-1-snemec@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Fixes: 4d26b6dd3c4c ("tests: shell: change all test scripts to return 0") Signed-off-by: Štěpán Němec --- tests/shell/README | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/shell/README b/tests/shell/README index 4dd595d99556..07d5cc2e3e7c 100644 --- a/tests/shell/README +++ b/tests/shell/README @@ -10,8 +10,12 @@ To run the test suite (as root): # ./run-tests.sh Test files are executable files matching the pattern <>, -where N is the expected return code of the executable. Since they -are located with `find', test files can be put in any subdirectory. +where N used to be the expected return code of the executable. +(After commit 4d26b6dd3c4c, all tests should return 0 on success, +no matter the test file name.) + +Since they are located with `find', test files can be put in any +subdirectory. You can turn on a verbose execution by calling: # ./run-tests.sh -v