mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
QA test updates.
Fix test so that it works with larger inode sizes also.
This commit is contained in:
@@ -81,6 +81,9 @@ _create_proto()
|
|||||||
total=$1
|
total=$1
|
||||||
count=0
|
count=0
|
||||||
|
|
||||||
|
# take inode size into account for non-shortform directories...
|
||||||
|
[ $total -gt 0 ] && total=`expr $total \* $isize / 512`
|
||||||
|
|
||||||
cat >$tmp.proto <<EOF
|
cat >$tmp.proto <<EOF
|
||||||
DUMMY1
|
DUMMY1
|
||||||
0 0
|
0 0
|
||||||
@@ -108,9 +111,12 @@ MKFSV1="-p $tmp.proto -n version=1"
|
|||||||
MKFSV2="-p $tmp.proto -n version=2"
|
MKFSV2="-p $tmp.proto -n version=2"
|
||||||
|
|
||||||
# sanity test - default + one root directory entry
|
# sanity test - default + one root directory entry
|
||||||
|
# Note: must do this proto/mkfs now for later inode size calcs
|
||||||
_create_proto 0
|
_create_proto 0
|
||||||
echo "=== version 1, one entry"
|
echo "=== version 1, one entry"
|
||||||
_scratch_mkfs_xfs $MKFSV1 | _filter_mkfs >/dev/null 2>&1
|
_scratch_mkfs_xfs $MKFSV1 >$tmp.mkfs0 2>&1
|
||||||
|
_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
|
||||||
|
source $tmp.mkfs
|
||||||
_check_repair
|
_check_repair
|
||||||
echo "=== version 2, one entry (shortform)"
|
echo "=== version 2, one entry (shortform)"
|
||||||
_scratch_mkfs_xfs $MKFSV2 | _filter_mkfs >/dev/null 2>&1
|
_scratch_mkfs_xfs $MKFSV2 | _filter_mkfs >/dev/null 2>&1
|
||||||
|
|||||||
@@ -74,8 +74,10 @@ mount()
|
|||||||
_test_mount()
|
_test_mount()
|
||||||
{
|
{
|
||||||
TEST_OPTIONS=""
|
TEST_OPTIONS=""
|
||||||
[ -z "$TEST_RTDEV" ] || TEST_OPTIONS="$TEST_OPTIONS -ortdev=$TEST_RTDEV"
|
[ "$USE_EXTERNAL" = yes -a ! -z "$TEST_RTDEV" ] && \
|
||||||
[ -z "$TEST_LOGDEV" ] || TEST_OPTIONS="$TEST_OPTIONS -ologdev=$TEST_LOGDEV"
|
TEST_OPTIONS="$TEST_OPTIONS -ortdev=$TEST_RTDEV"
|
||||||
|
[ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \
|
||||||
|
TEST_OPTIONS="$TEST_OPTIONS -ologdev=$TEST_LOGDEV"
|
||||||
mount -t xfs $TEST_OPTIONS $* $TEST_DEV $TEST_DIR
|
mount -t xfs $TEST_OPTIONS $* $TEST_DEV $TEST_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user