Skip to content

Commit

Permalink
resize2fs: check in test-resize script
Browse files Browse the repository at this point in the history
This should be made into a more formal, automated test case, but for
now, save this as script since it's useful for validating resize2fs's
handling of very large file systems.

Signed-off-by: "Theodore Ts'o" <[email protected]>
  • Loading branch information
tytso committed Jan 16, 2013
1 parent c253c3b commit 921b79b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions resize/test-resize
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

FS=/bigscratch/testfs
FEATURE="-O 64bit"

RESIZE2FS=/tmp/resize2fs.static
MKE2FS=mke2fs
DUMPE2FS=dumpe2fs
E2FSCK=e2fsck

/bin/rm -f $FS ; touch $FS
truncate -s 8T $FS
$MKE2FS -F -t ext4 $FEATURE $FS
$E2FSCK -FY $FS
$DUMPE2FS $FS > /tmp/d1

truncate -s 20T $FS
time $RESIZE2FS -d 31 -p $FS > /tmp/r1
$DUMPE2FS $FS > /tmp/d2
$E2FSCK -fy $FS
$DUMPE2FS $FS > /tmp/d3

truncate -s 21T $FS
time $RESIZE2FS -d 31 -p $FS > /tmp/r2
$DUMPE2FS $FS > /tmp/d4
$E2FSCK -fy $FS
$DUMPE2FS $FS > /tmp/d5

0 comments on commit 921b79b

Please sign in to comment.