From: Zbigniew Jędrzejewski-Szmek Date: Sat, 11 Jul 2020 14:19:03 +0000 (+0200) Subject: repart: include more relevant information in the warning message, fix test X-Git-Tag: v246-rc2~86 X-Git-Url: http://git-history.diyao.me/?a=commitdiff_plain;h=46072ae35a77bcabf34f47905eb787dbfa59db17;p=systemd%2F.git repart: include more relevant information in the warning message, fix test The test would always fail with a long uname. In F33 this is right now "5.8.0-0.rc2.20200622git625d3449788f.1.fc33.x86_64" which caused the test to always fail. --- diff --git a/src/partition/repart.c b/src/partition/repart.c index 3080521279..69df751563 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -917,7 +917,8 @@ static int config_parse_label( if (char16_strlen(recoded) > 36) { log_syntax(unit, LOG_WARNING, filename, line, 0, - "Partition label too long for GPT table, ignoring: %s", rvalue); + "Partition label too long for GPT table, ignoring: \"%s\" (from \"%s\")", + resolved, rvalue); return 0; } diff --git a/src/partition/test-repart.sh b/src/partition/test-repart.sh index 7d63eb4664..bfb9bcb4c9 100755 --- a/src/partition/test-repart.sh +++ b/src/partition/test-repart.sh @@ -12,7 +12,7 @@ SEED=e2a40bf9-73f1-4278-9160-49c031e7aef8 $repart $D/zzz --empty=create --size=1G --seed=$SEED -sfdisk -d $D/zzz | grep -v -e 'sector-size' -e '^$' > $D/empty +sfdisk -d $D/zzz | grep -v -e 'sector-size' -e '^$' >$D/empty cmp $D/empty - <$D/definitions/home.conf < $D/definitions/swap.conf <$D/definitions/swap.conf <$D/populated -UNAME=`uname -r` - cmp $D/populated - <> $D/definitions/home.conf -echo "UUID=b0b1b2b3b4b5b6b7b8b9babbbcbdbebf" >> $D/definitions/home.conf +echo "Label=ignored_label" >>$D/definitions/home.conf +echo "UUID=b0b1b2b3b4b5b6b7b8b9babbbcbdbebf" >>$D/definitions/home.conf $repart $D/zzz --dry-run=no --seed=$SEED --definitions=$D/definitions @@ -89,7 +88,7 @@ device: $D/zzz unit: sectors first-lba: 2048 last-lba: 2097118 -$D/zzz1 : start= 2048, size= 591856, type=933AC7E1-2EB4-4F13-B844-0E14E2AEF915, uuid=A6005774-F558-4330-A8E5-D6D2C01C01D6, name="home-$UNAME" +$D/zzz1 : start= 2048, size= 591856, type=933AC7E1-2EB4-4F13-B844-0E14E2AEF915, uuid=A6005774-F558-4330-A8E5-D6D2C01C01D6, name="home-first" $D/zzz2 : start= 593904, size= 591856, type=4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709, uuid=CE9C76EB-A8F1-40FF-813C-11DCA6C0A55B, name="root-x86-64" $D/zzz3 : start= 1185760, size= 591864, type=4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709, uuid=AC60A837-550C-43BD-B5C4-9CB73B884E79, name="root-x86-64-2" $D/zzz4 : start= 1777624, size= 131072, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, uuid=2AA78CDB-59C7-4173-AF11-C7453737A5D1, name="swap" @@ -107,7 +106,7 @@ device: $D/zzz unit: sectors first-lba: 2048 last-lba: 4194270 -$D/zzz1 : start= 2048, size= 591856, type=933AC7E1-2EB4-4F13-B844-0E14E2AEF915, uuid=A6005774-F558-4330-A8E5-D6D2C01C01D6, name="home-$UNAME" +$D/zzz1 : start= 2048, size= 591856, type=933AC7E1-2EB4-4F13-B844-0E14E2AEF915, uuid=A6005774-F558-4330-A8E5-D6D2C01C01D6, name="home-first" $D/zzz2 : start= 593904, size= 591856, type=4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709, uuid=CE9C76EB-A8F1-40FF-813C-11DCA6C0A55B, name="root-x86-64" $D/zzz3 : start= 1185760, size= 591864, type=4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709, uuid=AC60A837-550C-43BD-B5C4-9CB73B884E79, name="root-x86-64-2" $D/zzz4 : start= 1777624, size= 131072, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, uuid=2AA78CDB-59C7-4173-AF11-C7453737A5D1, name="swap" @@ -135,7 +134,7 @@ device: $D/zzz unit: sectors first-lba: 2048 last-lba: 6291422 -$D/zzz1 : start= 2048, size= 591856, type=933AC7E1-2EB4-4F13-B844-0E14E2AEF915, uuid=A6005774-F558-4330-A8E5-D6D2C01C01D6, name="home-$UNAME" +$D/zzz1 : start= 2048, size= 591856, type=933AC7E1-2EB4-4F13-B844-0E14E2AEF915, uuid=A6005774-F558-4330-A8E5-D6D2C01C01D6, name="home-first" $D/zzz2 : start= 593904, size= 591856, type=4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709, uuid=CE9C76EB-A8F1-40FF-813C-11DCA6C0A55B, name="root-x86-64" $D/zzz3 : start= 1185760, size= 591864, type=4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709, uuid=AC60A837-550C-43BD-B5C4-9CB73B884E79, name="root-x86-64-2" $D/zzz4 : start= 1777624, size= 131072, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, uuid=2AA78CDB-59C7-4173-AF11-C7453737A5D1, name="swap"