diff options
author | Karel Zak | 2016-12-20 16:05:29 +0100 |
---|---|---|
committer | Karel Zak | 2016-12-20 16:05:29 +0100 |
commit | 131af5109f661d2821b82ac03a9e38de0ac31206 (patch) | |
tree | ab9b3fa51c0fe74818244536975898305926a078 | |
parent | libmount: support name=value for mnt_match_options() (diff) | |
download | kernel-qcow2-util-linux-131af5109f661d2821b82ac03a9e38de0ac31206.tar.gz kernel-qcow2-util-linux-131af5109f661d2821b82ac03a9e38de0ac31206.tar.xz kernel-qcow2-util-linux-131af5109f661d2821b82ac03a9e38de0ac31206.zip |
tests: add new findmnt --options tests
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | tests/expected/findmnt/filter-options-name | 7 | ||||
-rw-r--r-- | tests/expected/findmnt/filter-options-nameval | 3 | ||||
-rw-r--r-- | tests/expected/findmnt/filter-options-nameval-multi | 3 | ||||
-rw-r--r-- | tests/expected/findmnt/filter-options-nameval-neg | 34 | ||||
-rwxr-xr-x | tests/ts/findmnt/filter | 25 |
5 files changed, 67 insertions, 5 deletions
diff --git a/tests/expected/findmnt/filter-options-name b/tests/expected/findmnt/filter-options-name new file mode 100644 index 000000000..3c635ae07 --- /dev/null +++ b/tests/expected/findmnt/filter-options-name @@ -0,0 +1,7 @@ +TARGET SOURCE FSTYPE OPTIONS +/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +/sys/kernel/security systemd-1 autofs rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +/sys/kernel/debug systemd-1 autofs rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +/dev/hugepages systemd-1 autofs rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +/dev/mqueue systemd-1 autofs rw,relatime,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +rc=0 diff --git a/tests/expected/findmnt/filter-options-nameval b/tests/expected/findmnt/filter-options-nameval new file mode 100644 index 000000000..21219c524 --- /dev/null +++ b/tests/expected/findmnt/filter-options-nameval @@ -0,0 +1,3 @@ +TARGET SOURCE FSTYPE OPTIONS +/sys/kernel/security systemd-1 autofs rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +rc=0 diff --git a/tests/expected/findmnt/filter-options-nameval-multi b/tests/expected/findmnt/filter-options-nameval-multi new file mode 100644 index 000000000..f2ab3ce4f --- /dev/null +++ b/tests/expected/findmnt/filter-options-nameval-multi @@ -0,0 +1,3 @@ +TARGET SOURCE FSTYPE OPTIONS +/dev/pts devpts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 +rc=0 diff --git a/tests/expected/findmnt/filter-options-nameval-neg b/tests/expected/findmnt/filter-options-nameval-neg new file mode 100644 index 000000000..5471d65af --- /dev/null +++ b/tests/expected/findmnt/filter-options-nameval-neg @@ -0,0 +1,34 @@ +TARGET SOURCE FSTYPE OPTIONS +/ /dev/sda4 ext3 rw,noatime,errors=continue,user_xattr,acl,barrier=0,data=ordered +|-/proc /proc proc rw,relatime +| |-/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +| | `-/proc/sys/fs/binfmt_misc none binfmt_misc rw,relatime +| `-/proc/bus/usb /proc/bus/usb usbfs rw,relatime +|-/sys /sys sysfs rw,relatime +| |-/sys/fs/cgroup tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,mode=755 +| | |-/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd +| | |-/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuset +| | |-/sys/fs/cgroup/ns cgroup cgroup rw,nosuid,nodev,noexec,relatime,ns +| | |-/sys/fs/cgroup/cpu cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpu +| | |-/sys/fs/cgroup/cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuacct +| | |-/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatime,memory +| | |-/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatime,devices +| | |-/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatime,freezer +| | |-/sys/fs/cgroup/net_cls cgroup cgroup rw,nosuid,nodev,noexec,relatime,net_cls +| | `-/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatime,blkio +| |-/sys/kernel/debug systemd-1 autofs rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +| `-/sys/fs/fuse/connections fusectl fusectl rw,relatime +|-/dev udev devtmpfs rw,relatime,size=1983516k,nr_inodes=495879,mode=755 +| |-/dev/pts devpts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 +| |-/dev/shm tmpfs tmpfs rw,relatime +| |-/dev/hugepages systemd-1 autofs rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +| | `-/dev/hugepages hugetlbfs hugetlbfs rw,relatime +| `-/dev/mqueue systemd-1 autofs rw,relatime,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +| `-/dev/mqueue mqueue mqueue rw,relatime +|-/boot /dev/sda6 ext3 rw,noatime,errors=continue,barrier=0,data=ordered +|-/home/kzak /dev/mapper/kzak-home ext4 rw,noatime,barrier=1,data=ordered +| `-/home/kzak/.gvfs gvfs-fuse-daemon fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=500,group_id=500 +|-/var/lib/nfs/rpc_pipefs sunrpc rpc_pipefs rw,relatime +|-/mnt/sounds //foo.home/bar/ cifs rw,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344 +`-/mnt/foo /fooooo bar rw,relatime +rc=0 diff --git a/tests/ts/findmnt/filter b/tests/ts/findmnt/filter index 02e0a306a..b92768ad8 100755 --- a/tests/ts/findmnt/filter +++ b/tests/ts/findmnt/filter @@ -20,30 +20,46 @@ ts_init "$*" ts_check_test_command "$TS_CMD_FINDMNT" - ts_init_subtest "types" $TS_CMD_FINDMNT --types ext3 --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT echo rc=$? >> $TS_OUTPUT ts_finalize_subtest - ts_init_subtest "types-multi" $TS_CMD_FINDMNT --types ext3,ext4, --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT echo rc=$? >> $TS_OUTPUT ts_finalize_subtest - ts_init_subtest "types-neg" $TS_CMD_FINDMNT --types noext3,ext4, --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT echo rc=$? >> $TS_OUTPUT ts_finalize_subtest - ts_init_subtest "options" $TS_CMD_FINDMNT --options relatime --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT echo rc=$? >> $TS_OUTPUT ts_finalize_subtest +ts_init_subtest "options-name" +$TS_CMD_FINDMNT --options fd --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT +echo rc=$? >> $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "options-nameval" +$TS_CMD_FINDMNT --options "fd=22" --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT +echo rc=$? >> $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "options-nameval-neg" +$TS_CMD_FINDMNT --options "nofd=22" --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT +echo rc=$? >> $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "options-nameval-multi" +$TS_CMD_FINDMNT --options "gid=5,mode=620,ptmxmode=000" --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT +echo rc=$? >> $TS_OUTPUT +ts_finalize_subtest + ts_init_subtest "options-neg" $TS_CMD_FINDMNT --options norelatime --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT echo rc=$? >> $TS_OUTPUT @@ -59,6 +75,5 @@ $TS_CMD_FINDMNT --options +nosuid,+nodev,blkio --kernel --tab-file "$TS_SELF/fil echo rc=$? >> $TS_OUTPUT ts_finalize_subtest -ts_finalize_subtest ts_finalize |