Whamcloud - gitweb
blkid: fix swap tests (again)
authorEric Sandeen <sandeen@redhat.com>
Wed, 18 Jun 2008 19:58:55 +0000 (14:58 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 19 Jun 2008 18:30:23 +0000 (14:30 -0400)
Some architectures (ppc ...) need a bigger swapfile than is shipped,
in the test image so the current re-make of swap was failing.

We could either ship a bigger image or just dd a bigger file...

There is one more minor problem with the tests; older mkswap does not
support the -U uuid specification.  I'm not sure offhand what to do
about that problem, or if it really needs fixing.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/blkid/test_probe.in

index 87ac2b2..4ef62a2 100644 (file)
@@ -20,10 +20,13 @@ do
                continue
        fi
        bunzip2 < $SRCDIR/tests/$i.img.bz2 > tests/tmp/test.img.$$
-       # swap is native-endian, so regenerate before testing
        if [ "$i" = "swap0" ]; then
+               # swap is native-endian, so regenerate before testing
+               dd if=/dev/zero of=tests/tmp/test.img.$$ bs=16k count=64
                mkswap -v0 tests/tmp/test.img.$$ > /dev/null
        elif [ "$i" = "swap1" ]; then
+               # swap is native-endian, so regenerate before testing
+               dd if=/dev/zero of=tests/tmp/test.img.$$ bs=16k count=64
                mkswap -v1 -L SWAP-TEST -U 8ff8e77f-8553-485e-8656-58be67a81666 tests/tmp/test.img.$$ >/dev/null
        fi
        ./tst_probe tests/tmp/test.img.$$ > tests/$i.out