diff options
author | Brian C. Lane <bcl@redhat.com> | 2021-06-14 14:23:46 -0700 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2021-06-14 15:01:50 -0700 |
commit | f801496427db11cc468065dcd77d1c610c0a1047 (patch) | |
tree | d5bcbe5ce33ee0bb1f6a89fb24d23b6553a08a25 /tests | |
parent | 16751493376db612abcceae5ae81fd798c0a4d18 (diff) | |
download | parted-f801496427db11cc468065dcd77d1c610c0a1047.tar.gz |
tests: t0400 - Work around a mkswap bug by using /dev/zero
mkswap gets stuck, in some situations, when operating on a file full of
holes (see https://bugzilla.redhat.com/show_bug.cgi?id=1971877) so work
around that by using /dev/zero instead of /dev/null
Diffstat (limited to 'tests')
-rw-r--r-- | tests/t0400-loop-clobber-infloop.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/t0400-loop-clobber-infloop.sh b/tests/t0400-loop-clobber-infloop.sh index 2d2190d..d05a8e0 100644 --- a/tests/t0400-loop-clobber-infloop.sh +++ b/tests/t0400-loop-clobber-infloop.sh @@ -22,7 +22,12 @@ N=1M dev=loop-file -dd if=/dev/null of=$dev bs=1 seek=$N || fail=1 + +cleanup_() { + rm -f $dev; +} + +dd if=/dev/zero of=$dev bs=$N count=1 || fail=1 mkswap $dev || fail=1 |