Blame SOURCES/0028-test-nm-reload-only-consider-NM-connections-with-a-r.patch

19026f
From 1a2c50e5cf165a5392764ff435b7183a6d6610a7 Mon Sep 17 00:00:00 2001
19026f
From: Eric Garver <eric@garver.life>
19026f
Date: Tue, 27 Apr 2021 09:06:22 -0400
19026f
Subject: [PATCH 28/30] test(nm): reload: only consider NM connections with a
19026f
 real interface
19026f
19026f
Coverage: rhbz 1928860
19026f
(cherry picked from commit 7566d3dc5664955064b14314b3d3ef20bcebd6e4)
19026f
(cherry picked from commit e936e005898e18caa628b5b61d7589c2bbc461cb)
19026f
---
19026f
 src/tests/Makefile.am                   |  4 ++--
19026f
 src/tests/integration/networkmanager.at |  1 +
19026f
 src/tests/integration/rhbz1928860.at    | 26 +++++++++++++++++++++++++
19026f
 3 files changed, 29 insertions(+), 2 deletions(-)
19026f
 create mode 100644 src/tests/integration/rhbz1928860.at
19026f
19026f
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
19026f
index b7556b30ecc8..e936454faf6a 100644
19026f
--- a/src/tests/Makefile.am
19026f
+++ b/src/tests/Makefile.am
19026f
@@ -71,7 +71,7 @@ check-container-fedora-rawhide-image: check-container-%-image:
19026f
 	                 iptables iptables-nft libtool libxml2 libxslt make nftables \
19026f
 	                 python3-nftables python3-slip-dbus python3-gobject-base \
19026f
 	                 diffutils procps-ng iproute which dbus-daemon \
19026f
-	                 NetworkManager" && \
19026f
+	                 NetworkManager NetworkManager-ovs" && \
19026f
 	echo "RUN alternatives --set ebtables /usr/sbin/ebtables-nft" && \
19026f
 	echo "COPY . /tmp/firewalld"; \
19026f
 	} | $(PODMAN) build -t firewalld-testsuite-$* -f - . )
19026f
@@ -86,7 +86,7 @@ check-container-centos8-stream-image: check-container-%-image:
19026f
 	                 iptables iptables-ebtables nftables libtool libxml2 \
19026f
 	                 libxslt make nftables python3-nftables python3-slip-dbus \
19026f
 	                 python3-gobject-base diffutils procps-ng iproute which dbus-daemon \
19026f
-	                 NetworkManager" && \
19026f
+	                 NetworkManager NetworkManager-ovs" && \
19026f
 	echo "COPY . /tmp/firewalld"; \
19026f
 	} | $(PODMAN) build -t firewalld-testsuite-$* -f - . )
19026f
 
19026f
diff --git a/src/tests/integration/networkmanager.at b/src/tests/integration/networkmanager.at
19026f
index 08cf6d28451a..0b20adce0462 100644
19026f
--- a/src/tests/integration/networkmanager.at
19026f
+++ b/src/tests/integration/networkmanager.at
19026f
@@ -1,2 +1,3 @@
19026f
 AT_BANNER([NetworkManager (FIREWALL_BACKEND)])
19026f
 m4_include([integration/rhbz1773809.at])
19026f
+m4_include([integration/rhbz1928860.at])
19026f
diff --git a/src/tests/integration/rhbz1928860.at b/src/tests/integration/rhbz1928860.at
19026f
new file mode 100644
19026f
index 000000000000..8ef2a1dcbd01
19026f
--- /dev/null
19026f
+++ b/src/tests/integration/rhbz1928860.at
19026f
@@ -0,0 +1,26 @@
19026f
+FWD_START_TEST([reload don't consider non IP capable interfaces])
19026f
+AT_KEYWORDS(reload rhbz1928860)
19026f
+
19026f
+START_NETWORKMANAGER
19026f
+
19026f
+dnl OVS bridge and port
19026f
+NMCLI_CHECK([connection add type ovs-bridge conn.interface ovs-br con-name ovs-br], 0, [ignore])
19026f
+NMCLI_CHECK([connection add type ovs-port conn.interface ovs-interface-port master ovs-br con-name ovs-interface-port], 0, [ignore])
19026f
+echo NS_CMD([nmcli connection delete ovs-br]) >> ./cleanup
19026f
+echo NS_CMD([nmcli connection delete ovs-interface-port]) >> ./cleanup
19026f
+
19026f
+dnl Up them
19026f
+NMCLI_CHECK([connection up ovs-br], 0, [ignore])
19026f
+NMCLI_CHECK([connection up ovs-interface-port], 0, [ignore])
19026f
+
19026f
+dnl Omit the actual linux interface because it requires the OVS daemon to be
19026f
+dnl running. The bug is reproducible without it.
19026f
+dnl 
19026f
+dnl NMCLI_CHECK([connection add type ovs-interface slave-type ovs-port conn.interface ovs-br master ovs-interface-port con-name ovs-interface ipv4.method disabled ipv6.method disabled], 0, [ignore])
19026f
+dnl echo NS_CMD([nmcli connection delete ovs-interface]) >> ./cleanup
19026f
+dnl NMCLI_CHECK([connection up ovs-interface], 0, [ignore])
19026f
+
19026f
+dnl just need to verify reload
19026f
+FWD_RELOAD
19026f
+
19026f
+FWD_END_TEST
19026f
-- 
19026f
2.27.0
19026f