@@ -69,6 +69,7 @@ check options
-cifs test CIFS
-overlay test overlay
-pvfs2 test PVFS2
+ -sdcardfs test sdcardfs
-tmpfs test TMPFS
-ubifs test ubifs
-l line mode diff
@@ -267,6 +268,7 @@ while [ $# -gt 0 ]; do
-cifs) FSTYP=cifs ;;
-overlay) FSTYP=overlay; export OVERLAY=true ;;
-pvfs2) FSTYP=pvfs2 ;;
+ -sdcardfs) FSTYP=sdcardfs ;;
-tmpfs) FSTYP=tmpfs ;;
-ubifs) FSTYP=ubifs ;;
@@ -308,6 +308,9 @@ _mount_opts()
# acls aren't turned on by default on gfs2
export MOUNT_OPTIONS="-o acl $GFS2_MOUNT_OPTIONS"
;;
+ sdcardfs)
+ export MOUNT_OPTIONS=$SDCARDFS_MOUNT_OPTIONS
+ ;;
tmpfs)
# We need to specify the size at mount, use 1G by default
export MOUNT_OPTIONS="-o size=1G $TMPFS_MOUNT_OPTIONS"
@@ -451,7 +454,7 @@ _check_device()
fi
case "$FSTYP" in
- overlay)
+ overlay|sdcardfs)
if [ ! -d "$dev" ]; then
_fatal "common/config: $name ($dev) is not a directory for overlay"
fi
@@ -479,7 +479,7 @@ _scratch_unmount()
overlay)
_overlay_scratch_unmount
;;
- btrfs)
+ btrfs|sdcardfs)
$UMOUNT_PROG $SCRATCH_MNT
;;
*)
@@ -524,11 +524,17 @@ _test_mount()
_test_unmount()
{
- if [ "$FSTYP" == "overlay" ]; then
- _overlay_test_unmount
- else
- $UMOUNT_PROG $TEST_DEV
- fi
+ case "$FSTYP" in
+ "overlay")
+ _overlay_test_unmount
+ ;;
+ "sdcardfs")
+ $UMOUNT_PROG $TEST_DIR
+ ;;
+ *)
+ $UMOUNT_PROG $TEST_DEV
+ ;;
+ esac
}
_test_cycle_mount()
@@ -714,8 +720,8 @@ _test_mkfs()
glusterfs)
# do nothing for glusterfs
;;
- overlay)
- # do nothing for overlay
+ overlay|sdcardfs)
+ # do nothing for overlay|sdcardfs
;;
pvfs2)
# do nothing for pvfs2
@@ -742,8 +748,8 @@ _mkfs_dev()
nfs*)
# do nothing for nfs
;;
- overlay)
- # do nothing for overlay
+ overlay|sdcardfs)
+ # do nothing for overlay|sdcardfs
;;
pvfs2)
# do nothing for pvfs2
@@ -803,7 +809,7 @@ _scratch_mkfs()
local mkfs_status
case $FSTYP in
- nfs*|cifs|ceph|overlay|glusterfs|pvfs2)
+ nfs*|cifs|ceph|overlay|glusterfs|pvfs2|sdcardfs)
# unable to re-create this fstyp, just remove all files in
# $SCRATCH_MNT to avoid EEXIST caused by the leftover files
# created in previous runs
@@ -1595,7 +1601,7 @@ _require_scratch_nocheck()
_notrun "this test requires a valid \$SCRATCH_MNT"
fi
;;
- tmpfs)
+ tmpfs|sdcardfs)
if [ -z "$SCRATCH_DEV" -o ! -d "$SCRATCH_MNT" ];
then
_notrun "this test requires a valid \$SCRATCH_MNT and unique $SCRATCH_DEV"
@@ -1698,7 +1704,7 @@ _require_test()
_notrun "this test requires a valid \$TEST_DIR"
fi
;;
- tmpfs)
+ tmpfs|sdcardfs)
if [ -z "$TEST_DEV" -o ! -d "$TEST_DIR" ];
then
_notrun "this test requires a valid \$TEST_DIR and unique $TEST_DEV"
@@ -2621,6 +2627,9 @@ _check_test_fs()
btrfs)
_check_btrfs_filesystem $TEST_DEV
;;
+ sdcardfs)
+ # no way to check consistency for sdcardfs
+ ;;
tmpfs)
# no way to check consistency for tmpfs
;;
@@ -2673,6 +2682,9 @@ _check_scratch_fs()
btrfs)
_check_btrfs_filesystem $device
;;
+ sdcardfs)
+ # no way to check consistency for sdcardfs
+ ;;
tmpfs)
# no way to check consistency for tmpfs
;;
@@ -44,6 +44,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_test
+_require_test_symlinks
rm -f $seqres.full
@@ -75,6 +75,7 @@ _supported_os Linux
_require_scratch
_require_attrs
+_require_test_symlinks
rm -f $tmp.backup1 $tmp.backup2 $seqres.full
@@ -50,6 +50,7 @@ _supported_os Linux
_require_chattr ia
_require_test_program "t_immutable"
_require_scratch
+_require_test_symlinks
# real QA test starts here
_scratch_mkfs >/dev/null 2>&1 || _fail "mkfs failed"
@@ -52,6 +52,7 @@ addentries()
_supported_fs generic
_supported_os Linux
_require_test
+_require_test_symlinks
rm -f $seqres.full
[ "X$TEST_DIR" = "X" ] && exit 1
@@ -45,6 +45,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_scratch
+_require_test_symlinks
rm -f $seqres.full
@@ -44,6 +44,7 @@ _supported_fs generic
# only Linux supports fallocate
_supported_os Linux
_require_test
+_require_test_symlinks
rm -f $TEST_DIR/ouch*
@@ -47,6 +47,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_scratch
+_require_test_symlinks
rm -f $seqres.full
_scratch_mkfs > $seqres.full 2>&1 || _fail "Could not mkfs scratch device"
@@ -46,6 +46,7 @@ rm -f $seqres.full
_supported_fs generic
_supported_os Linux
_require_test
+_require_test_symlinks
linkfile=$TEST_DIR/$seq.symlink
rm -f $linkfile
@@ -56,6 +56,7 @@ _supported_fs generic
_supported_os Linux
_require_scratch
_require_test_program "t_dir_type"
+_require_test_symlinks
rm -f $seqres.full
Add ability to run generic test on a sdcardfs filesystem. sdcardfs replaces fuse daemon to emulate a sdcard on Android. It is based on wrapfs, a passthru filesystem. Add -sdcardfs option to prevent check from doing mkfs, cleanup of the underlying device. Given sdcardfs does not support links, add _require_test_link to tests that use links. TEST=Check we don't have any kernel crashes when running: export TEST_DEV='/usr/local/autotest/tmp/xfstests_TEST' export SCRATCH_DEV='/usr/local/autotest/tmp/xfstests_SCRATCH' export SHELL='/bin/bash' export SCRATCH_MNT='/usr/local/autotest/tmp/xfstests_sdcarfs_SCRATCH' export PWD='/root' export PATH='/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin' export TEST_DIR='/usr/local/autotest/tmp/xfstests_sdcarfs_TEST' export SELINUX_MOUNT_OPTIONS=' ' export HOME='/root' export SDCARDFS_MOUNT_OPTIONS='-o fsuid=4444,fsgid=4444,gid=4445,multiuser,mask=23,noatime' mkdir -p "${TEST_DEV}" "${SCRATCH_DEV}" "${SCRATCH_MNT}" "${TEST_DIR}" ./check -sdcardfs generic/* Using Android AOSP 4.4 sdcardfs code: In generic directory, 365 tests excluded, 84 ran and 8 failed: generic/087 generic/088 generic/126 generic/184 generic/257 generic/260 generic/306 generic/448 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> --- check | 2 ++ common/config | 5 ++++- common/rc | 38 +++++++++++++++++++++++++------------- tests/generic/002 | 1 + tests/generic/062 | 1 + tests/generic/079 | 1 + tests/generic/089 | 1 + tests/generic/109 | 1 + tests/generic/236 | 1 + tests/generic/294 | 1 + tests/generic/360 | 1 + tests/generic/401 | 1 + 12 files changed, 40 insertions(+), 14 deletions(-)