iptables-1.8.5-7.el8
- Fix shell test-case for older gawk version Related: rhbz#2211063
This commit is contained in:
parent
b55d619176
commit
f2c0881713
@ -0,0 +1,34 @@
|
|||||||
|
From e34d23b5a95801b93550a451b0da0b28221acfd5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Phil Sutter <phil@nwl.cc>
|
||||||
|
Date: Wed, 19 Jul 2023 14:58:11 +0200
|
||||||
|
Subject: [PATCH] tests: shell: Sanitize nft-only/0009-needless-bitwise_0
|
||||||
|
|
||||||
|
Some versions of awk (gawk-4.2.1-4.el8 in particular) also print the
|
||||||
|
non-debug ruleset listing's empty lines, causing the diff to fail. Catch
|
||||||
|
this by exiting upon seeing the first table heading. For the sake of
|
||||||
|
comparing bytecode, the actual ruleset listing is not interesting,
|
||||||
|
anyway.
|
||||||
|
|
||||||
|
Fixes: 0f7ea0390b336 ("tests/shell: Fix nft-only/0009-needless-bitwise_0")
|
||||||
|
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
||||||
|
(cherry picked from commit 2746726e03d9017d4c940a247590f8d5c5d5a73e)
|
||||||
|
---
|
||||||
|
iptables/tests/shell/testcases/nft-only/0009-needless-bitwise_0 | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/iptables/tests/shell/testcases/nft-only/0009-needless-bitwise_0 b/iptables/tests/shell/testcases/nft-only/0009-needless-bitwise_0
|
||||||
|
index 41588a10863ec..34802cc26aad4 100755
|
||||||
|
--- a/iptables/tests/shell/testcases/nft-only/0009-needless-bitwise_0
|
||||||
|
+++ b/iptables/tests/shell/testcases/nft-only/0009-needless-bitwise_0
|
||||||
|
@@ -340,7 +340,7 @@ bridge filter OUTPUT 10 9
|
||||||
|
# - lines with bytecode (starting with ' [')
|
||||||
|
# - empty lines (so printed diff is not a complete mess)
|
||||||
|
filter() {
|
||||||
|
- awk '/^( \[|$)/{print}'
|
||||||
|
+ awk '/^table /{exit} /^( \[|$)/{print}'
|
||||||
|
}
|
||||||
|
|
||||||
|
diff -u -Z <(filter <<< "$EXPECT") <(nft --debug=netlink list ruleset | filter)
|
||||||
|
--
|
||||||
|
2.40.0
|
||||||
|
|
@ -10,7 +10,7 @@ Name: iptables
|
|||||||
Summary: Tools for managing Linux kernel packet filtering capabilities
|
Summary: Tools for managing Linux kernel packet filtering capabilities
|
||||||
URL: http://www.netfilter.org/projects/iptables
|
URL: http://www.netfilter.org/projects/iptables
|
||||||
Version: 1.8.5
|
Version: 1.8.5
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
Source: %{url}/files/%{name}-%{version}.tar.bz2
|
Source: %{url}/files/%{name}-%{version}.tar.bz2
|
||||||
Source1: iptables.init
|
Source1: iptables.init
|
||||||
Source2: iptables-config
|
Source2: iptables-config
|
||||||
@ -162,6 +162,7 @@ Patch135: 0135-iptables-test.py-print-with-color-escapes-only-when-.patch
|
|||||||
Patch136: 0136-tests-iptables-test-Fix-conditional-colors-on-stderr.patch
|
Patch136: 0136-tests-iptables-test-Fix-conditional-colors-on-stderr.patch
|
||||||
Patch137: 0137-tests-shell-update-format-of-registers-in-bitwise-pa.patch
|
Patch137: 0137-tests-shell-update-format-of-registers-in-bitwise-pa.patch
|
||||||
Patch138: 0138-tests-shell-Fix-nft-only-0009-needless-bitwise_0.patch
|
Patch138: 0138-tests-shell-Fix-nft-only-0009-needless-bitwise_0.patch
|
||||||
|
Patch139: 0139-tests-shell-Sanitize-nft-only-0009-needless-bitwise_.patch
|
||||||
|
|
||||||
# pf.os: ISC license
|
# pf.os: ISC license
|
||||||
# iptables-apply: Artistic Licence 2.0
|
# iptables-apply: Artistic Licence 2.0
|
||||||
@ -534,6 +535,9 @@ done
|
|||||||
%doc %{_mandir}/man8/ebtables*.8*
|
%doc %{_mandir}/man8/ebtables*.8*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 19 2023 Phil Sutter <psutter@redhat.com> - 1.8.5-7
|
||||||
|
- Fix shell test-case for older gawk version
|
||||||
|
|
||||||
* Tue Jul 18 2023 Phil Sutter <psutter@redhat.com> - 1.8.5-6
|
* Tue Jul 18 2023 Phil Sutter <psutter@redhat.com> - 1.8.5-6
|
||||||
- Fix shell testcase for rebased libnftnl package
|
- Fix shell testcase for rebased libnftnl package
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user