961b04
From 436135496469ec24be1fc6fbc03a39d2575c8686 Mon Sep 17 00:00:00 2001
961b04
From: Frantisek Sumsal <frantisek@sumsal.cz>
961b04
Date: Sat, 13 Nov 2021 17:55:45 +0100
961b04
Subject: [PATCH] ci: backport TEST-21-NFS-NM
961b04
961b04
Loosely cherry-picked from a3f73298f287e75810d6784efa52e80af15da2bd.
961b04
961b04
rhel-only
961b04
---
961b04
 .github/workflows/integration.yml |  3 +--
961b04
 test/TEST-20-NFS/test.sh          | 14 +++++++++++---
961b04
 test/TEST-21-NFS-NM/Makefile      | 12 ++++++++++++
961b04
 3 files changed, 24 insertions(+), 5 deletions(-)
961b04
961b04
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
961b04
index 80a856a2..9c7c8486 100644
961b04
--- a/.github/workflows/integration.yml
961b04
+++ b/.github/workflows/integration.yml
961b04
@@ -29,9 +29,8 @@ jobs:
961b04
                         "13",
961b04
                         "17",
961b04
                         "20",
961b04
-                        #"21", needs backport (NFS + NM)
961b04
+                        "21",
961b04
                         "40",
961b04
-                        #"41", needws backport (NBD + NM)
961b04
                         "98",
961b04
                 ]
961b04
             fail-fast: false
961b04
diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh
961b04
index 4ad7fd77..320f9c3e 100755
961b04
--- a/test/TEST-20-NFS/test.sh
961b04
+++ b/test/TEST-20-NFS/test.sh
961b04
@@ -1,5 +1,13 @@
961b04
 #!/bin/bash
961b04
-TEST_DESCRIPTION="root filesystem on NFS"
961b04
+if [[ $NM ]]; then
961b04
+    USE_NETWORK="network-manager"
961b04
+    OMIT_NETWORK="network-legacy"
961b04
+else
961b04
+    USE_NETWORK="network-legacy"
961b04
+    OMIT_NETWORK="network-manager"
961b04
+fi
961b04
+
961b04
+TEST_DESCRIPTION="root filesystem on NFS with $USE_NETWORK"
961b04
 
961b04
 KVERSION=${KVERSION-$(uname -r)}
961b04
 
961b04
@@ -353,8 +361,8 @@ test_setup() {
961b04
 
961b04
     # Make client's dracut image
961b04
     $basedir/dracut.sh -l -i $TESTDIR/overlay / \
961b04
-        -o "plymouth dash" \
961b04
-        -a "debug watchdog" \
961b04
+        -o "plymouth dash ${OMIT_NETWORK}" \
961b04
+        -a "debug watchdog ${USE_NETWORK}" \
961b04
         -d "af_packet piix ide-gd_mod ata_piix sd_mod e1000 nfs sunrpc i6300esb" \
961b04
         --no-hostonly-cmdline -N \
961b04
         -f $TESTDIR/initramfs.testing $KVERSION || return 1
961b04
diff --git a/test/TEST-21-NFS-NM/Makefile b/test/TEST-21-NFS-NM/Makefile
961b04
new file mode 100644
961b04
index 00000000..b19122a1
961b04
--- /dev/null
961b04
+++ b/test/TEST-21-NFS-NM/Makefile
961b04
@@ -0,0 +1,12 @@
961b04
+.PHONY: all setup clean run
961b04
+
961b04
+BASETEST=../TEST-20-NFS
961b04
+
961b04
+all:
961b04
+	@$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) all
961b04
+setup:
961b04
+	@$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) setup
961b04
+clean:
961b04
+	@$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) clean
961b04
+run:
961b04
+	@$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) run
961b04