From 9d5d7534b929f0be180606df919d1349b575b352 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 21 Sep 2018 13:45:55 +0200 Subject: [PATCH] dracut - 048-99.git20180921 - git snapshot --- 0013.patch | 1 + 0014.patch | 32 +++++ 0015.patch | 45 +++++++ 0016.patch | 34 +++++ 0017.patch | 43 ++++++ 0018.patch | 23 ++++ 0019.patch | 79 +++++++++++ 0020.patch | 70 ++++++++++ 0021.patch | 32 +++++ 0022.patch | 24 ++++ 0023.patch | 150 +++++++++++++++++++++ 0024.patch | 48 +++++++ 0025.patch | 32 +++++ 0026.patch | 231 ++++++++++++++++++++++++++++++++ 0027.patch | 23 ++++ 0028.patch | 34 +++++ 0029.patch | 23 ++++ 0030.patch | 338 +++++++++++++++++++++++++++++++++++++++++++++++ 0031.patch | 23 ++++ 0032.patch | 37 ++++++ 0033.patch | 21 +++ 0034.patch | 86 ++++++++++++ 0035.patch | 26 ++++ 0036.patch | 93 +++++++++++++ 0037.patch | 44 +++++++ 0038.patch | 23 ++++ 0039.patch | 51 ++++++++ 0040.patch | 67 ++++++++++ 0041.patch | 23 ++++ 0042.patch | 25 ++++ 0043.patch | 23 ++++ 0044.patch | 26 ++++ 0045.patch | 94 ++++++++++++++ 0046.patch | 94 ++++++++++++++ 0047.patch | 24 ++++ 0048.patch | 49 +++++++ 0049.patch | 52 ++++++++ 0050.patch | 32 +++++ 0051.patch | 46 +++++++ 0052.patch | 149 +++++++++++++++++++++ 0053.patch | 24 ++++ 0054.patch | 39 ++++++ 0055.patch | 26 ++++ 0056.patch | 22 ++++ 0057.patch | 38 ++++++ 0058.patch | 66 ++++++++++ 0059.patch | 55 ++++++++ 0060.patch | 30 +++++ 0061.patch | 23 ++++ 0062.patch | 65 ++++++++++ 0063.patch | 45 +++++++ 0064.patch | 23 ++++ 0065.patch | 50 +++++++ 0066.patch | 29 +++++ 0067.patch | 31 +++++ 0068.patch | 34 +++++ 0069.patch | 30 +++++ 0070.patch | 44 +++++++ 0071.patch | 41 ++++++ 0072.patch | 142 ++++++++++++++++++++ 0073.patch | 44 +++++++ 0074.patch | 42 ++++++ 0075.patch | 129 ++++++++++++++++++ 0076.patch | 361 +++++++++++++++++++++++++++++++++++++++++++++++++++ 0077.patch | 193 +++++++++++++++++++++++++++ 0078.patch | 29 +++++ 0079.patch | 24 ++++ 0080.patch | 35 +++++ 0081.patch | 106 +++++++++++++++ 0082.patch | 46 +++++++ 0083.patch | 88 +++++++++++++ 0084.patch | 72 ++++++++++ 0085.patch | 24 ++++ 0086.patch | 67 ++++++++++ 0087.patch | 32 +++++ 0088.patch | 24 ++++ 0089.patch | 349 +++++++++++++++++++++++++++++++++++++++++++++++++ 0090.patch | 43 ++++++ 0091.patch | 30 +++++ 0092.patch | 37 ++++++ 0093.patch | 29 +++++ 0094.patch | 27 ++++ 0095.patch | 23 ++++ 0096.patch | 287 ++++++++++++++++++++++++++++++++++++++++ 0097.patch | 133 +++++++++++++++++++ 0098.patch | 22 ++++ dracut.spec | 120 +++++++++++++++-- newdracut.sh | 2 +- 88 files changed, 5636 insertions(+), 9 deletions(-) create mode 100644 0014.patch create mode 100644 0015.patch create mode 100644 0016.patch create mode 100644 0017.patch create mode 100644 0018.patch create mode 100644 0019.patch create mode 100644 0020.patch create mode 100644 0021.patch create mode 100644 0022.patch create mode 100644 0023.patch create mode 100644 0024.patch create mode 100644 0025.patch create mode 100644 0026.patch create mode 100644 0027.patch create mode 100644 0028.patch create mode 100644 0029.patch create mode 100644 0030.patch create mode 100644 0031.patch create mode 100644 0032.patch create mode 100644 0033.patch create mode 100644 0034.patch create mode 100644 0035.patch create mode 100644 0036.patch create mode 100644 0037.patch create mode 100644 0038.patch create mode 100644 0039.patch create mode 100644 0040.patch create mode 100644 0041.patch create mode 100644 0042.patch create mode 100644 0043.patch create mode 100644 0044.patch create mode 100644 0045.patch create mode 100644 0046.patch create mode 100644 0047.patch create mode 100644 0048.patch create mode 100644 0049.patch create mode 100644 0050.patch create mode 100644 0051.patch create mode 100644 0052.patch create mode 100644 0053.patch create mode 100644 0054.patch create mode 100644 0055.patch create mode 100644 0056.patch create mode 100644 0057.patch create mode 100644 0058.patch create mode 100644 0059.patch create mode 100644 0060.patch create mode 100644 0061.patch create mode 100644 0062.patch create mode 100644 0063.patch create mode 100644 0064.patch create mode 100644 0065.patch create mode 100644 0066.patch create mode 100644 0067.patch create mode 100644 0068.patch create mode 100644 0069.patch create mode 100644 0070.patch create mode 100644 0071.patch create mode 100644 0072.patch create mode 100644 0073.patch create mode 100644 0074.patch create mode 100644 0075.patch create mode 100644 0076.patch create mode 100644 0077.patch create mode 100644 0078.patch create mode 100644 0079.patch create mode 100644 0080.patch create mode 100644 0081.patch create mode 100644 0082.patch create mode 100644 0083.patch create mode 100644 0084.patch create mode 100644 0085.patch create mode 100644 0086.patch create mode 100644 0087.patch create mode 100644 0088.patch create mode 100644 0089.patch create mode 100644 0090.patch create mode 100644 0091.patch create mode 100644 0092.patch create mode 100644 0093.patch create mode 100644 0094.patch create mode 100644 0095.patch create mode 100644 0096.patch create mode 100644 0097.patch create mode 100644 0098.patch diff --git a/0013.patch b/0013.patch index 129d24c..05d76aa 100644 --- a/0013.patch +++ b/0013.patch @@ -58,3 +58,4 @@ index 754ed3c9..9b9d497a 100644 %{dracutlibdir}/dracut.conf.d/02-rescue.conf %if 0%{?fedora} || 0%{?rhel} %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install + diff --git a/0014.patch b/0014.patch new file mode 100644 index 0000000..2f8ea48 --- /dev/null +++ b/0014.patch @@ -0,0 +1,32 @@ +From 33782aebbffa005415e1a03deeae837d8cf5665e Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Mon, 30 Jul 2018 02:26:01 +0900 +Subject: [PATCH] spec: warpclock is not available on s390 or s390x + +--- + dracut.spec | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/dracut.spec b/dracut.spec +index 9b9d497a..ce69fa1f 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -224,6 +224,7 @@ rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity + + %ifnarch s390 s390x + # remove architecture specific modules ++rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00warpclock + rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/80cms + rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/81cio_ignore + rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/91zipl +@@ -316,7 +317,9 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne + %endif + %{dracutlibdir}/modules.d/00bash + %{dracutlibdir}/modules.d/00systemd ++%ifnarch s390 s390x + %{dracutlibdir}/modules.d/00warpclock ++%endif + %{dracutlibdir}/modules.d/01systemd-initrd + %{dracutlibdir}/modules.d/03modsign + %{dracutlibdir}/modules.d/03rescue + diff --git a/0015.patch b/0015.patch new file mode 100644 index 0000000..25b6599 --- /dev/null +++ b/0015.patch @@ -0,0 +1,45 @@ +From be98291cafa1080ed18a976c6452ae2be1c7c747 Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Mon, 30 Jul 2018 02:26:48 +0900 +Subject: [PATCH] spec: sort modules + +Also drops remaining %defattr. +--- + dracut.spec | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/dracut.spec b/dracut.spec +index ce69fa1f..d24c6f36 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -320,6 +320,9 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne + %ifnarch s390 s390x + %{dracutlibdir}/modules.d/00warpclock + %endif ++%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} ++%{dracutlibdir}/modules.d/01fips ++%endif + %{dracutlibdir}/modules.d/01systemd-initrd + %{dracutlibdir}/modules.d/03modsign + %{dracutlibdir}/modules.d/03rescue +@@ -403,11 +406,6 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne + %{_prefix}/lib/kernel/install.d/50-dracut.install + %endif + +-%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} +-%defattr(-,root,root,0755) +-%{dracutlibdir}/modules.d/01fips +-%endif +- + %files network + %{dracutlibdir}/modules.d/02systemd-networkd + %{dracutlibdir}/modules.d/40network +@@ -436,7 +434,6 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne + %{dracutlibdir}/modules.d/90livenet + + %files tools +- + %if %{with doc} + %doc %{_mandir}/man8/dracut-catimages.8* + %endif + diff --git a/0016.patch b/0016.patch new file mode 100644 index 0000000..7b6e41d --- /dev/null +++ b/0016.patch @@ -0,0 +1,34 @@ +From 99df3d22be14690260371311086a439c83fdc6b4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 2 Aug 2018 16:32:41 +0200 +Subject: [PATCH] mdraid/parse-md.sh: also accept rd.md.uuid with ":" + +convert rd.md.uuid=32ef2172:f056:6fa7:66a8:2f7fc8b1798 +to udev rules in the correct UUID format 32ef2172-f056-6fa7-66a8-2f7fcf8b1798 +--- + modules.d/90mdraid/parse-md.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules.d/90mdraid/parse-md.sh b/modules.d/90mdraid/parse-md.sh +index c422b24e..428f9515 100755 +--- a/modules.d/90mdraid/parse-md.sh ++++ b/modules.d/90mdraid/parse-md.sh +@@ -14,6 +14,9 @@ else + if [ "${line%%UUID CHECK}" != "$line" ]; then + printf 'IMPORT{program}="/sbin/mdadm --examine --export $tempnode"\n' + for uuid in $MD_UUID; do ++ uuid=$(str_replace "$uuid" "-" "") ++ uuid=$(str_replace "$uuid" ":" "") ++ uuid="$(expr substr $uuid 1 8)-$(expr substr $uuid 9 4)-$(expr substr $uuid 13 4)-$(expr substr $uuid 17 4)-$(expr substr $uuid 21 12)" + printf 'ENV{MD_UUID}=="%s", GOTO="md_uuid_ok"\n' $uuid + printf 'ENV{ID_FS_UUID}=="%s", GOTO="md_uuid_ok"\n' $uuid + done; +@@ -29,6 +32,7 @@ else + if strstr "$uuid" "-"; then + # convert ID_FS_UUID to MD_UUID format + uuid=$(str_replace "$uuid" "-" "") ++ uuid=$(str_replace "$uuid" ":" "") + uuid="$(expr substr $uuid 1 8):$(expr substr $uuid 9 8):$(expr substr $uuid 17 8):$(expr substr $uuid 25 8)" + fi + wait_for_dev "/dev/disk/by-id/md-uuid-${uuid}" + diff --git a/0017.patch b/0017.patch new file mode 100644 index 0000000..1e9e238 --- /dev/null +++ b/0017.patch @@ -0,0 +1,43 @@ +From a0c915b1e4585ccf286dd38a5cd7d8b89e0346c5 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Fri, 3 Aug 2018 23:39:51 +0200 +Subject: [PATCH] Add gpio and pinctrl drivers for arm*/aarch64 + +This is needed since few gpio/pinctrl can be built as modules and are +useful on early boot. + +One example is jetson-tx1 where sata and external mmc can work only +after loading pinctrl-max77620 and gpio-max77620 modules. + +Having theses kind of drivers bundled into the initramfs will also +avoid some deferred probes. + +V2: add pinctrl for all arches + +Signed-off-by: Nicolas Chauvet +--- + modules.d/90kernel-modules/module-setup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index 89b33ce6..f01470e7 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -25,7 +25,7 @@ installkernel() { + ohci-hcd ohci-pci \ + uhci-hcd \ + xhci-hcd xhci-pci xhci-plat-hcd \ +- pinctrl-cherryview \ ++ "=drivers/pinctrl" \ + ${NULL} + + hostonly=$(optional_hostonly) instmods \ +@@ -50,6 +50,7 @@ installkernel() { + "=drivers/clk" \ + "=drivers/dma" \ + "=drivers/extcon" \ ++ "=drivers/gpio" \ + "=drivers/hwspinlock" \ + "=drivers/i2c/busses" \ + "=drivers/mfd" \ + diff --git a/0018.patch b/0018.patch new file mode 100644 index 0000000..2627700 --- /dev/null +++ b/0018.patch @@ -0,0 +1,23 @@ +From a762dedb60aef8f43a625e1e3c10c97664f1d74a Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 9 Aug 2018 12:14:20 +0200 +Subject: [PATCH] dracut-functions: fix the word splitting + +--- + dracut-functions.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 7c408f83..1431dd18 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -683,7 +683,7 @@ get_loaded_kernel_modules () + local modules=( ) + while read _module _size _used _used_by; do + modules+=( "$_module" ) +- done <<< $(lsmod | sed -n '1!p') ++ done <<< "$(lsmod | sed -n '1!p')" + printf '%s\n' "${modules[@]}" | sort + } + + diff --git a/0019.patch b/0019.patch new file mode 100644 index 0000000..2b299e8 --- /dev/null +++ b/0019.patch @@ -0,0 +1,79 @@ +From 746135dd1ebc8dc7e26132bfa14ac159db7b2b95 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 13 Aug 2018 10:01:36 +0200 +Subject: [PATCH] mdraid: better handling of various UUID formats + +--- + modules.d/90mdraid/mdraid_start.sh | 4 ++++ + modules.d/90mdraid/parse-md.sh | 19 ++++++++----------- + 2 files changed, 12 insertions(+), 11 deletions(-) + +diff --git a/modules.d/90mdraid/mdraid_start.sh b/modules.d/90mdraid/mdraid_start.sh +index 2f5daff1..77e843d7 100755 +--- a/modules.d/90mdraid/mdraid_start.sh ++++ b/modules.d/90mdraid/mdraid_start.sh +@@ -39,6 +39,9 @@ _md_force_run() { + _offroot=$(strstr "$(mdadm --help-options 2>&1)" offroot && echo --offroot) + + if [ -n "$_MD_UUID" ]; then ++ _MD_UUID=$(str_replace "$_MD_UUID" "-" "") ++ _MD_UUID=$(str_replace "$_MD_UUID" ":" "") ++ + for _md in /dev/md[0-9_]*; do + [ -b "$_md" ] || continue + _UUID=$( +@@ -50,6 +53,7 @@ _md_force_run() { + ) + + [ -z "$_UUID" ] && continue ++ _UUID=$(str_replace "$_UUID" ":" "") + + # check if we should handle this device + strstr " $_MD_UUID " " $_UUID " || continue +diff --git a/modules.d/90mdraid/parse-md.sh b/modules.d/90mdraid/parse-md.sh +index 428f9515..4d9baa52 100755 +--- a/modules.d/90mdraid/parse-md.sh ++++ b/modules.d/90mdraid/parse-md.sh +@@ -1,6 +1,9 @@ + #!/bin/sh + + MD_UUID=$(getargs rd.md.uuid -d rd_MD_UUID=) ++# normalize the uuid ++MD_UUID=$(str_replace "$MD_UUID" "-" "") ++MD_UUID=$(str_replace "$MD_UUID" ":" "") + + if ( ! [ -n "$MD_UUID" ] && ! getargbool 0 rd.auto ) || ! getargbool 1 rd.md -d -n rd_NO_MD; then + info "rd.md=0: removing MD RAID activation" +@@ -12,13 +15,12 @@ else + [ -e "$f" ] || continue + while read line || [ -n "$line" ]; do + if [ "${line%%UUID CHECK}" != "$line" ]; then ++ for uuid in $MD_UUID; do ++ printf 'ENV{ID_FS_UUID}=="%s", GOTO="md_uuid_ok"\n' "$(expr substr $uuid 1 8)-$(expr substr $uuid 9 4)-$(expr substr $uuid 13 4)-$(expr substr $uuid 17 4)-$(expr substr $uuid 21 12)" ++ done; + printf 'IMPORT{program}="/sbin/mdadm --examine --export $tempnode"\n' + for uuid in $MD_UUID; do +- uuid=$(str_replace "$uuid" "-" "") +- uuid=$(str_replace "$uuid" ":" "") +- uuid="$(expr substr $uuid 1 8)-$(expr substr $uuid 9 4)-$(expr substr $uuid 13 4)-$(expr substr $uuid 17 4)-$(expr substr $uuid 21 12)" +- printf 'ENV{MD_UUID}=="%s", GOTO="md_uuid_ok"\n' $uuid +- printf 'ENV{ID_FS_UUID}=="%s", GOTO="md_uuid_ok"\n' $uuid ++ printf 'ENV{MD_UUID}=="%s", GOTO="md_uuid_ok"\n' "$(expr substr $uuid 1 8):$(expr substr $uuid 9 8):$(expr substr $uuid 17 8):$(expr substr $uuid 25 8)" + done; + printf 'GOTO="md_end"\n' + printf 'LABEL="md_uuid_ok"\n' +@@ -29,12 +31,7 @@ else + mv "${f}.new" "$f" + done + for uuid in $MD_UUID; do +- if strstr "$uuid" "-"; then +- # convert ID_FS_UUID to MD_UUID format +- uuid=$(str_replace "$uuid" "-" "") +- uuid=$(str_replace "$uuid" ":" "") +- uuid="$(expr substr $uuid 1 8):$(expr substr $uuid 9 8):$(expr substr $uuid 17 8):$(expr substr $uuid 25 8)" +- fi ++ uuid="$(expr substr $uuid 1 8):$(expr substr $uuid 9 8):$(expr substr $uuid 17 8):$(expr substr $uuid 25 8)" + wait_for_dev "/dev/disk/by-id/md-uuid-${uuid}" + done + fi + diff --git a/0020.patch b/0020.patch new file mode 100644 index 0000000..25ea3d5 --- /dev/null +++ b/0020.patch @@ -0,0 +1,70 @@ +From 6f0500ed4afa29ae8edc997933d598bc5862b4ce Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 13 Aug 2018 10:56:53 +0200 +Subject: [PATCH] iscsi: remove $() where it does not fit + +also simplify iscsiadm command to one call +--- + modules.d/95iscsi/iscsiroot.sh | 33 ++++++++++++++++++--------------- + 1 file changed, 18 insertions(+), 15 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 5ac0ad9a..76c8b3fe 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -109,7 +109,7 @@ handle_netroot() + arg=$(getarg rd.iscsi.in.password -d iscsi_in_password=) + [ -n "$arg" ] && iscsi_in_password=$arg + for p in $(getargs rd.iscsi.param -d iscsi_param); do +- iscsi_param="$iscsi_param $p" ++ iscsi_param="$iscsi_param $p" + done + + parse_iscsi_root "$1" || return 1 +@@ -208,28 +208,31 @@ handle_netroot() + echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh + fi + +- ### ToDo: Upstream calls systemd-run - Shall we, do we have to port this? +- + targets=$(iscsiadm -m discovery -t st -p $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} | sed 's/^.*iqn/iqn/') + [ -z "$targets" ] && echo "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && exit 1 + + for target in $iscsi_target_name; do + case "$targets" in + *$target*) ++ EXTRA="" + if [ -n "$iscsi_iface_name" ]; then +- $(iscsiadm -m iface -I $iscsi_iface_name --op=new) +- [ -n "$iscsi_initiator" ] && $(iscsiadm -m iface -I $iscsi_iface_name --op=update --name=iface.initiatorname --value=$iscsi_initiator) +- [ -n "$iscsi_netdev_name" ] && $(iscsiadm -m iface -I $iscsi_iface_name --op=update --name=iface.net_ifacename --value=$iscsi_netdev_name) +- COMMAND="iscsiadm -m node -T $target -p $iscsi_target_ip${iscsi_target_port:+:$iscsi_target_port} -I $iscsi_iface_name --op=update" +- else +- COMMAND="iscsiadm -m node -T $target -p $iscsi_target_ip${iscsi_target_port:+:$iscsi_target_port} --op=update" ++ iscsiadm -m iface -I $iscsi_iface_name --op=new ++ EXTRA=" ${iscsi_netdev_name:+--name=iface.net_ifacename --value=$iscsi_netdev_name} " ++ EXTRA="$EXTRA ${iscsi_initiator:+--name=iface.initiatorname --value=$iscsi_initiator} " + fi +- $($COMMAND --name=node.startup --value=onboot) +- [ -n "$iscsi_username" ] && $($COMMAND --name=node.session.auth.username --value=$iscsi_username) +- [ -n "$iscsi_password" ] && $($COMMAND --name=node.session.auth.password --value=$iscsi_password) +- [ -n "$iscsi_in_username" ] && $($COMMAND --name=node.session.auth.username_in --value=$iscsi_in_username) +- [ -n "$iscsi_in_password" ] && $($COMMAND --name=node.session.auth.password_in --value=$iscsi_in_password) +- [ -n "$iscsi_param" ] && for param in $iscsi_param; do $($COMMAND --name=${param%=*} --value=${param#*=}); done ++ [ -n "$iscsi_param" ] && for param in $iscsi_param; do EXTRA="$EXTRA --name=${param%=*} --value=${param#*=}"; done ++ ++ iscsiadm -m node -T $target \ ++ ${iscsi_iface_name:+-I $iscsi_iface_name} \ ++ -p $iscsi_target_ip${iscsi_target_port:+:$iscsi_target_port} \ ++ --op=update \ ++ --name=node.startup --value=onboot \ ++ ${iscsi_username:+ --name=node.session.auth.username --value=$iscsi_username} \ ++ ${iscsi_password:+ --name=node.session.auth.password --value=$iscsi_password} \ ++ ${iscsi_in_username:+--name=node.session.auth.username_in --value=$iscsi_in_username} \ ++ ${iscsi_in_password:+--name=node.session.auth.password_in --value=$iscsi_in_password} \ ++ $EXTRA \ ++ $NULL + ;; + *) + ;; + diff --git a/0021.patch b/0021.patch new file mode 100644 index 0000000..e387044 --- /dev/null +++ b/0021.patch @@ -0,0 +1,32 @@ +From 0a80cda0ea1186bb3b384158aeda491443ae93ff Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 13 Aug 2018 11:30:03 +0200 +Subject: [PATCH] dracut.spec: remove warpclock from z-series, not the other + way round + +--- + dracut.spec | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dracut.spec b/dracut.spec +index d24c6f36..09c74478 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -224,7 +224,6 @@ rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity + + %ifnarch s390 s390x + # remove architecture specific modules +-rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00warpclock + rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/80cms + rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/81cio_ignore + rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/91zipl +@@ -236,6 +235,8 @@ rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95qeth_rules + rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95zfcp + rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95zfcp_rules + rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95znet ++%else ++rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00warpclock + %endif + + mkdir -p $RPM_BUILD_ROOT/boot/dracut + diff --git a/0022.patch b/0022.patch new file mode 100644 index 0000000..7d855ba --- /dev/null +++ b/0022.patch @@ -0,0 +1,24 @@ +From 26aea0299a7ec702972cbf8b5556731b762dcde9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 13 Aug 2018 11:37:44 +0200 +Subject: [PATCH] multipath-shutdown: fix shell syntax + +seems like a misplaced $() +--- + modules.d/90multipath/multipath-shutdown.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90multipath/multipath-shutdown.sh b/modules.d/90multipath/multipath-shutdown.sh +index 47e9990c..f160f45e 100755 +--- a/modules.d/90multipath/multipath-shutdown.sh ++++ b/modules.d/90multipath/multipath-shutdown.sh +@@ -1,7 +1,7 @@ + #!/bin/bash + + for i in $(multipath -l -v1); do +- if ! $(dmsetup table $i | sed -n '/.*queue_if_no_path.*/q1') ; then ++ if ! dmsetup table $i | sed -n '/.*queue_if_no_path.*/q1' ; then + dmsetup message $i 0 fail_if_no_path + fi + done + diff --git a/0023.patch b/0023.patch new file mode 100644 index 0000000..c776b02 --- /dev/null +++ b/0023.patch @@ -0,0 +1,150 @@ +From 6058b06b86ce1a505a640c78896eae32768077c1 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 13 Aug 2018 16:27:59 +0200 +Subject: [PATCH] test/{TEST-50-MULTINIC,TEST-70-BONDBRIDGETEAMVLAN}: use + qemu-3.0 syntax + +use qemu-3.0 syntax for network devices +--- + test/TEST-50-MULTINIC/test.sh | 20 +++++----- + test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh | 4 ++ + test/TEST-70-BONDBRIDGETEAMVLAN/test.sh | 53 ++++++++++++++------------ + 3 files changed, 43 insertions(+), 34 deletions(-) + +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index 7c108aa0..de40790f 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -51,15 +51,17 @@ client_test() { + fi + + $testdir/run-qemu -drive format=raw,index=0,media=disk,file="$TESTDIR"/client.img -m 512M -smp 2 -nographic \ +- -net socket,vlan=0,connect=127.0.0.1:12350 \ +- -net nic,vlan=0,macaddr=52:54:00:12:34:$mac1,model=e1000 \ +- -net nic,vlan=0,macaddr=52:54:00:12:34:$mac2,model=e1000 \ +- -net nic,vlan=0,macaddr=52:54:00:12:34:$mac3,model=e1000 \ +- -net nic,vlan=1,macaddr=52:54:00:12:34:98,model=e1000 \ +- -net nic,vlan=2,macaddr=52:54:00:12:34:99,model=e1000 \ +- -watchdog i6300esb -watchdog-action poweroff \ +- -no-reboot \ +- -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ ++ -net socket,connect=127.0.0.1:12350 \ ++ -net nic,macaddr=52:54:00:12:34:$mac1,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:$mac2,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \ ++ -netdev hubport,id=n1,hubid=1 \ ++ -netdev hubport,id=n2,hubid=2 \ ++ --device e1000,netdev=n1,mac=52:54:00:12:34:98 \ ++ -device e1000,netdev=n2,mac=52:54:00:12:34:99 \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -no-reboot \ ++ -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ + -initrd "$TESTDIR"/initramfs.testing + + { read OK; read IFACES; } < "$TESTDIR"/client.img +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh +index 562feae6..503ed9ed 100755 +--- a/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh +@@ -67,6 +67,10 @@ ip addr add 192.168.55.1/24 dev ens4.2 + ip addr add 192.168.56.1/24 dev ens4.3 + ip addr add 192.168.57.1/24 dev ens4.4 + linkup ens4 ++ip link set dev ens4.1 up ++ip link set dev ens4.2 up ++ip link set dev ens4.3 up ++ip link set dev ens4.4 up + ip link set dev eth2 name ens5 + ip addr add 192.168.51.1/24 dev ens5 + linkup ens5 +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +index 277bbd01..eadf09f1 100755 +--- a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +@@ -18,14 +18,14 @@ run_server() { + -hda "$TESTDIR"/server.ext3 \ + -m 512M -smp 2 \ + -display none \ +- -net socket,vlan=0,listen=127.0.0.1:12370 \ +- -net socket,vlan=1,listen=127.0.0.1:12371 \ +- -net socket,vlan=2,listen=127.0.0.1:12372 \ +- -net socket,vlan=3,listen=127.0.0.1:12373 \ +- -net nic,vlan=0,macaddr=52:54:01:12:34:56,model=e1000 \ +- -net nic,vlan=1,macaddr=52:54:01:12:34:57,model=e1000 \ +- -net nic,vlan=2,macaddr=52:54:01:12:34:58,model=e1000 \ +- -net nic,vlan=3,macaddr=52:54:01:12:34:59,model=e1000 \ ++ -netdev socket,id=n0,listen=127.0.0.1:12370 \ ++ -netdev socket,id=n1,listen=127.0.0.1:12371 \ ++ -netdev socket,id=n2,listen=127.0.0.1:12372 \ ++ -netdev socket,id=n3,listen=127.0.0.1:12373 \ ++ -device e1000,netdev=n0,mac=52:54:01:12:34:56 \ ++ -device e1000,netdev=n1,mac=52:54:01:12:34:57 \ ++ -device e1000,netdev=n2,mac=52:54:01:12:34:58 \ ++ -device e1000,netdev=n3,mac=52:54:01:12:34:59 \ + ${SERIAL:+-serial "$SERIAL"} \ + ${SERIAL:--serial file:"$TESTDIR"/server.log} \ + -watchdog i6300esb -watchdog-action poweroff \ +@@ -58,22 +58,25 @@ client_test() { + echo "Unable to make client sda image" 1>&2 + return 1 + fi ++ if [[ $do_vlan13 ]]; then ++ nic1=" -netdev socket,connect=127.0.0.1:12371,id=n1" ++ nic3=" -netdev socket,connect=127.0.0.1:12373,id=n3" ++ else ++ nic1=" -netdev hubport,id=n1,hubid=2" ++ nic3=" -netdev hubport,id=n3,hubid=3" ++ fi + + $testdir/run-qemu -hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \ +- -net socket,vlan=0,connect=127.0.0.1:12370 \ +- ${do_vlan13:+-net socket,vlan=1,connect=127.0.0.1:12371} \ +- -net socket,vlan=2,connect=127.0.0.1:12372 \ +- ${do_vlan13:+-net socket,vlan=3,connect=127.0.0.1:12373} \ +- -net nic,vlan=0,macaddr=52:54:00:12:34:01,model=e1000 \ +- -net nic,vlan=0,macaddr=52:54:00:12:34:02,model=e1000 \ +- -net nic,vlan=1,macaddr=52:54:00:12:34:03,model=e1000 \ +- -net nic,vlan=2,macaddr=52:54:00:12:34:04,model=e1000 \ +- -net nic,vlan=3,macaddr=52:54:00:12:34:05,model=e1000 \ ++ -netdev socket,connect=127.0.0.1:12370,id=s1 -netdev hubport,hubid=1,id=h1,netdev=s1 \ ++ -netdev hubport,hubid=1,id=h2 -device e1000,mac=52:54:00:12:34:01,netdev=h2 \ ++ -netdev hubport,hubid=1,id=h3 -device e1000,mac=52:54:00:12:34:02,netdev=h3 \ ++ $nic1 -device e1000,mac=52:54:00:12:34:03,netdev=n1 \ ++ -netdev socket,connect=127.0.0.1:12372,id=n2 -device e1000,mac=52:54:00:12:34:04,netdev=n2 \ ++ $nic3 -device e1000,mac=52:54:00:12:34:05,netdev=n3 \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ + -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ + -initrd "$TESTDIR"/initramfs.testing +- + { + read OK + if [[ "$OK" != "OK" ]]; then +@@ -113,19 +116,19 @@ test_client() { + client_test "Multiple VLAN" \ + "yes" \ + " +-vlan=vlan0001:ens4 +-vlan=vlan2:ens4 +-vlan=ens4.3:ens4 +-vlan=ens4.0004:ens4 ++vlan=vlan0001:ens5 ++vlan=vlan2:ens5 ++vlan=ens5.3:ens5 ++vlan=ens5.0004:ens5 + ip=ens3:dhcp + ip=192.168.54.101::192.168.54.1:24:test:vlan0001:none + ip=192.168.55.102::192.168.55.1:24:test:vlan2:none +-ip=192.168.56.103::192.168.56.1:24:test:ens4.3:none +-ip=192.168.57.104::192.168.57.1:24:test:ens4.0004:none ++ip=192.168.56.103::192.168.56.1:24:test:ens5.3:none ++ip=192.168.57.104::192.168.57.1:24:test:ens5.0004:none + rd.neednet=1 + root=nfs:192.168.50.1:/nfs/client bootdev=ens3 + " \ +- 'ens3 ens4.0004 ens4.3 vlan0001 vlan2 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens3 # Generated by dracut initrd NAME="ens3" DEVICE="ens3" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Ethernet /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4.0004 # Generated by dracut initrd NAME="ens4.0004" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.57.104" PREFIX="24" GATEWAY="192.168.57.1" TYPE=Vlan DEVICE="ens4.0004" VLAN=yes PHYSDEV="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4.3 # Generated by dracut initrd NAME="ens4.3" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.56.103" PREFIX="24" GATEWAY="192.168.56.1" TYPE=Vlan DEVICE="ens4.3" VLAN=yes PHYSDEV="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan0001 # Generated by dracut initrd NAME="vlan0001" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.54.101" PREFIX="24" GATEWAY="192.168.54.1" TYPE=Vlan DEVICE="vlan0001" VLAN=yes PHYSDEV="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan2 # Generated by dracut initrd NAME="vlan2" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.55.102" PREFIX="24" GATEWAY="192.168.55.1" TYPE=Vlan DEVICE="vlan2" VLAN=yes PHYSDEV="ens4" EOF ' \ ++ 'ens3 ens5.0004 ens5.3 vlan0001 vlan2 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens3 # Generated by dracut initrd NAME="ens3" DEVICE="ens3" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Ethernet /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5.0004 # Generated by dracut initrd NAME="ens5.0004" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.57.104" PREFIX="24" GATEWAY="192.168.57.1" TYPE=Vlan DEVICE="ens5.0004" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5.3 # Generated by dracut initrd NAME="ens5.3" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.56.103" PREFIX="24" GATEWAY="192.168.56.1" TYPE=Vlan DEVICE="ens5.3" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan0001 # Generated by dracut initrd NAME="vlan0001" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.54.101" PREFIX="24" GATEWAY="192.168.54.1" TYPE=Vlan DEVICE="vlan0001" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan2 # Generated by dracut initrd NAME="vlan2" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.55.102" PREFIX="24" GATEWAY="192.168.55.1" TYPE=Vlan DEVICE="vlan2" VLAN=yes PHYSDEV="ens5" EOF ' \ + || return 1 + + client_test "Multiple Bonds" \ + diff --git a/0024.patch b/0024.patch new file mode 100644 index 0000000..5660d8b --- /dev/null +++ b/0024.patch @@ -0,0 +1,48 @@ +From ab94a204e0cb22bcaa2b2863dee9ffb9f22e91c5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 11:03:11 +0200 +Subject: [PATCH] load modules earlier for iscsi via dhcp root-path + +--- + modules.d/95iscsi/parse-iscsiroot.sh | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index f884e684..7a64d888 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -90,19 +90,13 @@ if [ -n "$iscsi_firmware" ]; then + initqueue --unique --onetime --settled /sbin/iscsiroot online "iscsi:" "'$NEWROOT'" + fi + +-if [ -z "$netroot" ] || ! [ "${netroot%%:*}" = "iscsi" ]; then +- return 1 +-fi +- +-initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT" +- +-initqueue --onetime modprobe --all -b -q qla4xxx cxgb3i cxgb4i bnx2i be2iscsi qedi +- + # ISCSI actually supported? + if ! [ -e /sys/module/iscsi_tcp ]; then + modprobe -b -q iscsi_tcp || die "iscsiroot requested but kernel/initrd does not support iscsi" + fi + ++modprobe --all -b -q qla4xxx cxgb3i cxgb4i bnx2i be2iscsi ++ + if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; then + if ! getargbool 1 rd.neednet >/dev/null || ! getarg "ip="; then + initqueue --unique --onetime --settled /sbin/iscsiroot dummy "'$netroot'" "'$NEWROOT'" +@@ -141,6 +135,11 @@ if [ -z $iscsi_initiator ] && [ -f /sys/firmware/ibft/initiator/initiator-name ] + fi + fi + ++if [ -z "$netroot" ] || ! [ "${netroot%%:*}" = "iscsi" ]; then ++ return 1 ++fi ++ ++initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT" + + for nroot in $(getargs netroot); do + [ "${nroot%%:*}" = "iscsi" ] || continue + diff --git a/0025.patch b/0025.patch new file mode 100644 index 0000000..f2cbdcf --- /dev/null +++ b/0025.patch @@ -0,0 +1,32 @@ +From ffbd37d7844b96611506eb4631a3e4f3b5e74c86 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 11:03:48 +0200 +Subject: [PATCH] TEST-31-ISCSI-MULTI: use different port than TEST-30 + +--- + test/TEST-31-ISCSI-MULTI/test.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/TEST-31-ISCSI-MULTI/test.sh b/test/TEST-31-ISCSI-MULTI/test.sh +index 2f2b6ed5..c2f86ac8 100755 +--- a/test/TEST-31-ISCSI-MULTI/test.sh ++++ b/test/TEST-31-ISCSI-MULTI/test.sh +@@ -24,7 +24,7 @@ run_server() { + ${SERIAL:--serial file:"$TESTDIR"/server.log} \ + -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ + -net nic,macaddr=52:54:00:12:34:57,model=e1000 \ +- -net socket,listen=127.0.0.1:12330 \ ++ -net socket,listen=127.0.0.1:12331 \ + -no-reboot \ + -append "panic=1 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \ + -initrd $TESTDIR/initramfs.server \ +@@ -49,7 +49,7 @@ run_client() { + -m 512M -smp 2 -nographic \ + -net nic,macaddr=52:54:00:12:34:00,model=e1000 \ + -net nic,macaddr=52:54:00:12:34:01,model=e1000 \ +- -net socket,connect=127.0.0.1:12330 \ ++ -net socket,connect=127.0.0.1:12331 \ + -no-reboot \ + -append "panic=1 rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \ + -initrd $TESTDIR/initramfs.testing + diff --git a/0026.patch b/0026.patch new file mode 100644 index 0000000..d30bef7 --- /dev/null +++ b/0026.patch @@ -0,0 +1,231 @@ +From 82fe4ea0a5a745c920aa396775b9ebb52b4d2927 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 11:04:17 +0200 +Subject: [PATCH] enable parallel test suite + +$ time sudo make -j SKIP=14 V=2 check +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-13-ENC-RAID-LVM' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-40-NBD' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-04-FULL-SYSTEMD' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-12-RAID-DEG' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-15-BTRFSRAID' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-16-DMSQUASH' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-17-LVM-THIN' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-11-LVM' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-31-ISCSI-MULTI' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-20-NFS' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-99-RPM' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-02-SYSTEMD' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-30-ISCSI' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-01-BASIC' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-03-USR-MOUNT' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-70-BONDBRIDGETEAMVLAN' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-50-MULTINIC' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-10-RAID' +make[1]: Entering directory '/home/harald/git/dracut/test/TEST-18-LVM-ENC-LV' +TEST: root filesystem on an encrypted LVM PV on a degraded RAID-5 [STARTED] +TEST: root filesystem on NBD [STARTED] +TEST: root filesystem on NBD [SKIPPED] +TEST: Full systemd serialization/deserialization test with /usr mount [STARTED] +TEST: root filesystem on multiple device btrfs [STARTED] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-40-NBD' +TEST: root filesystem on a LiveCD dmsquash filesystem [STARTED] +TEST: root filesystem on a LiveCD dmsquash filesystem [SKIPPED] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-16-DMSQUASH' +TEST: root filesystem on LVM on encrypted partitions of a RAID-5 [STARTED] +TEST: root filesystem on LVM PV [STARTED] +TEST: rpm integrity after dracut and kernel install [STARTED] +TEST: root filesystem on NFS [STARTED] +TEST: root filesystem over iSCSI [STARTED] +TEST: root filesystem on LVM PV with thin pool [STARTED] +TEST: root filesystem over iSCSI [STARTED] +TEST: root filesystem on a ext3 filesystem [STARTED] +TEST: root filesystem on a ext3 filesystem [STARTED] +TEST: root filesystem on a btrfs filesystem with /usr subvolume [STARTED] +TEST: root filesystem on NFS with bridging/bonding/vlan [STARTED] +TEST: root filesystem on NFS with multiple nics [STARTED] +TEST: root filesystem on an encrypted LVM PV on a RAID-5 [STARTED] +TEST: root filesystem on LVM on encrypted partitions of a RAID-5 [STARTED] +TEST: root filesystem on LVM PV [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-11-LVM' +TEST: root filesystem on multiple device btrfs [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-15-BTRFSRAID' +TEST: root filesystem on LVM PV with thin pool [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-17-LVM-THIN' +TEST: root filesystem on a ext3 filesystem [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-02-SYSTEMD' +TEST: root filesystem on a btrfs filesystem with /usr subvolume [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-03-USR-MOUNT' +TEST: root filesystem on LVM on encrypted partitions of a RAID-5 [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-18-LVM-ENC-LV' +TEST: Full systemd serialization/deserialization test with /usr mount [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-04-FULL-SYSTEMD' +TEST: root filesystem on an encrypted LVM PV on a RAID-5 [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-10-RAID' +TEST: root filesystem on LVM on encrypted partitions of a RAID-5 [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-13-ENC-RAID-LVM' +TEST: root filesystem over iSCSI [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-30-ISCSI' +TEST: root filesystem on a ext3 filesystem [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-01-BASIC' +TEST: root filesystem over iSCSI [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-31-ISCSI-MULTI' +TEST: rpm integrity after dracut and kernel install [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-99-RPM' +TEST: root filesystem on NFS [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-20-NFS' +TEST: root filesystem on NFS with bridging/bonding/vlan [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-70-BONDBRIDGETEAMVLAN' +TEST: root filesystem on an encrypted LVM PV on a degraded RAID-5 [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-12-RAID-DEG' +TEST: root filesystem on NFS with multiple nics [OK] +make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-50-MULTINIC' + +real 9m3,969s +user 22m50,323s +sys 5m24,411s +--- + test/Makefile | 21 +++++++++-------- + test/test-functions | 68 ++++++++++++++++++++++++++++------------------------- + 2 files changed, 47 insertions(+), 42 deletions(-) + +diff --git a/test/Makefile b/test/Makefile +index eaa944fb..0b33660b 100644 +--- a/test/Makefile ++++ b/test/Makefile +@@ -1,15 +1,16 @@ +-.PHONY: all check clean ++.PHONY: all check clean $(wildcard TEST-??-*) + +-check: ++$(wildcard TEST-??-*): + @[ "$$EUID" == "0" ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; } +- @{ ret=0; \ +- for i in TEST-[0-9]*; do \ +- [ -d $$i ] || continue ; \ +- [ -f $$i/Makefile ] || continue ; \ +- if [ -n "$$TESTS" ]; then t=$${i##TEST-}; t=$${t%%-*}; [ "$${TESTS#*$$t*}" != "$$TESTS" ] || continue; fi; \ +- if [ -n "$$SKIP" ]; then t=$${i##TEST-}; t=$${t%%-*}; [ "$${SKIP#*$$t*}" != "$$SKIP" ] && continue; fi; \ +- $(MAKE) -C $$i all ; ret=$$((ret + $$?)); \ +- done; exit $$ret; } ++ @{ \ ++ [ -d $@ ] || exit 0; \ ++ [ -f $@/Makefile ] || exit 0; \ ++ if [ -n "$$TESTS" ]; then t=$${$@##TEST-}; t=$${t%%-*}; [ "$${TESTS#*$$t*}" != "$$TESTS" ] || exit 0; fi; \ ++ if [ -n "$$SKIP" ]; then t=$${$@##TEST-}; t=$${t%%-*}; [ "$${SKIP#*$$t*}" != "$$SKIP" ] && exit 0; fi; \ ++ $(MAKE) -C $@ all ; \ ++ } ++ ++check: $(wildcard TEST-??-*) + + clean: + @for i in TEST-[0-9]*; do \ +diff --git a/test/test-functions b/test/test-functions +index 2b8a4d26..57611ff5 100644 +--- a/test/test-functions ++++ b/test/test-functions +@@ -4,14 +4,14 @@ export PATH + + [[ -e .testdir ]] && . .testdir + if [[ -z "$TESTDIR" ]] || [[ ! -d "$TESTDIR" ]]; then +- TESTDIR=$(mktemp -d -p "/var/tmp" -t dracut-test.XXXXXX) ++ TESTDIR=$(mktemp -d -p "/var/tmp" -t dracut-test.XXXXXX) + fi + echo "TESTDIR=\"$TESTDIR\"" > .testdir + export TESTDIR + + command -v test_check &>/dev/null || test_check() { +- : +-} ++ : ++ } + + # terminal sequence to set color to a 'success' color (currently: green) + function SETCOLOR_SUCCESS() { echo -en '\033[0;32m'; } +@@ -22,6 +22,11 @@ function SETCOLOR_WARNING() { echo -en '\033[0;33m'; } + # terminal sequence to reset to the default color. + function SETCOLOR_NORMAL() { echo -en '\033[0;39m'; } + ++COLOR_SUCCESS='\033[0;32m' ++COLOR_FAILURE='\033[0;31m' ++COLOR_WARNING='\033[0;33m' ++COLOR_NORMAL='\033[0;39m' ++ + check_root() { + if (( $EUID != 0 )); then + SETCOLOR_FAILURE; echo "Tests must be run as root! Please use 'sudo'."; SETCOLOR_NORMAL +@@ -49,45 +54,44 @@ while (($# > 0)); do + exit $?;; + --all) + check_root +- echo -n "TEST: $TEST_DESCRIPTION "; + if ! test_check 2&>test.log ; then +- SETCOLOR_WARNING +- echo "[SKIPPED]" +- SETCOLOR_NORMAL ++ echo -e "TEST: $TEST_DESCRIPTION " $COLOR_WARNING "[SKIPPED]" $COLOR_NORMAL + exit 0; ++ else ++ echo "TEST: $TEST_DESCRIPTION [STARTED]"; + fi + if [ "$V" != "1" ]; then +- ( +- test_setup && test_run +- ret=$? +- test_cleanup +- rm -fr -- "$TESTDIR" +- rm -f -- .testdir +- exit $ret +- ) test.log 2>&1 ++ ( ++ test_setup && test_run ++ ret=$? ++ test_cleanup ++ rm -fr -- "$TESTDIR" ++ rm -f -- .testdir ++ exit $ret ++ ) test.log 2>&1 + else +- set -o pipefail +- ( +- test_setup && test_run +- ret=$? +- test_cleanup +- rm -fr -- "$TESTDIR" +- rm -f -- .testdir +- exit $ret +- ) &1 | tee test.log ++ set -o pipefail ++ ( ++ test_setup && test_run ++ ret=$? ++ test_cleanup ++ rm -fr -- "$TESTDIR" ++ rm -f -- .testdir ++ exit $ret ++ ) &1 | tee test.log + fi + ret=$? + set +o pipefail + if [ $ret -eq 0 ]; then +- rm -- test.log +- SETCOLOR_SUCCESS +- echo "[OK]" +- SETCOLOR_NORMAL ++ rm -- test.log ++ echo -e "TEST: $TEST_DESCRIPTION " $COLOR_SUCCESS "[OK]" $COLOR_NORMAL + else +- SETCOLOR_FAILURE +- echo "[FAILED]" +- SETCOLOR_NORMAL +- echo "see $(pwd)/test.log" ++ echo -e "TEST: $TEST_DESCRIPTION " $COLOR_FAILURE "[FAILED]" $COLOR_NORMAL ++ if [ "$V" == "2" ]; then ++ cat $(pwd)/test.log ++ else ++ echo "see $(pwd)/test.log" ++ fi + fi + exit $ret;; + *) break ;; + diff --git a/0027.patch b/0027.patch new file mode 100644 index 0000000..1156414 --- /dev/null +++ b/0027.patch @@ -0,0 +1,23 @@ +From 393da0c370deaea03b7f72a35782fde506526a49 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 11:35:26 +0200 +Subject: [PATCH] TEST-50-MULTINIC: s/--device/-device + +--- + test/TEST-50-MULTINIC/test.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index de40790f..2640c318 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -57,7 +57,7 @@ client_test() { + -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \ + -netdev hubport,id=n1,hubid=1 \ + -netdev hubport,id=n2,hubid=2 \ +- --device e1000,netdev=n1,mac=52:54:00:12:34:98 \ ++ -device e1000,netdev=n1,mac=52:54:00:12:34:98 \ + -device e1000,netdev=n2,mac=52:54:00:12:34:99 \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ + diff --git a/0028.patch b/0028.patch new file mode 100644 index 0000000..738236d --- /dev/null +++ b/0028.patch @@ -0,0 +1,34 @@ +From 827a5b1a80c63f62fbe70945d46a8eb9453fc9fe Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 11:37:57 +0200 +Subject: [PATCH] test: also output server.log on failure + +--- + test/test-functions | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/test/test-functions b/test/test-functions +index 57611ff5..f27be912 100644 +--- a/test/test-functions ++++ b/test/test-functions +@@ -75,6 +75,9 @@ while (($# > 0)); do + test_setup && test_run + ret=$? + test_cleanup ++ if ((ret!=0)) && [[ -f "$TESTDIR"/server.log ]]; then ++ mv [[ -f "$TESTDIR"/server.log ]] ./ ++ fi + rm -fr -- "$TESTDIR" + rm -f -- .testdir + exit $ret +@@ -88,7 +91,8 @@ while (($# > 0)); do + else + echo -e "TEST: $TEST_DESCRIPTION " $COLOR_FAILURE "[FAILED]" $COLOR_NORMAL + if [ "$V" == "2" ]; then +- cat $(pwd)/test.log ++ cat $(pwd)/server.log $(pwd)/test.log ++ echo -e "TEST: $TEST_DESCRIPTION " $COLOR_FAILURE "[FAILED]" $COLOR_NORMAL + else + echo "see $(pwd)/test.log" + fi + diff --git a/0029.patch b/0029.patch new file mode 100644 index 0000000..ce571e1 --- /dev/null +++ b/0029.patch @@ -0,0 +1,23 @@ +From 94cc856cb8e4a325cc26a3bcc2d9e92da6a2be69 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 13:57:15 +0200 +Subject: [PATCH] TEST-70-BONDBRIDGETEAMVLAN: load vlan kernel modules + +--- + test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh +index 503ed9ed..b9f01c9b 100755 +--- a/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh +@@ -49,7 +49,7 @@ linkup() { + && wait_for_if_up $1 2>/dev/null + } + +-modprobe -b -q 8021q ++modprobe --all -b -q 8021q ipvlan macvlan + >/dev/watchdog + ip addr add 127.0.0.1/8 dev lo + linkup lo + diff --git a/0030.patch b/0030.patch new file mode 100644 index 0000000..5a1f421 --- /dev/null +++ b/0030.patch @@ -0,0 +1,338 @@ +From ca8f1c1ba3e5f1ebfb2e5e70ea4d4b7a791b0bc2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 13:58:21 +0200 +Subject: [PATCH] test: fixed KVERSION and qemu backwards compatiblity + +--- + test/TEST-50-MULTINIC/test.sh | 137 ++++++++++++++++++-------------- + test/TEST-70-BONDBRIDGETEAMVLAN/test.sh | 52 ++++++++---- + 2 files changed, 115 insertions(+), 74 deletions(-) + +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index 2640c318..02443c40 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -12,19 +12,36 @@ run_server() { + echo "MULTINIC TEST SETUP: Starting DHCP/NFS server" + + fsck -a "$TESTDIR"/server.ext3 || return 1 +- $testdir/run-qemu \ +- -drive format=raw,index=0,media=disk,file="$TESTDIR"/server.ext3 \ +- -m 512M -smp 2 \ +- -display none \ +- -net socket,listen=127.0.0.1:12350 \ +- -net nic,macaddr=52:54:01:12:34:56,model=e1000 \ +- ${SERIAL:+-serial "$SERIAL"} \ +- ${SERIAL:--serial file:"$TESTDIR"/server.log} \ +- -watchdog i6300esb -watchdog-action poweroff \ +- -no-reboot \ +- -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ +- -initrd "$TESTDIR"/initramfs.server \ +- -pidfile "$TESTDIR"/server.pid -daemonize || return 1 ++ ++ if $testdir/run-qemu --help | grep -qF -m1 'netdev hubport,id=str,hubid=n[,netdev=nd]' && echo OK; then ++ $testdir/run-qemu \ ++ -drive format=raw,index=0,media=disk,file="$TESTDIR"/server.ext3 \ ++ -m 512M -smp 2 \ ++ -display none \ ++ -net socket,listen=127.0.0.1:12350 \ ++ -net nic,macaddr=52:54:01:12:34:56,model=e1000 \ ++ ${SERIAL:+-serial "$SERIAL"} \ ++ ${SERIAL:--serial file:"$TESTDIR"/server.log} \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -no-reboot \ ++ -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ ++ -initrd "$TESTDIR"/initramfs.server \ ++ -pidfile "$TESTDIR"/server.pid -daemonize || return 1 ++ else ++ $testdir/run-qemu \ ++ -drive format=raw,index=0,media=disk,file="$TESTDIR"/client.img -m 512M -smp 2 -nographic \ ++ -net socket,vlan=0,connect=127.0.0.1:12350 \ ++ -net nic,vlan=0,macaddr=52:54:00:12:34:$mac1,model=e1000 \ ++ -net nic,vlan=0,macaddr=52:54:00:12:34:$mac2,model=e1000 \ ++ -net nic,vlan=0,macaddr=52:54:00:12:34:$mac3,model=e1000 \ ++ -net nic,vlan=1,macaddr=52:54:00:12:34:98,model=e1000 \ ++ -net nic,vlan=2,macaddr=52:54:00:12:34:99,model=e1000 \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -no-reboot \ ++ -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ ++ -initrd "$TESTDIR"/initramfs.testing ++ fi ++ + sudo chmod 644 -- "$TESTDIR"/server.pid || return 1 + + # Cleanup the terminal if we have one +@@ -51,18 +68,18 @@ client_test() { + fi + + $testdir/run-qemu -drive format=raw,index=0,media=disk,file="$TESTDIR"/client.img -m 512M -smp 2 -nographic \ +- -net socket,connect=127.0.0.1:12350 \ +- -net nic,macaddr=52:54:00:12:34:$mac1,model=e1000 \ +- -net nic,macaddr=52:54:00:12:34:$mac2,model=e1000 \ +- -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \ +- -netdev hubport,id=n1,hubid=1 \ +- -netdev hubport,id=n2,hubid=2 \ +- -device e1000,netdev=n1,mac=52:54:00:12:34:98 \ +- -device e1000,netdev=n2,mac=52:54:00:12:34:99 \ +- -watchdog i6300esb -watchdog-action poweroff \ +- -no-reboot \ +- -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ +- -initrd "$TESTDIR"/initramfs.testing ++ -net socket,connect=127.0.0.1:12350 \ ++ -net nic,macaddr=52:54:00:12:34:$mac1,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:$mac2,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \ ++ -netdev hubport,id=n1,hubid=1 \ ++ -netdev hubport,id=n2,hubid=2 \ ++ -device e1000,netdev=n1,mac=52:54:00:12:34:98 \ ++ -device e1000,netdev=n2,mac=52:54:00:12:34:99 \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -no-reboot \ ++ -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ ++ -initrd "$TESTDIR"/initramfs.testing + + { read OK; read IFACES; } < "$TESTDIR"/client.img + +@@ -110,58 +127,58 @@ test_client() { + + # PXE Style BOOTIF= + client_test "MULTINIC root=nfs BOOTIF=" \ +- 00 01 02 \ +- "root=nfs:192.168.50.1:/nfs/client BOOTIF=52-54-00-12-34-00" \ +- "ens3" || return 1 ++ 00 01 02 \ ++ "root=nfs:192.168.50.1:/nfs/client BOOTIF=52-54-00-12-34-00" \ ++ "ens3" || return 1 + + client_test "MULTINIC root=nfs BOOTIF= ip=ens4:dhcp" \ +- 00 01 02 \ +- "root=nfs:192.168.50.1:/nfs/client BOOTIF=52-54-00-12-34-00 ip=ens4:dhcp" \ +- "ens3 ens4" || return 1 ++ 00 01 02 \ ++ "root=nfs:192.168.50.1:/nfs/client BOOTIF=52-54-00-12-34-00 ip=ens4:dhcp" \ ++ "ens3 ens4" || return 1 + + # PXE Style BOOTIF= with dhcp root-path + client_test "MULTINIC root=dhcp BOOTIF=" \ +- 00 01 02 \ +- "root=dhcp BOOTIF=52-54-00-12-34-02" \ +- "ens5" || return 1 ++ 00 01 02 \ ++ "root=dhcp BOOTIF=52-54-00-12-34-02" \ ++ "ens5" || return 1 + + # Multinic case, where only one nic works + client_test "MULTINIC root=nfs ip=dhcp" \ +- FF 00 FE \ +- "root=nfs:192.168.50.1:/nfs/client ip=dhcp" \ +- "ens4" || return 1 ++ FF 00 FE \ ++ "root=nfs:192.168.50.1:/nfs/client ip=dhcp" \ ++ "ens4" || return 1 + + # Require two interfaces + client_test "MULTINIC root=nfs ip=ens4:dhcp ip=ens5:dhcp bootdev=ens4" \ +- 00 01 02 \ +- "root=nfs:192.168.50.1:/nfs/client ip=ens4:dhcp ip=ens5:dhcp bootdev=ens4" \ +- "ens4 ens5" || return 1 ++ 00 01 02 \ ++ "root=nfs:192.168.50.1:/nfs/client ip=ens4:dhcp ip=ens5:dhcp bootdev=ens4" \ ++ "ens4 ens5" || return 1 + + # Require three interfaces with dhcp root-path + client_test "MULTINIC root=dhcp ip=ens3:dhcp ip=ens4:dhcp ip=ens5:dhcp bootdev=ens5" \ +- 00 01 02 \ +- "root=dhcp ip=ens3:dhcp ip=ens4:dhcp ip=ens5:dhcp bootdev=ens5" \ +- "ens3 ens4 ens5" || return 1 ++ 00 01 02 \ ++ "root=dhcp ip=ens3:dhcp ip=ens4:dhcp ip=ens5:dhcp bootdev=ens5" \ ++ "ens3 ens4 ens5" || return 1 + + client_test "MULTINIC bonding" \ +- 00 01 02 \ +- "root=nfs:192.168.50.1:/nfs/client ip=bond0:dhcp bond=bond0:ens3,ens4,ens5:mode=balance-rr" \ +- "bond0" || return 1 ++ 00 01 02 \ ++ "root=nfs:192.168.50.1:/nfs/client ip=bond0:dhcp bond=bond0:ens3,ens4,ens5:mode=balance-rr" \ ++ "bond0" || return 1 + + client_test "MULTINIC bridging" \ +- 00 01 02 \ +- "root=nfs:192.168.50.1:/nfs/client ip=bridge0:dhcp bridge=bridge0:ens3,ens6,ens7" \ +- "bridge0" || return 1 ++ 00 01 02 \ ++ "root=nfs:192.168.50.1:/nfs/client ip=bridge0:dhcp bridge=bridge0:ens3,ens6,ens7" \ ++ "bridge0" || return 1 + return 0 + } + + test_setup() { +- # Make server root ++ # Make server root + dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=120 + mke2fs -j -F -- "$TESTDIR"/server.ext3 + mkdir -- "$TESTDIR"/mnt + sudo mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt +- ++ kernel=$KVERSION + ( + export initdir="$TESTDIR"/mnt + . "$basedir"/dracut-init.sh +@@ -185,9 +202,9 @@ test_setup() { + done + + inst_multiple sh ls shutdown poweroff stty cat ps ln ip \ +- dmesg mkdir cp ping exportfs \ +- modprobe rpc.nfsd rpc.mountd showmount tcpdump \ +- /etc/services sleep mount chmod ++ dmesg mkdir cp ping exportfs \ ++ modprobe rpc.nfsd rpc.mountd showmount tcpdump \ ++ /etc/services sleep mount chmod + for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do + [ -f "${_terminfodir}"/l/linux ] && break + done +@@ -212,7 +229,7 @@ test_setup() { + inst_libdir_file 'libnfsidmap*.so*' + + _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \ +- | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|') ++ | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|') + _nsslibs=${_nsslibs#|} + _nsslibs=${_nsslibs%|} + +@@ -241,7 +258,7 @@ test_setup() { + done + ) + inst_multiple sh shutdown poweroff stty cat ps ln ip \ +- mount dmesg mkdir cp ping grep ls ++ mount dmesg mkdir cp ping grep ls + for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do + [[ -f ${_terminfodir}/l/linux ]] && break + done +@@ -258,7 +275,7 @@ test_setup() { + inst_libdir_file 'libnfsidmap*.so*' + + _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' -- /etc/nsswitch.conf \ +- | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|') ++ | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|') + _nsslibs=${_nsslibs#|} + _nsslibs=${_nsslibs%|} + +@@ -282,14 +299,16 @@ test_setup() { + ) + + # Make server's dracut image +- $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ ++ $basedir/dracut.sh \ ++ -l -i "$TESTDIR"/overlay / \ + -m "dash udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \ + -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \ + --no-hostonly-cmdline -N \ + -f "$TESTDIR"/initramfs.server "$KVERSION" || return 1 + + # Make client's dracut image +- $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ ++ $basedir/dracut.sh \ ++ -l -i "$TESTDIR"/overlay / \ + -o "plymouth" \ + -a "debug" \ + -d "af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files sunrpc i6300esb ib700wdt" \ +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +index eadf09f1..8c11a7d3 100755 +--- a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +@@ -14,6 +14,7 @@ run_server() { + echo "MULTINIC TEST SETUP: Starting DHCP/NFS server" + + fsck -a "$TESTDIR"/server.ext3 || return 1 ++ + $testdir/run-qemu \ + -hda "$TESTDIR"/server.ext3 \ + -m 512M -smp 2 \ +@@ -66,17 +67,38 @@ client_test() { + nic3=" -netdev hubport,id=n3,hubid=3" + fi + +- $testdir/run-qemu -hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \ +- -netdev socket,connect=127.0.0.1:12370,id=s1 -netdev hubport,hubid=1,id=h1,netdev=s1 \ +- -netdev hubport,hubid=1,id=h2 -device e1000,mac=52:54:00:12:34:01,netdev=h2 \ +- -netdev hubport,hubid=1,id=h3 -device e1000,mac=52:54:00:12:34:02,netdev=h3 \ +- $nic1 -device e1000,mac=52:54:00:12:34:03,netdev=n1 \ +- -netdev socket,connect=127.0.0.1:12372,id=n2 -device e1000,mac=52:54:00:12:34:04,netdev=n2 \ +- $nic3 -device e1000,mac=52:54:00:12:34:05,netdev=n3 \ +- -watchdog i6300esb -watchdog-action poweroff \ +- -no-reboot \ +- -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ +- -initrd "$TESTDIR"/initramfs.testing ++ if $testdir/run-qemu --help | grep -qF -m1 'netdev hubport,id=str,hubid=n[,netdev=nd]' && echo OK; then ++ $testdir/run-qemu \ ++ -hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \ ++ -netdev socket,connect=127.0.0.1:12370,id=s1 \ ++ -netdev hubport,hubid=1,id=h1,netdev=s1 \ ++ -netdev hubport,hubid=1,id=h2 -device e1000,mac=52:54:00:12:34:01,netdev=h2 \ ++ -netdev hubport,hubid=1,id=h3 -device e1000,mac=52:54:00:12:34:02,netdev=h3 \ ++ $nic1 -device e1000,mac=52:54:00:12:34:03,netdev=n1 \ ++ -netdev socket,connect=127.0.0.1:12372,id=n2 -device e1000,mac=52:54:00:12:34:04,netdev=n2 \ ++ $nic3 -device e1000,mac=52:54:00:12:34:05,netdev=n3 \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -no-reboot \ ++ -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ ++ -initrd "$TESTDIR"/initramfs.testing ++ else ++ $testdir/run-qemu \ ++ -hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \ ++ -net socket,vlan=0,connect=127.0.0.1:12370 \ ++ ${do_vlan13:+-net socket,vlan=1,connect=127.0.0.1:12371} \ ++ -net socket,vlan=2,connect=127.0.0.1:12372 \ ++ ${do_vlan13:+-net socket,vlan=3,connect=127.0.0.1:12373} \ ++ -net nic,vlan=0,macaddr=52:54:00:12:34:01,model=e1000 \ ++ -net nic,vlan=0,macaddr=52:54:00:12:34:02,model=e1000 \ ++ -net nic,vlan=1,macaddr=52:54:00:12:34:03,model=e1000 \ ++ -net nic,vlan=2,macaddr=52:54:00:12:34:04,model=e1000 \ ++ -net nic,vlan=3,macaddr=52:54:00:12:34:05,model=e1000 \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -no-reboot \ ++ -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ ++ -initrd "$TESTDIR"/initramfs.testing ++ fi ++ + { + read OK + if [[ "$OK" != "OK" ]]; then +@@ -167,7 +189,7 @@ test_setup() { + mke2fs -j -F -- "$TESTDIR"/server.ext3 + mkdir -- "$TESTDIR"/mnt + mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt +- ++ kernel=$KVERSION + ( + export initdir="$TESTDIR"/mnt + . "$basedir"/dracut-init.sh +@@ -203,7 +225,7 @@ test_setup() { + [ -f /etc/netconfig ] && inst_multiple /etc/netconfig + type -P dhcpd >/dev/null && inst_multiple dhcpd + [ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd +- instmods nfsd sunrpc ipv6 lockd af_packet 8021q ++ instmods nfsd sunrpc ipv6 lockd af_packet 8021q ipvlan macvlan + inst_simple /etc/os-release + inst ./server-init.sh /sbin/init + inst ./hosts /etc/hosts +@@ -286,7 +308,7 @@ test_setup() { + $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ + --no-early-microcode \ + -m "udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \ +- -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \ ++ -d "ipvlan macvlan af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \ + --no-hostonly-cmdline -N \ + -f "$TESTDIR"/initramfs.server "$KVERSION" || return 1 + +@@ -295,7 +317,7 @@ test_setup() { + --no-early-microcode \ + -o "plymouth" \ + -a "debug" \ +- -d "af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files sunrpc i6300esb ib700wdt" \ ++ -d "ipvlan macvlan af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files sunrpc i6300esb ib700wdt" \ + --no-hostonly-cmdline -N \ + -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1 + } + diff --git a/0031.patch b/0031.patch new file mode 100644 index 0000000..4967ae3 --- /dev/null +++ b/0031.patch @@ -0,0 +1,23 @@ +From bb75d16521a9d76ccedbf06f3a6239efbbca77d7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 14:07:12 +0200 +Subject: [PATCH] kernel-network-modules: add vlan kernel modules + +--- + modules.d/90kernel-network-modules/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90kernel-network-modules/module-setup.sh b/modules.d/90kernel-network-modules/module-setup.sh +index 16ed3a74..600ef112 100755 +--- a/modules.d/90kernel-network-modules/module-setup.sh ++++ b/modules.d/90kernel-network-modules/module-setup.sh +@@ -28,7 +28,7 @@ installkernel() { + =drivers/net/phy \ + =drivers/net/team \ + =drivers/net/ethernet \ +- ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net xennet ++ ecb arc4 bridge stp llc ipv6 bonding 8021q ipvlan macvlan af_packet virtio_net xennet + hostonly="" instmods iscsi_ibft crc32c iscsi_boot_sysfs + } + + diff --git a/0032.patch b/0032.patch new file mode 100644 index 0000000..af3d99e --- /dev/null +++ b/0032.patch @@ -0,0 +1,37 @@ +From f9c8b3112aee5216a6bb5a42fb46146f6f228854 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 14:12:54 +0200 +Subject: [PATCH] TEST-50-MULTINIC/test.sh: fixed server startup + +--- + test/TEST-50-MULTINIC/test.sh | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index 02443c40..d7cec437 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -29,7 +29,9 @@ run_server() { + -pidfile "$TESTDIR"/server.pid -daemonize || return 1 + else + $testdir/run-qemu \ +- -drive format=raw,index=0,media=disk,file="$TESTDIR"/client.img -m 512M -smp 2 -nographic \ ++ -drive format=raw,index=0,media=disk,file="$TESTDIR"/server.ext3 \ ++ -m 512M -smp 2 \ ++ -display none \ + -net socket,vlan=0,connect=127.0.0.1:12350 \ + -net nic,vlan=0,macaddr=52:54:00:12:34:$mac1,model=e1000 \ + -net nic,vlan=0,macaddr=52:54:00:12:34:$mac2,model=e1000 \ +@@ -38,8 +40,9 @@ run_server() { + -net nic,vlan=2,macaddr=52:54:00:12:34:99,model=e1000 \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ +- -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ +- -initrd "$TESTDIR"/initramfs.testing ++ -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ ++ -initrd "$TESTDIR"/initramfs.server \ ++ -pidfile "$TESTDIR"/server.pid -daemonize || return 1 + fi + + sudo chmod 644 -- "$TESTDIR"/server.pid || return 1 + diff --git a/0033.patch b/0033.patch new file mode 100644 index 0000000..e102129 --- /dev/null +++ b/0033.patch @@ -0,0 +1,21 @@ +From 604c09b1dacd4a364ee88d0e405a4e6692bdc1c2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 15:28:56 +0200 +Subject: [PATCH] TEST-31-ISCSI-MULTI/test.sh: fixed test description + +--- + test/TEST-31-ISCSI-MULTI/test.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-31-ISCSI-MULTI/test.sh b/test/TEST-31-ISCSI-MULTI/test.sh +index c2f86ac8..1ed3fb7b 100755 +--- a/test/TEST-31-ISCSI-MULTI/test.sh ++++ b/test/TEST-31-ISCSI-MULTI/test.sh +@@ -1,5 +1,5 @@ + #!/bin/bash +-TEST_DESCRIPTION="root filesystem over iSCSI" ++TEST_DESCRIPTION="root filesystem over multiple iSCSI" + + KVERSION=${KVERSION-$(uname -r)} + + diff --git a/0034.patch b/0034.patch new file mode 100644 index 0000000..b78aca3 --- /dev/null +++ b/0034.patch @@ -0,0 +1,86 @@ +From a2dbecfcd65ac243363c9544442f7bf526ec6091 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 15:42:21 +0200 +Subject: [PATCH] test: add TEST_RUN_ID + +--- + test/test-functions | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/test/test-functions b/test/test-functions +index f27be912..bde5f742 100644 +--- a/test/test-functions ++++ b/test/test-functions +@@ -2,11 +2,11 @@ + PATH=/sbin:/bin:/usr/sbin:/usr/bin + export PATH + +-[[ -e .testdir ]] && . .testdir ++[[ -e .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} ]] && . .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} + if [[ -z "$TESTDIR" ]] || [[ ! -d "$TESTDIR" ]]; then + TESTDIR=$(mktemp -d -p "/var/tmp" -t dracut-test.XXXXXX) + fi +-echo "TESTDIR=\"$TESTDIR\"" > .testdir ++echo "TESTDIR=\"$TESTDIR\"" > .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} + export TESTDIR + + command -v test_check &>/dev/null || test_check() { +@@ -50,11 +50,11 @@ while (($# > 0)); do + echo "TEST CLEANUP: $TEST_DESCRIPTION" + test_cleanup + rm -fr -- "$TESTDIR" +- rm -f -- .testdir ++ rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} + exit $?;; + --all) + check_root +- if ! test_check 2&>test.log ; then ++ if ! test_check 2&>test-${TEST_RUN_ID:+-$TEST_RUN_ID}.log ; then + echo -e "TEST: $TEST_DESCRIPTION " $COLOR_WARNING "[SKIPPED]" $COLOR_NORMAL + exit 0; + else +@@ -66,9 +66,9 @@ while (($# > 0)); do + ret=$? + test_cleanup + rm -fr -- "$TESTDIR" +- rm -f -- .testdir ++ rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} + exit $ret +- ) test.log 2>&1 ++ ) test-${TEST_RUN_ID:+-$TEST_RUN_ID}.log 2>&1 + else + set -o pipefail + ( +@@ -76,25 +76,25 @@ while (($# > 0)); do + ret=$? + test_cleanup + if ((ret!=0)) && [[ -f "$TESTDIR"/server.log ]]; then +- mv [[ -f "$TESTDIR"/server.log ]] ./ ++ mv [[ -f "$TESTDIR"/server.log ]] ./server${TEST_RUN_ID:+-$TEST_RUN_ID}.log + fi + rm -fr -- "$TESTDIR" +- rm -f -- .testdir ++ rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} + exit $ret +- ) &1 | tee test.log ++ ) &1 | tee test-${TEST_RUN_ID:+-$TEST_RUN_ID}.log + fi + ret=$? + set +o pipefail + if [ $ret -eq 0 ]; then +- rm -- test.log ++ rm -- test-${TEST_RUN_ID:+-$TEST_RUN_ID}.log + echo -e "TEST: $TEST_DESCRIPTION " $COLOR_SUCCESS "[OK]" $COLOR_NORMAL + else + echo -e "TEST: $TEST_DESCRIPTION " $COLOR_FAILURE "[FAILED]" $COLOR_NORMAL + if [ "$V" == "2" ]; then +- cat $(pwd)/server.log $(pwd)/test.log ++ cat $(pwd)/server${TEST_RUN_ID:+-$TEST_RUN_ID}.log $(pwd)/test-${TEST_RUN_ID:+-$TEST_RUN_ID}.log + echo -e "TEST: $TEST_DESCRIPTION " $COLOR_FAILURE "[FAILED]" $COLOR_NORMAL + else +- echo "see $(pwd)/test.log" ++ echo "see $(pwd)/test-${TEST_RUN_ID:+-$TEST_RUN_ID}.log" + fi + fi + exit $ret;; + diff --git a/0035.patch b/0035.patch new file mode 100644 index 0000000..9741f85 --- /dev/null +++ b/0035.patch @@ -0,0 +1,26 @@ +From 0f294d90b246e15d00dd56627a8085e5bfc5bf85 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 15:54:42 +0200 +Subject: [PATCH] TEST-31-ISCSI-MULTI: increase verbose level + +--- + test/TEST-31-ISCSI-MULTI/test.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/TEST-31-ISCSI-MULTI/test.sh b/test/TEST-31-ISCSI-MULTI/test.sh +index 1ed3fb7b..5c38249c 100755 +--- a/test/TEST-31-ISCSI-MULTI/test.sh ++++ b/test/TEST-31-ISCSI-MULTI/test.sh +@@ -3,9 +3,9 @@ TEST_DESCRIPTION="root filesystem over multiple iSCSI" + + KVERSION=${KVERSION-$(uname -r)} + +-DEBUGFAIL="loglevel=1" ++#DEBUGFAIL="loglevel=1" + #DEBUGFAIL="rd.shell rd.break rd.debug loglevel=7 " +-#DEBUGFAIL="rd.debug loglevel=7 " ++DEBUGFAIL="rd.debug loglevel=7 " + #SERVER_DEBUG="rd.debug loglevel=7" + #SERIAL="tcp:127.0.0.1:9999" + + diff --git a/0036.patch b/0036.patch new file mode 100644 index 0000000..77f3c49 --- /dev/null +++ b/0036.patch @@ -0,0 +1,93 @@ +From 3c1a083e5c5e56bf2e26aa806f023d4f053fc7b7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 16:01:39 +0200 +Subject: [PATCH] add travis build job + +--- + .travis.yml | 15 +++++++++++++++ + fedora-test.sh | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 70 insertions(+) + +diff --git a/.travis.yml b/.travis.yml +new file mode 100644 +index 00000000..16f9a511 +--- /dev/null ++++ b/.travis.yml +@@ -0,0 +1,15 @@ ++sudo: required ++ ++services: ++ - docker ++ ++env: ++ matrix: ++ - IMAGE=latest ++ - IMAGE=rawhide ++ ++before_script: ++- docker pull fedora:$IMAGE ++ ++script: ++- docker run --privileged -it -v $(pwd)/:/dracut fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ +diff --git a/fedora-test.sh b/fedora-test.sh +new file mode 100755 +index 00000000..ee506caf +--- /dev/null ++++ b/fedora-test.sh +@@ -0,0 +1,55 @@ ++#!/bin/bash ++ ++set -ex ++ ++cd ${0%/*} ++ ++RUN_ID="$1" ++ ++dnf -y update --best --allowerasing ++ ++dnf -y install --best --allowerasing \ ++ dash \ ++ asciidoc \ ++ mdadm \ ++ lvm2 \ ++ dmraid \ ++ cryptsetup \ ++ nfs-utils \ ++ nbd \ ++ dhcp-server \ ++ scsi-target-utils \ ++ iscsi-initiator-utils \ ++ strace \ ++ btrfs-progs \ ++ kmod-devel \ ++ gcc \ ++ bzip2 \ ++ xz \ ++ tar \ ++ wget \ ++ rpm-build \ ++ make \ ++ git \ ++ bash-completion \ ++ sudo \ ++ kernel \ ++ dhcp-client \ ++ /usr/bin/qemu-kvm \ ++ e2fsprogs \ ++ $NULL ++ ++./configure ++ ++NCPU=$(getconf _NPROCESSORS_ONLN) ++ ++make -j$NCPU all syncheck rpm ++ ++cd test ++ ++time sudo make -j$((NCPU/2+1)) \ ++ KVERSION=$(rpm -qa kernel --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' | sort -rn | head -1) \ ++ TEST_RUN_ID=$RUN_ID \ ++ -k V=2 \ ++ SKIP="14 16" \ ++ check + diff --git a/0037.patch b/0037.patch new file mode 100644 index 0000000..6a4263b --- /dev/null +++ b/0037.patch @@ -0,0 +1,44 @@ +From b7774da97ca743ada8a94d5eab4484cb96504ca0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 16:18:53 +0200 +Subject: [PATCH] might even run without kvm + +--- + .travis.yml | 5 +---- + test/run-qemu | 1 + + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index 16f9a511..a71d9be2 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -1,15 +1,12 @@ ++language: generic + sudo: required +- + services: + - docker +- + env: + matrix: + - IMAGE=latest + - IMAGE=rawhide +- + before_script: + - docker pull fedora:$IMAGE +- + script: + - docker run --privileged -it -v $(pwd)/:/dracut fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ +diff --git a/test/run-qemu b/test/run-qemu +index a4e15548..c28de2db 100755 +--- a/test/run-qemu ++++ b/test/run-qemu +@@ -8,6 +8,7 @@ $(lsmod | grep -q '^kqemu ') && BIN=/usr/bin/qemu && ARGS="-kernel-kqemu " + [[ -c /dev/kvm && -x /usr/bin/kvm ]] && BIN=/usr/bin/kvm && ARGS="" + [[ -c /dev/kvm && -x /usr/bin/qemu-kvm ]] && BIN=/usr/bin/qemu-kvm && ARGS="" + [[ -c /dev/kvm && -x /usr/libexec/qemu-kvm ]] && BIN=/usr/libexec/qemu-kvm && ARGS="" ++[[ -x /usr/bin/qemu-system-$(uname -i) ]] && BIN=/usr/bin/qemu-system-$(uname -i) && ARGS="" + [[ -c /dev/kvm && -x /usr/bin/qemu-system-$(uname -i) ]] && BIN=/usr/bin/qemu-system-$(uname -i) && ARGS="-enable-kvm" + + [[ $BIN ]] || { + diff --git a/0038.patch b/0038.patch new file mode 100644 index 0000000..2b03b1f --- /dev/null +++ b/0038.patch @@ -0,0 +1,23 @@ +From fba4d2843382540839d90abbaa2cae0d5bf1c2dd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 16:30:42 +0200 +Subject: [PATCH] TEST-50-MULTINIC: fixed server.log + +--- + test/TEST-50-MULTINIC/test.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index d7cec437..0a4d29c2 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -38,6 +38,8 @@ run_server() { + -net nic,vlan=0,macaddr=52:54:00:12:34:$mac3,model=e1000 \ + -net nic,vlan=1,macaddr=52:54:00:12:34:98,model=e1000 \ + -net nic,vlan=2,macaddr=52:54:00:12:34:99,model=e1000 \ ++ ${SERIAL:+-serial "$SERIAL"} \ ++ ${SERIAL:--serial file:"$TESTDIR"/server.log} \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ + -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ + diff --git a/0039.patch b/0039.patch new file mode 100644 index 0000000..33b0ab2 --- /dev/null +++ b/0039.patch @@ -0,0 +1,51 @@ +From cafe6675c2e54cbdc576785bc98e5f7fda76ba7c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 16:31:00 +0200 +Subject: [PATCH] test/run-qemu: move -cpu host to kvm args + +--- + fedora-test.sh | 1 + + test/run-qemu | 12 ++++++------ + 2 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/fedora-test.sh b/fedora-test.sh +index ee506caf..146c7f2f 100755 +--- a/fedora-test.sh ++++ b/fedora-test.sh +@@ -36,6 +36,7 @@ dnf -y install --best --allowerasing \ + kernel \ + dhcp-client \ + /usr/bin/qemu-kvm \ ++ /usr/bin/qemu-system-$(uname -i) \ + e2fsprogs \ + $NULL + +diff --git a/test/run-qemu b/test/run-qemu +index c28de2db..4eb497ff 100755 +--- a/test/run-qemu ++++ b/test/run-qemu +@@ -4,12 +4,12 @@ + export PATH=/sbin:/bin:/usr/sbin:/usr/bin + + [[ -x /usr/bin/qemu ]] && BIN=/usr/bin/qemu && ARGS="" +-$(lsmod | grep -q '^kqemu ') && BIN=/usr/bin/qemu && ARGS="-kernel-kqemu " +-[[ -c /dev/kvm && -x /usr/bin/kvm ]] && BIN=/usr/bin/kvm && ARGS="" +-[[ -c /dev/kvm && -x /usr/bin/qemu-kvm ]] && BIN=/usr/bin/qemu-kvm && ARGS="" +-[[ -c /dev/kvm && -x /usr/libexec/qemu-kvm ]] && BIN=/usr/libexec/qemu-kvm && ARGS="" ++$(lsmod | grep -q '^kqemu ') && BIN=/usr/bin/qemu && ARGS="-kernel-kqemu -cpu host" ++[[ -c /dev/kvm && -x /usr/bin/kvm ]] && BIN=/usr/bin/kvm && ARGS="-cpu host" ++[[ -c /dev/kvm && -x /usr/bin/qemu-kvm ]] && BIN=/usr/bin/qemu-kvm && ARGS="-cpu host" ++[[ -c /dev/kvm && -x /usr/libexec/qemu-kvm ]] && BIN=/usr/libexec/qemu-kvm && ARGS="-cpu host" + [[ -x /usr/bin/qemu-system-$(uname -i) ]] && BIN=/usr/bin/qemu-system-$(uname -i) && ARGS="" +-[[ -c /dev/kvm && -x /usr/bin/qemu-system-$(uname -i) ]] && BIN=/usr/bin/qemu-system-$(uname -i) && ARGS="-enable-kvm" ++[[ -c /dev/kvm && -x /usr/bin/qemu-system-$(uname -i) ]] && BIN=/usr/bin/qemu-system-$(uname -i) && ARGS="-enable-kvm -cpu host" + + [[ $BIN ]] || { + echo "Could not find a working KVM or QEMU to test with!" >&2 +@@ -31,4 +31,4 @@ if ! [ -f "$VMLINUZ" ]; then + fi + fi + +-exec sudo $BIN $ARGS -kernel $VMLINUZ -cpu host "$@" ++exec sudo $BIN $ARGS -kernel $VMLINUZ "$@" + diff --git a/0040.patch b/0040.patch new file mode 100644 index 0000000..d65f542 --- /dev/null +++ b/0040.patch @@ -0,0 +1,67 @@ +From 9288d21b9fd992cc7a32fbf79ad4f80b070e2277 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 16:37:01 +0200 +Subject: [PATCH] TEST-50-MULTINIC: removed bogus qemu compat server call + +--- + test/TEST-50-MULTINIC/test.sh | 46 ++++++++++++------------------------------- + 1 file changed, 13 insertions(+), 33 deletions(-) + +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index 0a4d29c2..495a66f2 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -13,39 +13,19 @@ run_server() { + + fsck -a "$TESTDIR"/server.ext3 || return 1 + +- if $testdir/run-qemu --help | grep -qF -m1 'netdev hubport,id=str,hubid=n[,netdev=nd]' && echo OK; then +- $testdir/run-qemu \ +- -drive format=raw,index=0,media=disk,file="$TESTDIR"/server.ext3 \ +- -m 512M -smp 2 \ +- -display none \ +- -net socket,listen=127.0.0.1:12350 \ +- -net nic,macaddr=52:54:01:12:34:56,model=e1000 \ +- ${SERIAL:+-serial "$SERIAL"} \ +- ${SERIAL:--serial file:"$TESTDIR"/server.log} \ +- -watchdog i6300esb -watchdog-action poweroff \ +- -no-reboot \ +- -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ +- -initrd "$TESTDIR"/initramfs.server \ +- -pidfile "$TESTDIR"/server.pid -daemonize || return 1 +- else +- $testdir/run-qemu \ +- -drive format=raw,index=0,media=disk,file="$TESTDIR"/server.ext3 \ +- -m 512M -smp 2 \ +- -display none \ +- -net socket,vlan=0,connect=127.0.0.1:12350 \ +- -net nic,vlan=0,macaddr=52:54:00:12:34:$mac1,model=e1000 \ +- -net nic,vlan=0,macaddr=52:54:00:12:34:$mac2,model=e1000 \ +- -net nic,vlan=0,macaddr=52:54:00:12:34:$mac3,model=e1000 \ +- -net nic,vlan=1,macaddr=52:54:00:12:34:98,model=e1000 \ +- -net nic,vlan=2,macaddr=52:54:00:12:34:99,model=e1000 \ +- ${SERIAL:+-serial "$SERIAL"} \ +- ${SERIAL:--serial file:"$TESTDIR"/server.log} \ +- -watchdog i6300esb -watchdog-action poweroff \ +- -no-reboot \ +- -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ +- -initrd "$TESTDIR"/initramfs.server \ +- -pidfile "$TESTDIR"/server.pid -daemonize || return 1 +- fi ++ $testdir/run-qemu \ ++ -drive format=raw,index=0,media=disk,file="$TESTDIR"/server.ext3 \ ++ -m 512M -smp 2 \ ++ -display none \ ++ -net socket,listen=127.0.0.1:12350 \ ++ -net nic,macaddr=52:54:01:12:34:56,model=e1000 \ ++ ${SERIAL:+-serial "$SERIAL"} \ ++ ${SERIAL:--serial file:"$TESTDIR"/server.log} \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -no-reboot \ ++ -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ ++ -initrd "$TESTDIR"/initramfs.server \ ++ -pidfile "$TESTDIR"/server.pid -daemonize || return 1 + + sudo chmod 644 -- "$TESTDIR"/server.pid || return 1 + + diff --git a/0041.patch b/0041.patch new file mode 100644 index 0000000..ca75cee --- /dev/null +++ b/0041.patch @@ -0,0 +1,23 @@ +From d15c15c8f54d3aa97f7906e4f926584ac646fc5e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 16:54:27 +0200 +Subject: [PATCH] test/test-functions: be verbose for any $V not empty + +--- + test/test-functions | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/test-functions b/test/test-functions +index bde5f742..d6b28d20 100644 +--- a/test/test-functions ++++ b/test/test-functions +@@ -60,7 +60,7 @@ while (($# > 0)); do + else + echo "TEST: $TEST_DESCRIPTION [STARTED]"; + fi +- if [ "$V" != "1" ]; then ++ if ! [[ "$V" ]]; then + ( + test_setup && test_run + ret=$? + diff --git a/0042.patch b/0042.patch new file mode 100644 index 0000000..6410dbe --- /dev/null +++ b/0042.patch @@ -0,0 +1,25 @@ +From 1363167d655f8d08ea8fd71e56c8c85ff94ccc04 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 16:58:52 +0200 +Subject: [PATCH] Update README.md + +--- + README.md | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/README.md b/README.md +index e229641b..36ae7e1b 100644 +--- a/README.md ++++ b/README.md +@@ -2,6 +2,10 @@ + + dracut is an initramfs infrastructure. + ++## Travis ++ ++[![Build Status](https://travis-ci.org/dracutdevs/dracut.svg?branch=master)](https://travis-ci.org/dracutdevs/dracut) ++ + ## CentOS CI + + [![Build Status](https://ci.centos.org/job/dracut-push-master/badge/icon)](https://ci.centos.org/job/dracut-push-master/) + diff --git a/0043.patch b/0043.patch new file mode 100644 index 0000000..302e140 --- /dev/null +++ b/0043.patch @@ -0,0 +1,23 @@ +From 75b8b144a1cf5c7e15e0454f847615cadf6518e9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 17:02:14 +0200 +Subject: [PATCH] fedora-test.sh: don't parallelize travis tests + +--- + fedora-test.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fedora-test.sh b/fedora-test.sh +index 146c7f2f..9528f08c 100755 +--- a/fedora-test.sh ++++ b/fedora-test.sh +@@ -48,7 +48,7 @@ make -j$NCPU all syncheck rpm + + cd test + +-time sudo make -j$((NCPU/2+1)) \ ++time sudo make \ + KVERSION=$(rpm -qa kernel --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' | sort -rn | head -1) \ + TEST_RUN_ID=$RUN_ID \ + -k V=2 \ + diff --git a/0044.patch b/0044.patch new file mode 100644 index 0000000..5e1c34c --- /dev/null +++ b/0044.patch @@ -0,0 +1,26 @@ +From da5a44cfb727561e3a2b8e6e24003cd410537cfc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 14 Aug 2018 17:06:58 +0200 +Subject: [PATCH] .travis.yml: add gitter notifications + +--- + .travis.yml | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/.travis.yml b/.travis.yml +index a71d9be2..96dcd951 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -10,3 +10,11 @@ before_script: + - docker pull fedora:$IMAGE + script: + - docker run --privileged -it -v $(pwd)/:/dracut fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ ++notifications: ++ webhooks: ++ urls: ++ - https://webhooks.gitter.im/e/effa917ca3e0ed5fd00e ++ on_success: change # options: [always|never|change] default: always ++ on_failure: always # options: [always|never|change] default: always ++ on_start: never # options: [always|never|change] default: always ++ + diff --git a/0045.patch b/0045.patch new file mode 100644 index 0000000..dd8a201 --- /dev/null +++ b/0045.patch @@ -0,0 +1,94 @@ +From 65d16d19141d0378f6cbab33b435a231ffdd37c4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 08:50:11 +0200 +Subject: [PATCH] travis: extend matrix + +--- + .travis.yml | 45 ++++++++++++++++++++++++++++++++++++++++++--- + fedora-test.sh | 4 +++- + 2 files changed, 45 insertions(+), 4 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index 96dcd951..fbaafdac 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -4,12 +4,51 @@ services: + - docker + env: + matrix: +- - IMAGE=latest +- - IMAGE=rawhide ++ - IMAGE=latest TESTS=01 ++ - IMAGE=latest TESTS=02 ++ - IMAGE=latest TESTS=03 ++ - IMAGE=latest TESTS=04 ++ - IMAGE=latest TESTS=10 ++ - IMAGE=latest TESTS=11 ++ - IMAGE=latest TESTS=12 ++ - IMAGE=latest TESTS=13 ++ - IMAGE=latest TESTS=14 ++ - IMAGE=latest TESTS=15 ++ - IMAGE=latest TESTS=16 ++ - IMAGE=latest TESTS=17 ++ - IMAGE=latest TESTS=18 ++ - IMAGE=latest TESTS=20 ++ - IMAGE=latest TESTS=30 ++ - IMAGE=latest TESTS=31 ++ - IMAGE=latest TESTS=40 ++ - IMAGE=latest TESTS=50 ++ - IMAGE=latest TESTS=70 ++ - IMAGE=latest TESTS=99 ++ - IMAGE=rawhide TESTS=01 ++ - IMAGE=rawhide TESTS=02 ++ - IMAGE=rawhide TESTS=03 ++ - IMAGE=rawhide TESTS=04 ++ - IMAGE=rawhide TESTS=10 ++ - IMAGE=rawhide TESTS=11 ++ - IMAGE=rawhide TESTS=12 ++ - IMAGE=rawhide TESTS=13 ++ - IMAGE=rawhide TESTS=14 ++ - IMAGE=rawhide TESTS=15 ++ - IMAGE=rawhide TESTS=16 ++ - IMAGE=rawhide TESTS=17 ++ - IMAGE=rawhide TESTS=18 ++ - IMAGE=rawhide TESTS=20 ++ - IMAGE=rawhide TESTS=30 ++ - IMAGE=rawhide TESTS=31 ++ - IMAGE=rawhide TESTS=40 ++ - IMAGE=rawhide TESTS=50 ++ - IMAGE=rawhide TESTS=70 ++ - IMAGE=rawhide TESTS=99 ++ + before_script: + - docker pull fedora:$IMAGE + script: +-- docker run --privileged -it -v $(pwd)/:/dracut fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ ++- docker run --privileged -it -v $(pwd)/:/dracut fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ $TESTS + notifications: + webhooks: + urls: +diff --git a/fedora-test.sh b/fedora-test.sh +index 9528f08c..df7147c6 100755 +--- a/fedora-test.sh ++++ b/fedora-test.sh +@@ -2,9 +2,10 @@ + + set -ex + +-cd ${0%/*} ++[[ -d ${0%/*} ]] && cd ${0%/*} + + RUN_ID="$1" ++TESTS=$2 + + dnf -y update --best --allowerasing + +@@ -51,6 +52,7 @@ cd test + time sudo make \ + KVERSION=$(rpm -qa kernel --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' | sort -rn | head -1) \ + TEST_RUN_ID=$RUN_ID \ ++ ${TESTS:+TESTS="$TESTS"} \ + -k V=2 \ + SKIP="14 16" \ + check + diff --git a/0046.patch b/0046.patch new file mode 100644 index 0000000..8618614 --- /dev/null +++ b/0046.patch @@ -0,0 +1,94 @@ +From 1ebbe2eb7b177f169e48df6318d9169e9ae1afe9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 09:10:29 +0200 +Subject: [PATCH] travis: combine jobs + +--- + .travis.yml | 64 +++++++++++++++++++++---------------------------------------- + 1 file changed, 22 insertions(+), 42 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index fbaafdac..f2cd8b26 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -1,49 +1,29 @@ + language: generic + sudo: required + services: +- - docker ++- docker + env: + matrix: +- - IMAGE=latest TESTS=01 +- - IMAGE=latest TESTS=02 +- - IMAGE=latest TESTS=03 +- - IMAGE=latest TESTS=04 +- - IMAGE=latest TESTS=10 +- - IMAGE=latest TESTS=11 +- - IMAGE=latest TESTS=12 +- - IMAGE=latest TESTS=13 +- - IMAGE=latest TESTS=14 +- - IMAGE=latest TESTS=15 +- - IMAGE=latest TESTS=16 +- - IMAGE=latest TESTS=17 +- - IMAGE=latest TESTS=18 +- - IMAGE=latest TESTS=20 +- - IMAGE=latest TESTS=30 +- - IMAGE=latest TESTS=31 +- - IMAGE=latest TESTS=40 +- - IMAGE=latest TESTS=50 +- - IMAGE=latest TESTS=70 +- - IMAGE=latest TESTS=99 +- - IMAGE=rawhide TESTS=01 +- - IMAGE=rawhide TESTS=02 +- - IMAGE=rawhide TESTS=03 +- - IMAGE=rawhide TESTS=04 +- - IMAGE=rawhide TESTS=10 +- - IMAGE=rawhide TESTS=11 +- - IMAGE=rawhide TESTS=12 +- - IMAGE=rawhide TESTS=13 +- - IMAGE=rawhide TESTS=14 +- - IMAGE=rawhide TESTS=15 +- - IMAGE=rawhide TESTS=16 +- - IMAGE=rawhide TESTS=17 +- - IMAGE=rawhide TESTS=18 +- - IMAGE=rawhide TESTS=20 +- - IMAGE=rawhide TESTS=30 +- - IMAGE=rawhide TESTS=31 +- - IMAGE=rawhide TESTS=40 +- - IMAGE=rawhide TESTS=50 +- - IMAGE=rawhide TESTS=70 +- - IMAGE=rawhide TESTS=99 ++ - IMAGE=latest TESTS=01 ++ - IMAGE=latest TESTS="02 03 04" ++ - IMAGE=latest TESTS="10 11 12 13 15 17 18" ++ - IMAGE=latest TESTS=20 ++ - IMAGE=latest TESTS=30 ++ - IMAGE=latest TESTS=31 ++ - IMAGE=latest TESTS=40 ++ - IMAGE=latest TESTS=50 ++ - IMAGE=latest TESTS=70 ++ - IMAGE=latest TESTS=99 ++ - IMAGE=rawhide TESTS=01 ++ - IMAGE=rawhide TESTS="02 03 04" ++ - IMAGE=rawhide TESTS="10 11 12 13 15 17 18" ++ - IMAGE=rawhide TESTS=20 ++ - IMAGE=rawhide TESTS=30 ++ - IMAGE=rawhide TESTS=31 ++ - IMAGE=rawhide TESTS=40 ++ - IMAGE=rawhide TESTS=50 ++ - IMAGE=rawhide TESTS=70 ++ - IMAGE=rawhide TESTS=99 + + before_script: + - docker pull fedora:$IMAGE +@@ -52,7 +32,7 @@ script: + notifications: + webhooks: + urls: +- - https://webhooks.gitter.im/e/effa917ca3e0ed5fd00e ++ - https://webhooks.gitter.im/e/effa917ca3e0ed5fd00e + on_success: change # options: [always|never|change] default: always + on_failure: always # options: [always|never|change] default: always + on_start: never # options: [always|never|change] default: always + diff --git a/0047.patch b/0047.patch new file mode 100644 index 0000000..7e63148 --- /dev/null +++ b/0047.patch @@ -0,0 +1,24 @@ +From 311198868044b79e8e4f37872514f580b51e4ceb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 09:19:52 +0200 +Subject: [PATCH] dracut.sh: remove bogus dir removal for --rebuild + +--- + dracut.sh | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 6614d27d..8ee8c168 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -474,9 +474,6 @@ if [[ $append_args_l == "yes" ]]; then + eval set -- "$TEMP" + rearrange_params "$@" + fi +- +- # clean the temporarily used scratch-pad directory +- rm -rf $scratch_dir + fi + + unset PARMS_TO_STORE + diff --git a/0048.patch b/0048.patch new file mode 100644 index 0000000..bf00e5d --- /dev/null +++ b/0048.patch @@ -0,0 +1,49 @@ +From 01f9d0d9bf47f80823094de6b184ee67023406c7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 09:26:35 +0200 +Subject: [PATCH] travis: combine more tests + +--- + .travis.yml | 14 +++++--------- + 1 file changed, 5 insertions(+), 9 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index f2cd8b26..a99418e3 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -5,21 +5,17 @@ services: + env: + matrix: + - IMAGE=latest TESTS=01 +- - IMAGE=latest TESTS="02 03 04" +- - IMAGE=latest TESTS="10 11 12 13 15 17 18" ++ - IMAGE=latest TESTS="02 03 04 10 11 12 13 15 17 18" + - IMAGE=latest TESTS=20 +- - IMAGE=latest TESTS=30 +- - IMAGE=latest TESTS=31 ++ - IMAGE=latest TESTS="30 31" + - IMAGE=latest TESTS=40 + - IMAGE=latest TESTS=50 + - IMAGE=latest TESTS=70 + - IMAGE=latest TESTS=99 + - IMAGE=rawhide TESTS=01 +- - IMAGE=rawhide TESTS="02 03 04" +- - IMAGE=rawhide TESTS="10 11 12 13 15 17 18" ++ - IMAGE=rawhide TESTS="02 03 04 10 11 12 13 15 17 18" + - IMAGE=rawhide TESTS=20 +- - IMAGE=rawhide TESTS=30 +- - IMAGE=rawhide TESTS=31 ++ - IMAGE=rawhide TESTS="30 31" + - IMAGE=rawhide TESTS=40 + - IMAGE=rawhide TESTS=50 + - IMAGE=rawhide TESTS=70 +@@ -28,7 +24,7 @@ env: + before_script: + - docker pull fedora:$IMAGE + script: +-- docker run --privileged -it -v $(pwd)/:/dracut fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ $TESTS ++- docker run --privileged -it -v $(pwd)/:/dracut fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ "$TESTS" + notifications: + webhooks: + urls: + diff --git a/0049.patch b/0049.patch new file mode 100644 index 0000000..f471892 --- /dev/null +++ b/0049.patch @@ -0,0 +1,52 @@ +From 3c8d3a65656707148d5f9e5de1c0191339a72053 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 09:35:33 +0200 +Subject: [PATCH] travis: don't run TEST-40-NBD + +--- + .travis.yml | 16 +++++++--------- + fedora-test.sh | 1 - + 2 files changed, 7 insertions(+), 10 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index a99418e3..d6d3947c 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -4,19 +4,17 @@ services: + - docker + env: + matrix: +- - IMAGE=latest TESTS=01 +- - IMAGE=latest TESTS="02 03 04 10 11 12 13 15 17 18" +- - IMAGE=latest TESTS=20 +- - IMAGE=latest TESTS="30 31" +- - IMAGE=latest TESTS=40 +- - IMAGE=latest TESTS=50 +- - IMAGE=latest TESTS=70 +- - IMAGE=latest TESTS=99 ++ - IMAGE=latest TESTS=01 ++ - IMAGE=latest TESTS="02 03 04 10 11 12 13 15 17 18" ++ - IMAGE=latest TESTS=20 ++ - IMAGE=latest TESTS="30 31" ++ - IMAGE=latest TESTS=50 ++ - IMAGE=latest TESTS=70 ++ - IMAGE=latest TESTS=99 + - IMAGE=rawhide TESTS=01 + - IMAGE=rawhide TESTS="02 03 04 10 11 12 13 15 17 18" + - IMAGE=rawhide TESTS=20 + - IMAGE=rawhide TESTS="30 31" +- - IMAGE=rawhide TESTS=40 + - IMAGE=rawhide TESTS=50 + - IMAGE=rawhide TESTS=70 + - IMAGE=rawhide TESTS=99 +diff --git a/fedora-test.sh b/fedora-test.sh +index df7147c6..5e7d34d6 100755 +--- a/fedora-test.sh ++++ b/fedora-test.sh +@@ -54,5 +54,4 @@ time sudo make \ + TEST_RUN_ID=$RUN_ID \ + ${TESTS:+TESTS="$TESTS"} \ + -k V=2 \ +- SKIP="14 16" \ + check + diff --git a/0050.patch b/0050.patch new file mode 100644 index 0000000..a5606f0 --- /dev/null +++ b/0050.patch @@ -0,0 +1,32 @@ +From 79afb279c273d46b65fafc2c686ed99c5433fe94 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 09:48:02 +0200 +Subject: [PATCH] travis: fedora-test.sh send dnf output to dev/null + +--- + fedora-test.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/fedora-test.sh b/fedora-test.sh +index 5e7d34d6..e7d0f633 100755 +--- a/fedora-test.sh ++++ b/fedora-test.sh +@@ -7,7 +7,7 @@ set -ex + RUN_ID="$1" + TESTS=$2 + +-dnf -y update --best --allowerasing ++dnf -y update --best --allowerasing &>/dev/null + + dnf -y install --best --allowerasing \ + dash \ +@@ -39,7 +39,7 @@ dnf -y install --best --allowerasing \ + /usr/bin/qemu-kvm \ + /usr/bin/qemu-system-$(uname -i) \ + e2fsprogs \ +- $NULL ++ $NULL &>/dev/null + + ./configure + + diff --git a/0051.patch b/0051.patch new file mode 100644 index 0000000..b6f5692 --- /dev/null +++ b/0051.patch @@ -0,0 +1,46 @@ +From c31a80c9edf8603cbdc5d2fe4465571a2ffcdff0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 09:50:52 +0200 +Subject: [PATCH] TEST-01: remove memdebug + +--- + .travis.yml | 6 ++---- + test/TEST-01-BASIC/test.sh | 2 +- + 2 files changed, 3 insertions(+), 5 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index d6d3947c..1f50b6d9 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -4,15 +4,13 @@ services: + - docker + env: + matrix: +- - IMAGE=latest TESTS=01 +- - IMAGE=latest TESTS="02 03 04 10 11 12 13 15 17 18" ++ - IMAGE=latest TESTS="01 02 03 04 10 11 12 13 15 17 18" + - IMAGE=latest TESTS=20 + - IMAGE=latest TESTS="30 31" + - IMAGE=latest TESTS=50 + - IMAGE=latest TESTS=70 + - IMAGE=latest TESTS=99 +- - IMAGE=rawhide TESTS=01 +- - IMAGE=rawhide TESTS="02 03 04 10 11 12 13 15 17 18" ++ - IMAGE=rawhide TESTS="01 02 03 04 10 11 12 13 15 17 18" + - IMAGE=rawhide TESTS=20 + - IMAGE=rawhide TESTS="30 31" + - IMAGE=rawhide TESTS=50 +diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh +index 137249f4..455afef6 100755 +--- a/test/TEST-01-BASIC/test.sh ++++ b/test/TEST-01-BASIC/test.sh +@@ -15,7 +15,7 @@ test_run() { + -net none \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ +- -append "panic=1 root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL rd.memdebug=4" \ ++ -append "panic=1 root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing || return 1 + grep -F -m 1 -q dracut-root-block-success $TESTDIR/result || return 1 + } + diff --git a/0052.patch b/0052.patch new file mode 100644 index 0000000..9264dce --- /dev/null +++ b/0052.patch @@ -0,0 +1,149 @@ +From 51d0a545557d535f814e402fff20274f9e125d85 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 10:16:52 +0200 +Subject: [PATCH] travis: use own logtee.c to reduce log output + +--- + .travis.yml | 12 ++++++------ + Makefile | 3 +++ + fedora-test.sh | 2 +- + logtee.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ + test/test-functions | 15 ++++++++++++++- + 5 files changed, 70 insertions(+), 8 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index 1f50b6d9..5298a816 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -10,12 +10,12 @@ env: + - IMAGE=latest TESTS=50 + - IMAGE=latest TESTS=70 + - IMAGE=latest TESTS=99 +- - IMAGE=rawhide TESTS="01 02 03 04 10 11 12 13 15 17 18" +- - IMAGE=rawhide TESTS=20 +- - IMAGE=rawhide TESTS="30 31" +- - IMAGE=rawhide TESTS=50 +- - IMAGE=rawhide TESTS=70 +- - IMAGE=rawhide TESTS=99 ++# - IMAGE=rawhide TESTS="01 02 03 04 10 11 12 13 15 17 18" ++# - IMAGE=rawhide TESTS=20 ++# - IMAGE=rawhide TESTS="30 31" ++# - IMAGE=rawhide TESTS=50 ++# - IMAGE=rawhide TESTS=70 ++# - IMAGE=rawhide TESTS=99 + + before_script: + - docker pull fedora:$IMAGE +diff --git a/Makefile b/Makefile +index 414fb330..cd02dab0 100644 +--- a/Makefile ++++ b/Makefile +@@ -63,6 +63,9 @@ install/strv.o: install/strv.c install/strv.h install/util.h install/macro.h ins + install/dracut-install: $(DRACUT_INSTALL_OBJECTS) + $(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(KMOD_LIBS) + ++logtee: logtee.c ++ $(CC) $(LDFLAGS) -o $@ $< ++ + dracut-install: install/dracut-install + ln -fs $< $@ + +diff --git a/fedora-test.sh b/fedora-test.sh +index e7d0f633..af38bc33 100755 +--- a/fedora-test.sh ++++ b/fedora-test.sh +@@ -45,7 +45,7 @@ dnf -y install --best --allowerasing \ + + NCPU=$(getconf _NPROCESSORS_ONLN) + +-make -j$NCPU all syncheck rpm ++make -j$NCPU all syncheck rpm logtee + + cd test + +diff --git a/logtee.c b/logtee.c +new file mode 100644 +index 00000000..2f1937d4 +--- /dev/null ++++ b/logtee.c +@@ -0,0 +1,46 @@ ++#define _GNU_SOURCE ++#include ++#include ++#include ++#include ++#include ++#include ++ ++int ++main(int argc, char *argv[]) ++{ ++ int fd; ++ int len, slen; ++ ++ if (argc != 2) { ++ fprintf(stderr, "Usage: %s \n", argv[0]); ++ exit(EXIT_FAILURE); ++ } ++ ++ fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644); ++ if (fd == -1) { ++ perror("open"); ++ exit(EXIT_FAILURE); ++ } ++ ++ fprintf(stderr, "Logging to %s: ", argv[1]); ++ ++ do { ++ len = splice(STDIN_FILENO, NULL, fd, NULL, ++ 65536, SPLICE_F_MOVE); ++ ++ if (len < 0) { ++ if (errno == EAGAIN) ++ continue; ++ perror("tee"); ++ exit(EXIT_FAILURE); ++ } else ++ if (len == 0) ++ break; ++ fprintf(stderr, ".", len); ++ } while (1); ++ close(fd); ++ fprintf(stderr, "\n"); ++ exit(EXIT_SUCCESS); ++} ++ +diff --git a/test/test-functions b/test/test-functions +index d6b28d20..02ceafec 100644 +--- a/test/test-functions ++++ b/test/test-functions +@@ -60,7 +60,7 @@ while (($# > 0)); do + else + echo "TEST: $TEST_DESCRIPTION [STARTED]"; + fi +- if ! [[ "$V" ]]; then ++ if [[ "$V" == "1" ]]; then + ( + test_setup && test_run + ret=$? +@@ -69,6 +69,19 @@ while (($# > 0)); do + rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} + exit $ret + ) test-${TEST_RUN_ID:+-$TEST_RUN_ID}.log 2>&1 ++ elif [[ "$V" == "2" ]]; then ++ set -o pipefail ++ ( ++ test_setup && test_run ++ ret=$? ++ test_cleanup ++ if ((ret!=0)) && [[ -f "$TESTDIR"/server.log ]]; then ++ mv [[ -f "$TESTDIR"/server.log ]] ./server${TEST_RUN_ID:+-$TEST_RUN_ID}.log ++ fi ++ rm -fr -- "$TESTDIR" ++ rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} ++ exit $ret ++ ) &1 | $basedir/logtee test-${TEST_RUN_ID:+-$TEST_RUN_ID}.log + else + set -o pipefail + ( + diff --git a/0053.patch b/0053.patch new file mode 100644 index 0000000..006c0e5 --- /dev/null +++ b/0053.patch @@ -0,0 +1,24 @@ +From 110063c5850ea1cb95dd2af171adff1a03305e60 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 10:29:16 +0200 +Subject: [PATCH] travis: git check + +--- + .travis.yml | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/.travis.yml b/.travis.yml +index 5298a816..72cfe8f9 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -19,6 +19,9 @@ env: + + before_script: + - docker pull fedora:$IMAGE ++- git describe --abbrev=0 --tags || : ++- git describe --tags || : ++ + script: + - docker run --privileged -it -v $(pwd)/:/dracut fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ "$TESTS" + notifications: + diff --git a/0054.patch b/0054.patch new file mode 100644 index 0000000..31318d1 --- /dev/null +++ b/0054.patch @@ -0,0 +1,39 @@ +From 6f90be2971439e84c4efb61d1fc888b165b3f3ca Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 10:33:06 +0200 +Subject: [PATCH] travis: fixup + +--- + .travis.yml | 13 ++++--------- + 1 file changed, 4 insertions(+), 9 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index 72cfe8f9..cd05ceae 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -10,20 +10,15 @@ env: + - IMAGE=latest TESTS=50 + - IMAGE=latest TESTS=70 + - IMAGE=latest TESTS=99 +-# - IMAGE=rawhide TESTS="01 02 03 04 10 11 12 13 15 17 18" +-# - IMAGE=rawhide TESTS=20 +-# - IMAGE=rawhide TESTS="30 31" +-# - IMAGE=rawhide TESTS=50 +-# - IMAGE=rawhide TESTS=70 +-# - IMAGE=rawhide TESTS=99 + + before_script: +-- docker pull fedora:$IMAGE +-- git describe --abbrev=0 --tags || : +-- git describe --tags || : ++ - docker pull fedora:$IMAGE ++ - git describe --abbrev=0 --tags || : ++ - git describe --tags || : + + script: + - docker run --privileged -it -v $(pwd)/:/dracut fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ "$TESTS" ++ + notifications: + webhooks: + urls: + diff --git a/0055.patch b/0055.patch new file mode 100644 index 0000000..0dd70c6 --- /dev/null +++ b/0055.patch @@ -0,0 +1,26 @@ +From 2b77ba0b75dad8f87c141fc517f2999b2e45ae0c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 10:36:17 +0200 +Subject: [PATCH] travis: fight with yaml + +--- + .travis.yml | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index cd05ceae..38b29ca4 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -13,8 +13,9 @@ env: + + before_script: + - docker pull fedora:$IMAGE +- - git describe --abbrev=0 --tags || : +- - git describe --tags || : ++ - | ++ git describe --abbrev=0 --tags || : ++ git describe --tags || : + + script: + - docker run --privileged -it -v $(pwd)/:/dracut fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ "$TESTS" + diff --git a/0056.patch b/0056.patch new file mode 100644 index 0000000..680bd88 --- /dev/null +++ b/0056.patch @@ -0,0 +1,22 @@ +From 9f02b291ac9c315b94d42c4c029645fb1298dac4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 10:39:49 +0200 +Subject: [PATCH] travis: git pull --tags + +--- + .travis.yml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/.travis.yml b/.travis.yml +index 38b29ca4..01be428f 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -13,6 +13,7 @@ env: + + before_script: + - docker pull fedora:$IMAGE ++ - git pull --tags + - | + git describe --abbrev=0 --tags || : + git describe --tags || : + diff --git a/0057.patch b/0057.patch new file mode 100644 index 0000000..413d889 --- /dev/null +++ b/0057.patch @@ -0,0 +1,38 @@ +From 0ae584824519995219857ca7f447e73f31a6da9a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 10:46:57 +0200 +Subject: [PATCH] travis: git pull more depth + +--- + .travis.yml | 2 +- + Makefile | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index 01be428f..2df45f4d 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -13,7 +13,7 @@ env: + + before_script: + - docker pull fedora:$IMAGE +- - git pull --tags ++ - git pull --depth=100 + - | + git describe --abbrev=0 --tags || : + git describe --tags || : +diff --git a/Makefile b/Makefile +index cd02dab0..80623437 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + -include dracut-version.sh + +-VERSION ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags 2>/dev/null || echo $(DRACUT_VERSION)) +-GITVERSION ?= $(shell [ -d .git ] && { v=$$(git describe --tags 2>/dev/null); [ -n "$$v" ] && [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } ) ++VERSION ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags --always 2>/dev/null || echo $(DRACUT_VERSION)) ++GITVERSION ?= $(shell [ -d .git ] && { v=$$(git describe --tags --always 2>/dev/null); [ -n "$$v" ] && [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } ) + + -include Makefile.inc + + diff --git a/0058.patch b/0058.patch new file mode 100644 index 0000000..017b251 --- /dev/null +++ b/0058.patch @@ -0,0 +1,66 @@ +From 67f43d2124cb827f45f4a1f3a2c1aae7cb08378e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 11:13:55 +0200 +Subject: [PATCH] test: fixed test.log name + +--- + test/test-functions | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/test/test-functions b/test/test-functions +index 02ceafec..0c9d88c8 100644 +--- a/test/test-functions ++++ b/test/test-functions +@@ -54,7 +54,7 @@ while (($# > 0)); do + exit $?;; + --all) + check_root +- if ! test_check 2&>test-${TEST_RUN_ID:+-$TEST_RUN_ID}.log ; then ++ if ! test_check 2&>test${TEST_RUN_ID:+-$TEST_RUN_ID}.log ; then + echo -e "TEST: $TEST_DESCRIPTION " $COLOR_WARNING "[SKIPPED]" $COLOR_NORMAL + exit 0; + else +@@ -68,7 +68,7 @@ while (($# > 0)); do + rm -fr -- "$TESTDIR" + rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} + exit $ret +- ) test-${TEST_RUN_ID:+-$TEST_RUN_ID}.log 2>&1 ++ ) test${TEST_RUN_ID:+-$TEST_RUN_ID}.log 2>&1 + elif [[ "$V" == "2" ]]; then + set -o pipefail + ( +@@ -81,7 +81,7 @@ while (($# > 0)); do + rm -fr -- "$TESTDIR" + rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} + exit $ret +- ) &1 | $basedir/logtee test-${TEST_RUN_ID:+-$TEST_RUN_ID}.log ++ ) &1 | $basedir/logtee test${TEST_RUN_ID:+-$TEST_RUN_ID}.log + else + set -o pipefail + ( +@@ -94,20 +94,20 @@ while (($# > 0)); do + rm -fr -- "$TESTDIR" + rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} + exit $ret +- ) &1 | tee test-${TEST_RUN_ID:+-$TEST_RUN_ID}.log ++ ) &1 | tee test${TEST_RUN_ID:+-$TEST_RUN_ID}.log + fi + ret=$? + set +o pipefail + if [ $ret -eq 0 ]; then +- rm -- test-${TEST_RUN_ID:+-$TEST_RUN_ID}.log ++ rm -- test${TEST_RUN_ID:+-$TEST_RUN_ID}.log + echo -e "TEST: $TEST_DESCRIPTION " $COLOR_SUCCESS "[OK]" $COLOR_NORMAL + else + echo -e "TEST: $TEST_DESCRIPTION " $COLOR_FAILURE "[FAILED]" $COLOR_NORMAL + if [ "$V" == "2" ]; then +- cat $(pwd)/server${TEST_RUN_ID:+-$TEST_RUN_ID}.log $(pwd)/test-${TEST_RUN_ID:+-$TEST_RUN_ID}.log ++ cat $(pwd)/server${TEST_RUN_ID:+-$TEST_RUN_ID}.log $(pwd)/test${TEST_RUN_ID:+-$TEST_RUN_ID}.log + echo -e "TEST: $TEST_DESCRIPTION " $COLOR_FAILURE "[FAILED]" $COLOR_NORMAL + else +- echo "see $(pwd)/test-${TEST_RUN_ID:+-$TEST_RUN_ID}.log" ++ echo "see $(pwd)/test${TEST_RUN_ID:+-$TEST_RUN_ID}.log" + fi + fi + exit $ret;; + diff --git a/0059.patch b/0059.patch new file mode 100644 index 0000000..1f96b3f --- /dev/null +++ b/0059.patch @@ -0,0 +1,55 @@ +From f59664a01fa9b525e211fbcb837bf8b54cac9acb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 11:14:11 +0200 +Subject: [PATCH] logtee: reduce output + +--- + logtee.c | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +diff --git a/logtee.c b/logtee.c +index 2f1937d4..2690e72d 100644 +--- a/logtee.c ++++ b/logtee.c +@@ -6,6 +6,8 @@ + #include + #include + ++#define BUFLEN 4096 ++ + int + main(int argc, char *argv[]) + { +@@ -25,9 +27,11 @@ main(int argc, char *argv[]) + + fprintf(stderr, "Logging to %s: ", argv[1]); + ++ slen = 0; ++ + do { + len = splice(STDIN_FILENO, NULL, fd, NULL, +- 65536, SPLICE_F_MOVE); ++ BUFLEN, SPLICE_F_MOVE); + + if (len < 0) { + if (errno == EAGAIN) +@@ -37,10 +41,14 @@ main(int argc, char *argv[]) + } else + if (len == 0) + break; +- fprintf(stderr, ".", len); ++ slen += len; ++ if ((slen/BUFLEN) > 0) { ++ fprintf(stderr, "."); ++ } ++ slen = slen % BUFLEN; ++ + } while (1); + close(fd); + fprintf(stderr, "\n"); + exit(EXIT_SUCCESS); +-} +- ++} +\ No newline at end of file + diff --git a/0060.patch b/0060.patch new file mode 100644 index 0000000..e616f92 --- /dev/null +++ b/0060.patch @@ -0,0 +1,30 @@ +From c128b969bb860dee863fcd3beed1f4097f6fb44a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 11:15:16 +0200 +Subject: [PATCH] travis: combine more tests + +--- + .travis.yml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index 2df45f4d..dfb4a616 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -4,12 +4,12 @@ services: + - docker + env: + matrix: +- - IMAGE=latest TESTS="01 02 03 04 10 11 12 13 15 17 18" ++ - IMAGE=latest TESTS="01 02 03 04 10 11" ++ - IMAGE=latest TESTS="12 13 15 17 18" + - IMAGE=latest TESTS=20 + - IMAGE=latest TESTS="30 31" + - IMAGE=latest TESTS=50 +- - IMAGE=latest TESTS=70 +- - IMAGE=latest TESTS=99 ++ - IMAGE=latest TESTS="70 99" + + before_script: + - docker pull fedora:$IMAGE + diff --git a/0061.patch b/0061.patch new file mode 100644 index 0000000..e322ac1 --- /dev/null +++ b/0061.patch @@ -0,0 +1,23 @@ +From f8cad00948c10107f84b9fcba812589a256f8f80 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 11:47:21 +0200 +Subject: [PATCH] test: for V=2 tail only the last MB of logs + +--- + test/test-functions | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/test-functions b/test/test-functions +index 0c9d88c8..6d7f418b 100644 +--- a/test/test-functions ++++ b/test/test-functions +@@ -104,7 +104,7 @@ while (($# > 0)); do + else + echo -e "TEST: $TEST_DESCRIPTION " $COLOR_FAILURE "[FAILED]" $COLOR_NORMAL + if [ "$V" == "2" ]; then +- cat $(pwd)/server${TEST_RUN_ID:+-$TEST_RUN_ID}.log $(pwd)/test${TEST_RUN_ID:+-$TEST_RUN_ID}.log ++ tail -c 1048576 $(pwd)/server${TEST_RUN_ID:+-$TEST_RUN_ID}.log $(pwd)/test${TEST_RUN_ID:+-$TEST_RUN_ID}.log + echo -e "TEST: $TEST_DESCRIPTION " $COLOR_FAILURE "[FAILED]" $COLOR_NORMAL + else + echo "see $(pwd)/test${TEST_RUN_ID:+-$TEST_RUN_ID}.log" + diff --git a/0062.patch b/0062.patch new file mode 100644 index 0000000..7fbef0d --- /dev/null +++ b/0062.patch @@ -0,0 +1,65 @@ +From 9c034dc326b4acd8e66af15f76f151311a5408bb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 11:57:30 +0200 +Subject: [PATCH] travis: no rpm check for all matrix tests + +--- + .travis.yml | 10 +++++----- + fedora-test.sh | 24 ++++++++++++++---------- + 2 files changed, 19 insertions(+), 15 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index dfb4a616..075cbc6a 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -4,12 +4,12 @@ services: + - docker + env: + matrix: +- - IMAGE=latest TESTS="01 02 03 04 10 11" +- - IMAGE=latest TESTS="12 13 15 17 18" ++ - IMAGE=latest ++ - IMAGE=latest TESTS="01 02 03 04 10 11 12" ++ - IMAGE=latest TESTS="13 15 17 18" + - IMAGE=latest TESTS=20 +- - IMAGE=latest TESTS="30 31" +- - IMAGE=latest TESTS=50 +- - IMAGE=latest TESTS="70 99" ++ - IMAGE=latest TESTS="30 31 99" ++ - IMAGE=latest TESTS="50 70" + + before_script: + - docker pull fedora:$IMAGE +diff --git a/fedora-test.sh b/fedora-test.sh +index af38bc33..87023a84 100755 +--- a/fedora-test.sh ++++ b/fedora-test.sh +@@ -45,13 +45,17 @@ dnf -y install --best --allowerasing \ + + NCPU=$(getconf _NPROCESSORS_ONLN) + +-make -j$NCPU all syncheck rpm logtee +- +-cd test +- +-time sudo make \ +- KVERSION=$(rpm -qa kernel --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' | sort -rn | head -1) \ +- TEST_RUN_ID=$RUN_ID \ +- ${TESTS:+TESTS="$TESTS"} \ +- -k V=2 \ +- check ++if ! [[ $TESTS ]]; then ++ make -j$NCPU all syncheck rpm logtee ++else ++ make -j$NCPU all logtee ++ ++ cd test ++ ++ time sudo make \ ++ KVERSION=$(rpm -qa kernel --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' | sort -rn | head -1) \ ++ TEST_RUN_ID=$RUN_ID \ ++ ${TESTS:+TESTS="$TESTS"} \ ++ -k V=2 \ ++ check ++fi + diff --git a/0063.patch b/0063.patch new file mode 100644 index 0000000..f291125 --- /dev/null +++ b/0063.patch @@ -0,0 +1,45 @@ +From 5a8f1aef556056de88d55bb398443fe2b57eae52 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 11:59:09 +0200 +Subject: [PATCH] TEST-15-BTRFSRAID: sync in test-init + +strange failure +--- + test/TEST-15-BTRFSRAID/test-init.sh | 1 + + test/TEST-15-BTRFSRAID/test.sh | 3 ++- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/test/TEST-15-BTRFSRAID/test-init.sh b/test/TEST-15-BTRFSRAID/test-init.sh +index 8f7cdf3a..ab9021df 100755 +--- a/test/TEST-15-BTRFSRAID/test-init.sh ++++ b/test/TEST-15-BTRFSRAID/test-init.sh +@@ -2,6 +2,7 @@ + export PATH=/sbin:/bin:/usr/sbin:/usr/bin + exec >/dev/console 2>&1 + echo "dracut-root-block-success" >/dev/sda1 ++sync + export TERM=linux + export PS1='initramfs-test:\w\$ ' + [ -f /etc/fstab ] || ln -s /proc/mounts /etc/fstab +diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh +index b8969863..3936ade2 100755 +--- a/test/TEST-15-BTRFSRAID/test.sh ++++ b/test/TEST-15-BTRFSRAID/test.sh +@@ -15,6 +15,7 @@ test_run() { + -append "panic=1 root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + dd if=$DISKIMAGE bs=512 count=4 skip=2048 | grep -F -m 1 -q dracut-root-block-success $DISKIMAGE || return 1 ++ return 0 + } + + test_setup() { +@@ -38,7 +39,7 @@ test_setup() { + mkdir -p -- var/lib/nfs/rpc_pipefs + ) + inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \ +- mount dmesg dhclient mkdir cp ping dhclient ++ mount dmesg dhclient mkdir cp ping dhclient sync + for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do + [ -f ${_terminfodir}/l/linux ] && break + done + diff --git a/0064.patch b/0064.patch new file mode 100644 index 0000000..41044cc --- /dev/null +++ b/0064.patch @@ -0,0 +1,23 @@ +From 2699d8ff7eb41ffafba46194f29bab9670b9e874 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 12:03:40 +0200 +Subject: [PATCH] TEST-99-RPM: removed --releasever + +--- + test/TEST-99-RPM/test.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh +index b76a061b..984b9385 100755 +--- a/test/TEST-99-RPM/test.sh ++++ b/test/TEST-99-RPM/test.sh +@@ -35,7 +35,7 @@ test_run() { + dnf_or_yum_cmd=yum + command -v dnf >/dev/null && { dnf_or_yum="dnf"; dnf_or_yum_cmd="dnf --allowerasing"; } + for (( i=0; i < 5 ; i++)); do +- $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --releasever 29 --disablerepo='*' \ ++ $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --disablerepo='*' \ + --enablerepo=fedora --enablerepo=updates \ + install -y \ + $dnf_or_yum \ + diff --git a/0065.patch b/0065.patch new file mode 100644 index 0000000..d2c4ac3 --- /dev/null +++ b/0065.patch @@ -0,0 +1,50 @@ +From 7c62555bcffd7565883738df5e8c2150e887694f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 13:05:42 +0200 +Subject: [PATCH] TEST-15-BTRFSRAID: use seperate disk image for boot result + +--- + test/TEST-15-BTRFSRAID/test-init.sh | 2 +- + test/TEST-15-BTRFSRAID/test.sh | 10 ++++++---- + 2 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/test/TEST-15-BTRFSRAID/test-init.sh b/test/TEST-15-BTRFSRAID/test-init.sh +index ab9021df..ed66a2b3 100755 +--- a/test/TEST-15-BTRFSRAID/test-init.sh ++++ b/test/TEST-15-BTRFSRAID/test-init.sh +@@ -1,7 +1,7 @@ + #!/bin/sh + export PATH=/sbin:/bin:/usr/sbin:/usr/bin + exec >/dev/console 2>&1 +-echo "dracut-root-block-success" >/dev/sda1 ++echo "dracut-root-block-success" >/dev/sda + sync + export TERM=linux + export PS1='initramfs-test:\w\$ ' +diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh +index 3936ade2..092ed254 100755 +--- a/test/TEST-15-BTRFSRAID/test.sh ++++ b/test/TEST-15-BTRFSRAID/test.sh +@@ -7,15 +7,17 @@ KVERSION=${KVERSION-$(uname -r)} + #DEBUGFAIL="rd.shell" + test_run() { + DISKIMAGE=$TESTDIR/TEST-15-BTRFSRAID-root.img ++ MARKER_DISKIMAGE=$TESTDIR/TEST-15-BTRFSRAID-marker.img ++ dd if=/dev/zero of=$MARKER_DISKIMAGE bs=512 count=10 + $testdir/run-qemu \ +- -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ +- -m 512M -smp 2 -nographic \ ++ -drive format=raw,index=0,media=disk,file=$MARKER_DISKIMAGE \ ++ -drive format=raw,index=1,media=disk,file=$DISKIMAGE \ ++ -m 512M -smp 2 -nographic \ + -net none \ + -no-reboot \ + -append "panic=1 root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing +- dd if=$DISKIMAGE bs=512 count=4 skip=2048 | grep -F -m 1 -q dracut-root-block-success $DISKIMAGE || return 1 +- return 0 ++ grep -F -m 1 -q dracut-root-block-success $MARKER_DISKIMAGE || return 1 + } + + test_setup() { + diff --git a/0066.patch b/0066.patch new file mode 100644 index 0000000..fb3bb99 --- /dev/null +++ b/0066.patch @@ -0,0 +1,29 @@ +From 286685cb720f4150f363487c3702ea12d838f7df Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 13:20:40 +0200 +Subject: [PATCH] TEST-99-RPM: use releasever of the host system + +--- + test/TEST-99-RPM/test.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh +index 984b9385..b4aca176 100755 +--- a/test/TEST-99-RPM/test.sh ++++ b/test/TEST-99-RPM/test.sh +@@ -30,12 +30,12 @@ test_run() { + "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ + "$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ + "$rootdir/$TESTDIR/" +- ++ . /etc/os-release + dnf_or_yum=yum + dnf_or_yum_cmd=yum + command -v dnf >/dev/null && { dnf_or_yum="dnf"; dnf_or_yum_cmd="dnf --allowerasing"; } + for (( i=0; i < 5 ; i++)); do +- $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --disablerepo='*' \ ++ $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --releasever "$VERSION_ID" --disablerepo='*' \ + --enablerepo=fedora --enablerepo=updates \ + install -y \ + $dnf_or_yum \ + diff --git a/0067.patch b/0067.patch new file mode 100644 index 0000000..e260427 --- /dev/null +++ b/0067.patch @@ -0,0 +1,31 @@ +From f059ce76826645569575ee9631b23806764095fe Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 13:56:19 +0200 +Subject: [PATCH] travis: reshuffle tests + +--- + .travis.yml | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index 075cbc6a..8e20054a 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -5,11 +5,11 @@ services: + env: + matrix: + - IMAGE=latest +- - IMAGE=latest TESTS="01 02 03 04 10 11 12" +- - IMAGE=latest TESTS="13 15 17 18" +- - IMAGE=latest TESTS=20 +- - IMAGE=latest TESTS="30 31 99" +- - IMAGE=latest TESTS="50 70" ++ - IMAGE=latest TESTS="13 15 17 18 30 31" ++ - IMAGE=latest TESTS="10 20" ++ - IMAGE=latest TESTS="01 02 03 04 70" ++ - IMAGE=latest TESTS="11 12 99" ++ - IMAGE=latest TESTS="50" + + before_script: + - docker pull fedora:$IMAGE + diff --git a/0068.patch b/0068.patch new file mode 100644 index 0000000..4b87a32 --- /dev/null +++ b/0068.patch @@ -0,0 +1,34 @@ +From 06e12e4ba8d827eedd0882d9918f94758d52a579 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 14:25:23 +0200 +Subject: [PATCH] travis: rebalance tests + +--- + .travis.yml | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index 8e20054a..91ecafed 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -7,12 +7,16 @@ env: + - IMAGE=latest + - IMAGE=latest TESTS="13 15 17 18 30 31" + - IMAGE=latest TESTS="10 20" +- - IMAGE=latest TESTS="01 02 03 04 70" +- - IMAGE=latest TESTS="11 12 99" +- - IMAGE=latest TESTS="50" ++ - IMAGE=latest TESTS="01 02 03 04 11 70" ++ - IMAGE=latest TESTS="12" ++ - IMAGE=latest TESTS="50 99" + + before_script: + - docker pull fedora:$IMAGE ++ - | ++ sudo modprobe kvm-intel nested=y || : ++ sudo modprobe kvm-amd nested=y || : ++ dmesg | tail || : + - git pull --depth=100 + - | + git describe --abbrev=0 --tags || : + diff --git a/0069.patch b/0069.patch new file mode 100644 index 0000000..9cabe22 --- /dev/null +++ b/0069.patch @@ -0,0 +1,30 @@ +From bd03d374b704324b595e2af1901e590ff7c5a92b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 14:28:54 +0200 +Subject: [PATCH] travis: modprobe amd nested=1 + +GREAT! + +$ modinfo kvm-intel kvm-amd| fgrep nested +parm: nested:bool +parm: nested:int +--- + .travis.yml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index 91ecafed..0932805f 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -14,8 +14,8 @@ env: + before_script: + - docker pull fedora:$IMAGE + - | +- sudo modprobe kvm-intel nested=y || : +- sudo modprobe kvm-amd nested=y || : ++ sudo modprobe kvm-intel nested=1 || : ++ sudo modprobe kvm-amd nested=1 || : + dmesg | tail || : + - git pull --depth=100 + - | + diff --git a/0070.patch b/0070.patch new file mode 100644 index 0000000..9d5aa11 --- /dev/null +++ b/0070.patch @@ -0,0 +1,44 @@ +From a17440713acdc943983c61cf12c56aa0a7e3a58d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 14:48:21 +0200 +Subject: [PATCH] travis: reshuffle tests + +long running tests first +--- + .travis.yml | 22 +++++++++++++++++----- + 1 file changed, 17 insertions(+), 5 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index 0932805f..f1aab2a9 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -5,11 +5,23 @@ services: + env: + matrix: + - IMAGE=latest +- - IMAGE=latest TESTS="13 15 17 18 30 31" +- - IMAGE=latest TESTS="10 20" +- - IMAGE=latest TESTS="01 02 03 04 11 70" +- - IMAGE=latest TESTS="12" +- - IMAGE=latest TESTS="50 99" ++ - IMAGE=latest TESTS=01 ++ - IMAGE=latest TESTS=12 ++ - IMAGE=latest TESTS=20 ++ - IMAGE=latest TESTS=50 ++ - IMAGE=latest TESTS=31 ++ - IMAGE=latest TESTS=30 ++ - IMAGE=latest TESTS=70 ++ - IMAGE=latest TESTS=99 ++ - IMAGE=latest TESTS=02 ++ - IMAGE=latest TESTS=03 ++ - IMAGE=latest TESTS=04 ++ - IMAGE=latest TESTS=10 ++ - IMAGE=latest TESTS=11 ++ - IMAGE=latest TESTS=13 ++ - IMAGE=latest TESTS=15 ++ - IMAGE=latest TESTS=17 ++ - IMAGE=latest TESTS=18 + + before_script: + - docker pull fedora:$IMAGE + diff --git a/0071.patch b/0071.patch new file mode 100644 index 0000000..34ebb94 --- /dev/null +++ b/0071.patch @@ -0,0 +1,41 @@ +From f19063ac71b9a82d19f3be7f252bf90d98be454f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 16 Aug 2018 15:28:04 +0200 +Subject: [PATCH] travis: one last job reshuffle + +--- + .travis.yml | 15 +++------------ + 1 file changed, 3 insertions(+), 12 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index f1aab2a9..83e9b4d1 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -5,23 +5,14 @@ services: + env: + matrix: + - IMAGE=latest +- - IMAGE=latest TESTS=01 ++ - IMAGE=latest TESTS="01 02 03 04" + - IMAGE=latest TESTS=12 + - IMAGE=latest TESTS=20 + - IMAGE=latest TESTS=50 +- - IMAGE=latest TESTS=31 +- - IMAGE=latest TESTS=30 ++ - IMAGE=latest TESTS="30 31" + - IMAGE=latest TESTS=70 + - IMAGE=latest TESTS=99 +- - IMAGE=latest TESTS=02 +- - IMAGE=latest TESTS=03 +- - IMAGE=latest TESTS=04 +- - IMAGE=latest TESTS=10 +- - IMAGE=latest TESTS=11 +- - IMAGE=latest TESTS=13 +- - IMAGE=latest TESTS=15 +- - IMAGE=latest TESTS=17 +- - IMAGE=latest TESTS=18 ++ - IMAGE=latest TESTS="10 11 13 15 17" + + before_script: + - docker pull fedora:$IMAGE + diff --git a/0072.patch b/0072.patch new file mode 100644 index 0000000..36d2b42 --- /dev/null +++ b/0072.patch @@ -0,0 +1,142 @@ +From 09132c732a36cc892310b26c829ac00c007d84ec Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 17 Aug 2018 15:38:03 +0200 +Subject: [PATCH] test/test-functions: fixed V=1 logic + +--- + test/test-functions | 96 ++++++++++++++++++++++++++--------------------------- + 1 file changed, 48 insertions(+), 48 deletions(-) + +diff --git a/test/test-functions b/test/test-functions +index 6d7f418b..a6254ec7 100644 +--- a/test/test-functions ++++ b/test/test-functions +@@ -38,79 +38,79 @@ while (($# > 0)); do + case $1 in + --run) + check_root +- echo "TEST RUN: $TEST_DESCRIPTION" +- test_check && test_run +- exit $?;; ++ echo "TEST RUN: $TEST_DESCRIPTION" ++ test_check && test_run ++ exit $?;; + --setup) + check_root +- echo "TEST SETUP: $TEST_DESCRIPTION" +- test_check && test_setup +- exit $?;; ++ echo "TEST SETUP: $TEST_DESCRIPTION" ++ test_check && test_setup ++ exit $?;; + --clean) +- echo "TEST CLEANUP: $TEST_DESCRIPTION" +- test_cleanup +- rm -fr -- "$TESTDIR" +- rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} +- exit $?;; ++ echo "TEST CLEANUP: $TEST_DESCRIPTION" ++ test_cleanup ++ rm -fr -- "$TESTDIR" ++ rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} ++ exit $?;; + --all) + check_root + if ! test_check 2&>test${TEST_RUN_ID:+-$TEST_RUN_ID}.log ; then +- echo -e "TEST: $TEST_DESCRIPTION " $COLOR_WARNING "[SKIPPED]" $COLOR_NORMAL +- exit 0; ++ echo -e "TEST: $TEST_DESCRIPTION " $COLOR_WARNING "[SKIPPED]" $COLOR_NORMAL ++ exit 0; + else +- echo "TEST: $TEST_DESCRIPTION [STARTED]"; ++ echo "TEST: $TEST_DESCRIPTION [STARTED]"; + fi + if [[ "$V" == "1" ]]; then +- ( +- test_setup && test_run +- ret=$? +- test_cleanup +- rm -fr -- "$TESTDIR" +- rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} +- exit $ret +- ) test${TEST_RUN_ID:+-$TEST_RUN_ID}.log 2>&1 +- elif [[ "$V" == "2" ]]; then + set -o pipefail + ( +- test_setup && test_run +- ret=$? +- test_cleanup ++ test_setup && test_run ++ ret=$? ++ test_cleanup + if ((ret!=0)) && [[ -f "$TESTDIR"/server.log ]]; then + mv [[ -f "$TESTDIR"/server.log ]] ./server${TEST_RUN_ID:+-$TEST_RUN_ID}.log + fi +- rm -fr -- "$TESTDIR" +- rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} +- exit $ret +- ) &1 | $basedir/logtee test${TEST_RUN_ID:+-$TEST_RUN_ID}.log +- else ++ rm -fr -- "$TESTDIR" ++ rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} ++ exit $ret ++ ) &1 | tee test${TEST_RUN_ID:+-$TEST_RUN_ID}.log ++ elif [[ "$V" == "2" ]]; then + set -o pipefail + ( +- test_setup && test_run +- ret=$? +- test_cleanup ++ test_setup && test_run ++ ret=$? ++ test_cleanup + if ((ret!=0)) && [[ -f "$TESTDIR"/server.log ]]; then + mv [[ -f "$TESTDIR"/server.log ]] ./server${TEST_RUN_ID:+-$TEST_RUN_ID}.log + fi +- rm -fr -- "$TESTDIR" +- rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} +- exit $ret +- ) &1 | tee test${TEST_RUN_ID:+-$TEST_RUN_ID}.log ++ rm -fr -- "$TESTDIR" ++ rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} ++ exit $ret ++ ) &1 | $basedir/logtee test${TEST_RUN_ID:+-$TEST_RUN_ID}.log ++ else ++ ( ++ test_setup && test_run ++ ret=$? ++ test_cleanup ++ rm -fr -- "$TESTDIR" ++ rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} ++ exit $ret ++ ) test${TEST_RUN_ID:+-$TEST_RUN_ID}.log 2>&1 + fi +- ret=$? ++ ret=$? + set +o pipefail +- if [ $ret -eq 0 ]; then ++ if [ $ret -eq 0 ]; then + rm -- test${TEST_RUN_ID:+-$TEST_RUN_ID}.log +- echo -e "TEST: $TEST_DESCRIPTION " $COLOR_SUCCESS "[OK]" $COLOR_NORMAL +- else +- echo -e "TEST: $TEST_DESCRIPTION " $COLOR_FAILURE "[FAILED]" $COLOR_NORMAL ++ echo -e "TEST: $TEST_DESCRIPTION " $COLOR_SUCCESS "[OK]" $COLOR_NORMAL ++ else ++ echo -e "TEST: $TEST_DESCRIPTION " $COLOR_FAILURE "[FAILED]" $COLOR_NORMAL + if [ "$V" == "2" ]; then +- tail -c 1048576 $(pwd)/server${TEST_RUN_ID:+-$TEST_RUN_ID}.log $(pwd)/test${TEST_RUN_ID:+-$TEST_RUN_ID}.log +- echo -e "TEST: $TEST_DESCRIPTION " $COLOR_FAILURE "[FAILED]" $COLOR_NORMAL ++ tail -c 1048576 $(pwd)/server${TEST_RUN_ID:+-$TEST_RUN_ID}.log $(pwd)/test${TEST_RUN_ID:+-$TEST_RUN_ID}.log ++ echo -e "TEST: $TEST_DESCRIPTION " $COLOR_FAILURE "[FAILED]" $COLOR_NORMAL + else +- echo "see $(pwd)/test${TEST_RUN_ID:+-$TEST_RUN_ID}.log" ++ echo "see $(pwd)/test${TEST_RUN_ID:+-$TEST_RUN_ID}.log" + fi +- fi +- exit $ret;; ++ fi ++ exit $ret;; + *) break ;; + esac + shift + diff --git a/0073.patch b/0073.patch new file mode 100644 index 0000000..19fd209 --- /dev/null +++ b/0073.patch @@ -0,0 +1,44 @@ +From ee18dd2b88d6767902d442baa92c95f7be69c265 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 17 Aug 2018 12:50:29 +0200 +Subject: [PATCH] ifcfg/write-ifcfg.sh: aggregate resolv.conf + +The old code used /tmp/net.$netif.resolv.conf with $netif being randomly +chosen. + +As it is not known which nameserver have which priority, just sort them +and deduplicate. +--- + modules.d/45ifcfg/module-setup.sh | 1 + + modules.d/45ifcfg/write-ifcfg.sh | 5 ++++- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/modules.d/45ifcfg/module-setup.sh b/modules.d/45ifcfg/module-setup.sh +index 6791985a..c89def3e 100755 +--- a/modules.d/45ifcfg/module-setup.sh ++++ b/modules.d/45ifcfg/module-setup.sh +@@ -14,6 +14,7 @@ depends() { + + # called by dracut + install() { ++ inst_binary sort + inst_hook pre-pivot 85 "$moddir/write-ifcfg.sh" + } + +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index 25c81be3..3bf847a5 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -286,7 +286,10 @@ echo "files /etc/sysconfig/network-scripts" >> /run/initramfs/rwtab + echo "files /var/lib/dhclient" >> /run/initramfs/rwtab + { + cp /tmp/net.* /run/initramfs/ +- cp /tmp/net.$netif.resolv.conf /run/initramfs/state/etc/resolv.conf ++ for i in /tmp/net.*.resolv.conf; do ++ [ -f "$i" ] && cat "$i" ++ done | sort -u > /run/initramfs/state/etc/resolv.conf ++ [ -s /run/initramfs/state/etc/resolv.conf ] || rm -f /run/initramfs/state/etc/resolv.conf + copytree /tmp/ifcfg /run/initramfs/state/etc/sysconfig/network-scripts + cp /tmp/ifcfg-leases/* /run/initramfs/state/var/lib/dhclient + } > /dev/null 2>&1 + diff --git a/0074.patch b/0074.patch new file mode 100644 index 0000000..33d82c1 --- /dev/null +++ b/0074.patch @@ -0,0 +1,42 @@ +From e0e6d96d696349c69cffd72a9c4eaf3be3dd22d5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 20 Aug 2018 10:04:52 +0200 +Subject: [PATCH] travis: re-enable test 14 + +https://bugzilla.redhat.com/show_bug.cgi?id=1615271 +--- + .travis.yml | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index 83e9b4d1..f913db57 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -5,14 +5,23 @@ services: + env: + matrix: + - IMAGE=latest +- - IMAGE=latest TESTS="01 02 03 04" ++ - IMAGE=latest TESTS=01 + - IMAGE=latest TESTS=12 + - IMAGE=latest TESTS=20 + - IMAGE=latest TESTS=50 +- - IMAGE=latest TESTS="30 31" ++ - IMAGE=latest TESTS=30 ++ - IMAGE=latest TESTS=31 + - IMAGE=latest TESTS=70 + - IMAGE=latest TESTS=99 +- - IMAGE=latest TESTS="10 11 13 15 17" ++ - IMAGE=latest TESTS=02 ++ - IMAGE=latest TESTS=03 ++ - IMAGE=latest TESTS=04 ++ - IMAGE=latest TESTS=10 ++ - IMAGE=latest TESTS=11 ++ - IMAGE=latest TESTS=13 ++ - IMAGE=latest TESTS=14 ++ - IMAGE=latest TESTS=15 ++ - IMAGE=latest TESTS=17 + + before_script: + - docker pull fedora:$IMAGE + diff --git a/0075.patch b/0075.patch new file mode 100644 index 0000000..beefa3c --- /dev/null +++ b/0075.patch @@ -0,0 +1,129 @@ +From e791d753bed41315cfbd8611e65cc8cd64ea2d15 Mon Sep 17 00:00:00 2001 +From: Frederick Grose +Date: Wed, 1 Aug 2018 18:40:20 -0400 +Subject: [PATCH] livenet: Enable OverlayFS overlay in sysroot.mount generator. + +Adjust sysroot.mount configuration for rd.live.overlay.overlayfs option. +Use link at /dev/root as a consistent flag for wait_for_dev. +Adjust documentation. +--- + dracut.cmdline.7.asc | 9 +++++---- + modules.d/90dmsquash-live/dmsquash-live-root.sh | 5 +++-- + modules.d/90dmsquash-live/parse-dmsquash-live.sh | 2 +- + modules.d/90livenet/livenet-generator.sh | 18 ++++++++++++++---- + 4 files changed, 23 insertions(+), 11 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 9252d253..df633e5d 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -930,7 +930,8 @@ NOTE: There must be enough free RAM available to hold the complete image. + This method is very suitable for diskless boots. + + **root=**live:____:: +-Boots a live image retrieved from ____. Valid handlers: __http, https, ftp, torrent, tftp__. ++Boots a live image retrieved from ____. Requires dracut 'livenet' module. ++Valid handlers: __http, https, ftp, torrent, tftp__. + + + [listing] + .Example +@@ -955,7 +956,7 @@ By default, this is __squashfs.img__. + Copy the complete image to RAM and use this for booting. This is useful + when the image resides on, i.e., a DVD which needs to be ejected later on. + +-**rd.live.overlay=**____:__(|auto)__|__none__:: ++**rd.live.overlay={**____[:__{|auto}__]|__none__}:: + Allow the usage of a permanent overlay. + - __ specifies the path to a device with a mountable filesystem. + - __ is the path to a file within that filesystem, which shall be +@@ -1005,10 +1006,10 @@ extended attributes and provides a valid d_type in readdir responses, such as + with ext4 and xfs. On non-vfat-formatted devices, a persistent OverlayFS + overlay can extend the available root filesystem storage up to the capacity of + the LiveOS device. +- +++ + If a persistent overlay is detected at the standard LiveOS path, the overlay & + overlay type detected (whether OverlayFS or Device-mapper) will be used. +- +++ + The **rd.live.overlay.readonly** option, which allows a persistent overlayfs to + be mounted read only through a higher level transient overlay directory, has + been implemented through the multiple lower layers feature of OverlayFS. +diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh +index 8f3b2bf9..ac603408 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh +@@ -376,19 +376,20 @@ if [ -n "$overlayfs" ]; then + mount -r $FSIMG /run/rootfsbase + fi + if [ -z "$DRACUT_SYSTEMD" ]; then +- #FIXME What to link to /dev/root? Is it even needed? + printf 'mount -t overlay LiveOS_rootfs -o%s,%s %s\n' "$ROOTFLAGS" \ + 'lowerdir=/run/rootfsbase,upperdir=/run/overlayfs,workdir=/run/ovlwork' \ + "$NEWROOT" > $hookdir/mount/01-$$-live.sh + fi ++ _dev=/run/rootfsbase + else +- ln -s /dev/mapper/live-rw /dev/root ++ _dev=/dev/mapper/live-rw + if [ -z "$DRACUT_SYSTEMD" ]; then + [ -n "$ROOTFLAGS" ] && ROOTFLAGS="-o $ROOTFLAGS" + printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh + fi + ln -s $BASE_LOOPDEV /run/rootfsbase + fi ++ln -s $_dev /dev/root + + need_shutdown + +diff --git a/modules.d/90dmsquash-live/parse-dmsquash-live.sh b/modules.d/90dmsquash-live/parse-dmsquash-live.sh +index a9b78ab5..0eedf1f6 100755 +--- a/modules.d/90dmsquash-live/parse-dmsquash-live.sh ++++ b/modules.d/90dmsquash-live/parse-dmsquash-live.sh +@@ -57,6 +57,6 @@ info "root was $liveroot, is now $root" + # make sure that init doesn't complain + [ -z "$root" ] && root="live" + +-wait_for_dev -n /run/rootfsbase ++wait_for_dev -n /dev/root + + return 0 +diff --git a/modules.d/90livenet/livenet-generator.sh b/modules.d/90livenet/livenet-generator.sh +index a349cd0b..e2b5b6eb 100755 +--- a/modules.d/90livenet/livenet-generator.sh ++++ b/modules.d/90livenet/livenet-generator.sh +@@ -43,19 +43,29 @@ GENERATOR_DIR="$2" + + [ -d "$GENERATOR_DIR" ] || mkdir "$GENERATOR_DIR" + ++getargbool 0 rd.live.overlay.overlayfs && overlayfs="yes" ++[ -e /xor_overlayfs ] && xor_overlayfs="yes" + ROOTFLAGS="$(getarg rootflags)" + { + echo "[Unit]" + echo "Before=initrd-root-fs.target" + echo "[Mount]" + echo "Where=/sysroot" +- echo "What=/dev/mapper/live-rw" +- [ -n "$ROOTFLAGS" ] && echo "Options=${ROOTFLAGS}" ++ if [ "$overlayfs$xor_overlayfs" = "yes" ]; then ++ echo "What=LiveOS_rootfs" ++ echo "Options=${ROOTFLAGS},lowerdir=/run/rootfsbase,upperdir=/run/overlayfs,workdir=/run/ovlwork" ++ echo "Type=overlay" ++ _dev=LiveOS_rootfs ++ else ++ echo "What=/dev/mapper/live-rw" ++ [ -n "$ROOTFLAGS" ] && echo "Options=${ROOTFLAGS}" ++ _dev=$'dev-mapper-live\\x2drw' ++ fi + } > "$GENERATOR_DIR"/sysroot.mount + +-mkdir -p "$GENERATOR_DIR/dev-mapper-live\x2drw.device.d" ++mkdir -p "$GENERATOR_DIR/$_dev.device.d" + { + echo "[Unit]" + echo "JobTimeoutSec=3000" + echo "JobRunningTimeoutSec=3000" +-} > "$GENERATOR_DIR/dev-mapper-live\x2drw.device.d/timeout.conf" ++} > "$GENERATOR_DIR/$_dev.device.d/timeout.conf" + diff --git a/0076.patch b/0076.patch new file mode 100644 index 0000000..933102e --- /dev/null +++ b/0076.patch @@ -0,0 +1,361 @@ +From 789668deb3e6f8584ffab964d2204ddcb75f0a06 Mon Sep 17 00:00:00 2001 +From: Frederick Grose +Date: Mon, 20 Aug 2018 09:47:50 -0400 +Subject: [PATCH] dmsquash-live: Support a flattened squashfs.img + +A simplified root filesystem structure may be provided for OverlayFS +overlays by squashing the root filesystem directly instead of squashing +an embedded image file at /LiveOS/rootfs.img. Detect and configure +such a squashed root filesystem for live booting. + +For OverlayFS boots, avoid the read-only Device-mapper linear device + at /dev/mapper/live-base. +Create a consistent device link at /dev/live-base for the read-only + base loop device for all overlayed live root filesystems. +Consistently provide a link at /dev/root for wait_for_dev. + +Update documentation. +--- + dracut.cmdline.7.asc | 126 +++++++++++++++--------- + modules.d/90dmsquash-live/dmsquash-live-root.sh | 51 ++++++---- + 2 files changed, 110 insertions(+), 67 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index df633e5d..882035af 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -838,23 +838,24 @@ Booting live images + Dracut offers multiple options for live booted images: + + ===================== +-SquashFS with read-only filesystem image::: The system will boot with a read +-only filesystem from the SquashFS and apply a writable device-mapper snapshot +-over the read only filesystem. Using this method ensures a relatively fast +-boot and lower RAM usage. Users **must be careful** to avoid writing too many +-blocks to the snapshot volume. Once the blocks of the snapshot overlay are +-exhausted, the root filesystem becomes read only and may cause application +-failures. The overlay file is marked 'Overflow', and a difficult recovery is +-required to repair and enlarge the overlay offline. Non-persistent overlays +-are sparse files in RAM that only consume content space as required blocks are +-allocated. They default to an apparent size of 32 GiB in RAM. The size can be +-adjusted with the **rd.live.overlay.size=** kernel command line option. ++SquashFS with read-only filesystem image::: The system will boot with a ++read-only filesystem from the SquashFS and apply a writable Device-mapper ++snapshot or an OverlayFS overlay mount for the read-only base filesystem. This ++method ensures a relatively fast boot and lower RAM usage. Users **must be ++careful** to avoid writing too many blocks to a snapshot volume. Once the ++blocks of the snapshot overlay are exhausted, the root filesystem becomes ++read-only and may cause application failures. The snapshot overlay file is ++marked 'Overflow', and a difficult recovery is required to repair and enlarge ++the overlay offline. Non-persistent overlays are sparse files in RAM that only ++consume content space as required blocks are allocated. They default to an ++apparent size of 32 GiB in RAM. The size can be adjusted with the ++**rd.live.overlay.size=** kernel command line option. + + +-The filesystem structure is expected to be: ++The filesystem structure is traditionally expected to be: + + + [listing] + -- +-squashfs.img | Squashfs from LiveCD .iso downloaded via network ++squashfs.img | SquashFS from LiveCD .iso + !(mount) + /LiveOS + |- rootfs.img | Filesystem image to mount read-only +@@ -865,21 +866,35 @@ squashfs.img | Squashfs from LiveCD .iso downloaded via network + ... | + -- + + +-Dracut uses this method of live booting by default. No additional command line +-options are required other than **root=live:** to specify the location +-of your squashed filesystem. ++For OverlayFS mount overlays, the filesystem structure may also be a direct ++compression of the root filesystem: +++ ++[listing] ++-- ++squashfs.img | SquashFS from LiveCD .iso ++ !(mount) ++ /bin | Live filesystem ++ /boot | ++ /dev | ++ ... | ++-- +++ ++Dracut uses one of the overlay methods of live booting by default. No ++additional command line options are required other than **root=live:** to ++specify the location of your squashed filesystem. + + + - The compressed SquashFS image can be copied during boot to RAM at + `/run/initramfs/squashed.img` by using the **rd.live.ram=1** option. +-- A device with a persistent overlay can be booted read only by using the ++- A device with a persistent overlay can be booted read-only by using the + **rd.live.overlay.readonly** option on the kernel command line. This will +-cause a temporary, writable overlay to be stacked over a read-only snapshot +-of the root filesystem. ++either cause a temporary, writable overlay to be stacked over a read-only ++snapshot of the root filesystem or the OverlayFS mount will use an additional ++lower layer with the root filesystem. + + + Uncompressed live filesystem image::: + When the live system was installed with the '--skipcompress' option of the + __livecd-iso-to-disk__ installation script for Live USB devices, the root +-filesystem image, `rootfs.img`, is expanded on installation and no SquashFS ++filesystem image, __rootfs.img__, is expanded on installation and no SquashFS + is involved during boot. + + + - If **rd.live.ram=1** is used in this situation, the full, uncompressed +@@ -887,12 +902,12 @@ root filesystem is copied during boot to `/run/initramfs/rootfs.img` in the + `/run` tmpfs. + + + - If **rd.live.overlay=none** is provided as a kernel command line option, +-a writable, linear device-mapper target is created on boot with no overlay. ++a writable, linear Device-mapper target is created on boot with no overlay. + +-writable filesystem image::: ++Writable filesystem image::: + The system will retrieve a compressed filesystem image, extract it to + `/run/initramfs/fsimg/rootfs.img`, connect it to a loop device, create a +-writable, linear device-mapper target at `/dev/mapper/live-rw`, and mount that ++writable, linear Device-mapper target at `/dev/mapper/live-rw`, and mount that + as a writable volume at `/`. More RAM is required during boot but the live + filesystem is easier to manage if it becomes full. Users can make a filesystem + image of any size and that size will be maintained when the system boots. There +@@ -902,7 +917,7 @@ The filesystem structure is expected to be: + + + [listing] + -- +-rootfs.tgz | Compressed tarball containing fileystem image ++rootfs.tgz | Compressed tarball containing filesystem image + !(unpack) + /rootfs.img | Filesystem image at /run/initramfs/fsimg/ + !(mount) +@@ -930,11 +945,11 @@ NOTE: There must be enough free RAM available to hold the complete image. + This method is very suitable for diskless boots. + + **root=**live:____:: +-Boots a live image retrieved from ____. Requires dracut 'livenet' module. +-Valid handlers: __http, https, ftp, torrent, tftp__. ++Boots a live image retrieved from ____. Requires the dracut 'livenet' ++module. Valid handlers: __http, https, ftp, torrent, tftp__. + + + [listing] +-.Example ++.Examples + -- + root=live:http://example.com/liveboot.img + root=live:ftp://ftp.example.com/liveboot.img +@@ -946,7 +961,7 @@ Enables debug output from the live boot process. + + **rd.live.dir=**____:: + Specifies the directory within the boot device where the squashfs.img or +-rootfs.img can be found. By default, this is __LiveOS__. ++rootfs.img can be found. By default, this is `/LiveOS`. + + **rd.live.squashimg=**____:: + Specifies the filename for a SquashFS image of the root filesystem. +@@ -954,35 +969,52 @@ By default, this is __squashfs.img__. + + **rd.live.ram=**1:: + Copy the complete image to RAM and use this for booting. This is useful +-when the image resides on, i.e., a DVD which needs to be ejected later on. ++when the image resides on, e.g., a DVD which needs to be ejected later on. + + **rd.live.overlay={**____[:__{|auto}__]|__none__}:: +-Allow the usage of a permanent overlay. +-- __ specifies the path to a device with a mountable filesystem. +-- __ is the path to a file within that filesystem, which shall be ++Manage the usage of a permanent overlay. +++ ++-- ++* __ specifies the path to a device with a mountable filesystem. ++* __ is the path to a file within that filesystem, which shall be + used to persist the changes made to the device specified by the + **root=live:____** option. +-- _none_ specifies no overlay when an uncompressed live root filesystem is +-available. +-If a persistent overlay is detected at the standard LiveOS path, the overlay & +-overlay type detected (whether Device-mapper or OverlayFS) will be used. +++ ++The default _pathspec_, when _auto_ or no _:_ is given, is ++`/<+++rd.live.dir+++>/overlay-