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

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