dcavalca / rpms / systemd

Forked from rpms/systemd 4 months ago
Clone
594167
From c16ff9acad53e741ee121a21bd2ba5dfce1f459e Mon Sep 17 00:00:00 2001
594167
From: Frantisek Sumsal <frantisek@sumsal.cz>
594167
Date: Fri, 25 Feb 2022 15:09:07 +0100
594167
Subject: [PATCH] test: accept both unpadded and padded partition sizes
594167
594167
Since util-linux/util-linux@921c7da55ec78350e4067b3fd6b7de6f299106ee
594167
libfdisk aligns the last partition (on GPT) for optimal I/O. Let's
594167
account for that.
594167
594167
Fixes: #22606
594167
(cherry picked from commit d490188b8f6da658d8086dd53b7db95735e5cca1)
594167
594167
Related: #2017035
594167
---
594167
 test/units/testsuite-58.sh | 3 ++-
594167
 1 file changed, 2 insertions(+), 1 deletion(-)
594167
594167
diff --git a/test/units/testsuite-58.sh b/test/units/testsuite-58.sh
594167
index 7aed965fb4..f1b690a71f 100755
594167
--- a/test/units/testsuite-58.sh
594167
+++ b/test/units/testsuite-58.sh
594167
@@ -184,7 +184,8 @@ sfdisk --dump "$LOOP" | tee /tmp/testsuite-58-issue-21817.dump
594167
 losetup -d "$LOOP"
594167
 
594167
 grep -qiF "p1 : start=        2048, size=      102400, type=${root_guid}," /tmp/testsuite-58-issue-21817.dump
594167
-grep -qF 'p2 : start=      104448, size=      100319,' /tmp/testsuite-58-issue-21817.dump
594167
+# Accept both unpadded (pre-v2.38 util-linux) and padded (v2.38+ util-linux) sizes
594167
+grep -qE "p2 : start=      104448, size=      (100319| 98304)," /tmp/testsuite-58-issue-21817.dump
594167
 
594167
 rm /tmp/testsuite-58-issue-21817.img /tmp/testsuite-58-issue-21817.dump
594167
 rm -r /tmp/testsuite-58-issue-21817-defs/