OSDN Git Service

Merge tag 'android-8.1.0_r1' into oreo-x86
[android-x86/external-toybox.git] / tests / mount.test
index 6590b94..19ba565 100755 (executable)
@@ -7,8 +7,8 @@
 
 #testing "name" "command" "result" "infile" "stdin"
 
-root_fs=`df | grep "\/$" | awk '{print $1}'`
-root_fs_type=`file -sL $root_fs | awk '{print $5}'`
+root_fs=`df | grep "\/$" | cut -d' ' -f1`
+root_fs_type=`blkid -o value $root_fs | tail -1`
 
 tmp_b_fs="tmp_b_fs"
 tmp_b_fs_type="ext3"
@@ -20,6 +20,8 @@ reCreateTmpFs() {
 }
 reCreateTmpFs
 
+# TODO: replace /mnt with a directory we know exists. (Android has no /mnt.)
+
 testing "$root_fs /mnt" \
   "mount $root_fs /mnt >/dev/null 2>&1 && mkdir /mnt/testDir &&
    sleep 1 && umount /mnt && test -e /testDir && rmdir /testDir" "" "" ""