diff options
Diffstat (limited to 'tests/test_corrupt.sh')
-rwxr-xr-x | tests/test_corrupt.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/test_corrupt.sh b/tests/test_corrupt.sh index 44f1cae..81b0674 100755 --- a/tests/test_corrupt.sh +++ b/tests/test_corrupt.sh @@ -71,24 +71,25 @@ echo "--- Sanity check ---" rm -rf blocks lfs_mktree lfs_chktree +BLOCKS="$(ls blocks | grep -vw '[01]')" echo "--- Block corruption ---" -for i in {0..33} +for b in $BLOCKS do rm -rf blocks mkdir blocks - ln -s /dev/zero blocks/$(printf '%x' $i) + ln -s /dev/zero blocks/$b lfs_mktree lfs_chktree done echo "--- Block persistance ---" -for i in {0..33} +for b in $BLOCKS do rm -rf blocks mkdir blocks lfs_mktree - chmod a-w blocks/$(printf '%x' $i) + chmod a-w blocks/$b || true lfs_mktree lfs_chktree done @@ -96,7 +97,7 @@ done echo "--- Big region corruption ---" rm -rf blocks mkdir blocks -for i in {2..255} +for i in {2..512} do ln -s /dev/zero blocks/$(printf '%x' $i) done @@ -106,7 +107,7 @@ lfs_chktree echo "--- Alternating corruption ---" rm -rf blocks mkdir blocks -for i in {2..511..2} +for i in {2..1024..2} do ln -s /dev/zero blocks/$(printf '%x' $i) done |