]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tests: up the image size a little, use twice that size with STRIP_BINARIES=no
authorEvgeny Vereshchagin <evvers@ya.ru>
Sat, 30 Jun 2018 05:19:01 +0000 (05:19 +0000)
committerLennart Poettering <lennart@poettering.net>
Mon, 2 Jul 2018 11:54:26 +0000 (13:54 +0200)
to make sure that there's enough room for unstripped binaries.

test/test-functions

index e69420aecad17dca0db60c95aaa88b92d248a20e..1cefec04f5550004c09ab6d20a70ffea664df315 100644 (file)
@@ -359,14 +359,18 @@ install_missing_libraries() {
 }
 
 create_empty_image() {
+    local _size=500
+    if [[ "$STRIP_BINARIES" = "no" ]]; then
+        _size=$((2*_size))
+    fi
     rm -f "$TESTDIR/rootdisk.img"
     # Create the blank file to use as a root filesystem
-    dd if=/dev/null of="$TESTDIR/rootdisk.img" bs=1M seek=400
+    dd if=/dev/null of="$TESTDIR/rootdisk.img" bs=1M seek="$_size"
     LOOPDEV=$(losetup --show -P -f $TESTDIR/rootdisk.img)
     [ -b "$LOOPDEV" ] || return 1
     echo "LOOPDEV=$LOOPDEV" >> $STATEFILE
     sfdisk "$LOOPDEV" <<EOF
-,390M
+,$((_size-10))M
 ,
 EOF