diff options
author | Elliott Hughes <enh@google.com> | 2017-04-03 08:33:23 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2017-04-07 11:45:48 -0500 |
commit | 2f6c9e87b1c4cdba68ff2de6159ddfd4d05f1d8d (patch) | |
tree | af8490e3746ab1b9ff22afc710f5c01378831612 /tests | |
parent | fc0385fb2bae2d82622b76ebb39067db0bdd7baf (diff) | |
download | toybox-2f6c9e87b1c4cdba68ff2de6159ddfd4d05f1d8d.tar.gz |
Remove mount.test awk dependency.
Parsing file(1) output isn't a good way to determine file system type anyway.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/mount.test | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/mount.test b/tests/mount.test index 6590b946..19ba5654 100755 --- a/tests/mount.test +++ b/tests/mount.test @@ -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" "" "" "" |