]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-58: adjust whitespace and enable pipefail
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 20 Apr 2021 15:07:41 +0000 (17:07 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 23 Apr 2021 13:11:38 +0000 (15:11 +0200)
test/units/testsuite-58.sh

index 772f1b78d4043801ad0f8401bc1af17c957b4319..1fcc882242ebf7aabe4175cbfa6b200b9e99e4d5 100755 (executable)
@@ -1,5 +1,6 @@
 #!/usr/bin/env bash
 set -eux
+set -o pipefail
 
 export SYSTEMD_LOG_LEVEL=debug
 export PAGER=cat
@@ -8,14 +9,14 @@ mkdir -p /tmp/testsuite-58-defs/
 
 # First part: create a disk image and verify its in order
 
-cat > /tmp/testsuite-58-defs/esp.conf <<EOF
+cat >/tmp/testsuite-58-defs/esp.conf <<EOF
 [Partition]
 Type=esp
 SizeMinBytes=10M
 Format=vfat
 EOF
 
-cat > /tmp/testsuite-58-defs/usr.conf <<EOF
+cat >/tmp/testsuite-58-defs/usr.conf <<EOF
 [Partition]
 Type=usr
 SizeMinBytes=10M
@@ -23,7 +24,7 @@ Format=ext4
 ReadOnly=yes
 EOF
 
-cat > /tmp/testsuite-58-defs/root.conf <<EOF
+cat >/tmp/testsuite-58-defs/root.conf <<EOF
 [Partition]
 Type=root
 SizeMinBytes=10M
@@ -31,9 +32,13 @@ Format=ext4
 MakeDirectories=/usr /efi
 EOF
 
-systemd-repart --definitions=/tmp/testsuite-58-defs/ --empty=create --size=auto --seed=750b6cd5c4ae4012a15e7be3c29e6a47 /var/tmp/testsuite-58.img
+systemd-repart --definitions=/tmp/testsuite-58-defs/ \
+               --empty=create \
+               --size=auto \
+               --seed=750b6cd5c4ae4012a15e7be3c29e6a47 \
+               /var/tmp/testsuite-58.img
 
-sfdisk --dump /var/tmp/testsuite-58.img > /tmp/testsuite-58.dump
+sfdisk --dump /var/tmp/testsuite-58.img >/tmp/testsuite-58.dump
 
 grep -qxF '/var/tmp/testsuite-58.img1 : start=        2048, size=       20480, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=39107B09-615D-48FB-BA37-C663885FCE67, name="esp"' /tmp/testsuite-58.dump
 grep -qxF '/var/tmp/testsuite-58.img2 : start=       22528, size=       20480, type=4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709, uuid=60F33797-1D71-4DCB-AA6F-20564F036CD0, name="root-x86-64"' /tmp/testsuite-58.dump
@@ -41,26 +46,31 @@ grep -qxF '/var/tmp/testsuite-58.img3 : start=       43008, size=       20480, t
 
 # Second part, duplicate it with CopyBlocks=auto
 
-cat > /tmp/testsuite-58-defs/esp.conf <<EOF
+cat >/tmp/testsuite-58-defs/esp.conf <<EOF
 [Partition]
 Type=esp
 CopyBlocks=auto
 EOF
 
-cat > /tmp/testsuite-58-defs/usr.conf <<EOF
+cat >/tmp/testsuite-58-defs/usr.conf <<EOF
 [Partition]
 Type=usr
 ReadOnly=yes
 CopyBlocks=auto
 EOF
 
-cat > /tmp/testsuite-58-defs/root.conf <<EOF
+cat >/tmp/testsuite-58-defs/root.conf <<EOF
 [Partition]
 Type=root
 CopyBlocks=auto
 EOF
 
-systemd-repart --definitions=/tmp/testsuite-58-defs/ --empty=create --size=auto --seed=750b6cd5c4ae4012a15e7be3c29e6a47 --image=/var/tmp/testsuite-58.img /var/tmp/testsuite-58.2.img
+systemd-repart --definitions=/tmp/testsuite-58-defs/ \
+               --empty=create \
+               --size=auto \
+               --seed=750b6cd5c4ae4012a15e7be3c29e6a47 \
+               --image=/var/tmp/testsuite-58.img \
+               /var/tmp/testsuite-58.2.img
 
 cmp /var/tmp/testsuite-58.img /var/tmp/testsuite-58.2.img