File: test-ISCSI-make-acpitable-file-a-parameter-of-run_client.patch

package info (click to toggle)
dracut 106-6
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 4,708 kB
  • sloc: sh: 24,384; ansic: 4,704; makefile: 315; perl: 186; python: 28; javascript: 19
file content (65 lines) | stat: -rw-r--r-- 2,239 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
From: Benjamin Drung <benjamin.drung@canonical.com>
Date: Mon, 10 Feb 2025 10:43:29 +0100
Subject: test(ISCSI): make acpitable file a parameter of run_client

The ACPI table only needs to be set for one of the iSCSI test cases.

Forwarded: https://github.com/dracut-ng/dracut-ng/pull/1216
---
 test/TEST-70-ISCSI/test.sh | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/test/TEST-70-ISCSI/test.sh b/test/TEST-70-ISCSI/test.sh
index 4f54c88..6af7094 100755
--- a/test/TEST-70-ISCSI/test.sh
+++ b/test/TEST-70-ISCSI/test.sh
@@ -40,7 +40,8 @@ run_server() {
 
 run_client() {
     local test_name=$1
-    shift
+    local acpitable_file=$2
+    shift 2
     echo "CLIENT TEST START: $test_name"
 
     declare -a disk_args=()
@@ -53,7 +54,7 @@ run_client() {
         -net nic,macaddr=52:54:00:12:34:00,model=virtio \
         -net nic,macaddr=52:54:00:12:34:01,model=virtio \
         -net socket,connect=127.0.0.1:12330 \
-        -acpitable file=ibft.table \
+        ${acpitable_file:+-acpitable "file=${acpitable_file}"} \
         -append "$TEST_KERNEL_CMDLINE $*" \
         -initrd "$TESTDIR"/initramfs.testing
 
@@ -70,18 +71,18 @@ run_client() {
 do_test_run() {
     initiator=$(iscsi-iname)
 
-    run_client "root=dhcp" \
+    run_client "root=dhcp" "" \
         "root=/dev/root netroot=dhcp ip=enp0s1:dhcp" \
         "rd.iscsi.initiator=$initiator" \
         || return 1
 
-    run_client "netroot=iscsi target0" \
+    run_client "netroot=iscsi target0" "" \
         "root=LABEL=singleroot netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0" \
         "ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:enp0s1:off" \
         "rd.iscsi.initiator=$initiator" \
         || return 1
 
-    run_client "netroot=iscsi target1 target2" \
+    run_client "netroot=iscsi target1 target2" "" \
         "root=LABEL=sysroot" \
         "ip=dhcp" \
         "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
@@ -89,7 +90,7 @@ do_test_run() {
         "rd.iscsi.initiator=$initiator" \
         || return 1
 
-    run_client "root=ibft" \
+    run_client "root=ibft" "ibft.table" \
         "root=LABEL=singleroot" \
         "rd.iscsi.ibft=1" \
         "rd.iscsi.firmware=1" \