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