| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | # This file is part of util-linux. |
| 4 | # |
| 5 | # This file is free software; you can redistribute it and/or modify |
| 6 | # it under the terms of the GNU General Public License as published by |
| 7 | # the Free Software Foundation; either version 2 of the License, or |
| 8 | # (at your option) any later version. |
| 9 | # |
| 10 | # This file is distributed in the hope that it will be useful, |
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | # GNU General Public License for more details. |
| 14 | |
| 15 | TS_TOPDIR="${0%/*}/../.." |
| 16 | TS_DESC="outputs" |
| 17 | |
| 18 | . "$TS_TOPDIR"/functions.sh |
| 19 | ts_init "$*" |
| 20 | |
| 21 | ts_check_test_command "$TS_CMD_FINDMNT" |
| 22 | |
| 23 | |
| 24 | ts_init_subtest "default" |
| 25 | $TS_CMD_FINDMNT --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT |
| 26 | echoscip-shell system . . echo. rc=$? >> $TS_OUTPUT |
| 27 | ts_finalize_subtest |
| 28 | |
| 29 | ts_init_subtest "kernel" |
| 30 | $TS_CMD_FINDMNT --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT |
| 31 | echoscip-shell system . . echo. rc=$? >> $TS_OUTPUT |
| 32 | ts_finalize_subtest |
| 33 | |
| 34 | ts_init_subtest "force-tree" |
| 35 | $TS_CMD_FINDMNT --tree --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT |
| 36 | echoscip-shell system . . echo. rc=$? >> $TS_OUTPUT |
| 37 | ts_finalize_subtest |
| 38 | |
| 39 | ts_init_subtest "submounts" |
| 40 | $TS_CMD_FINDMNT /sysscip-shell filesystem . . `/sys`. --submounts --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT |
| 41 | echoscip-shell system . . echo. rc=$? >> $TS_OUTPUT |
| 42 | ts_finalize_subtest |
| 43 | |
| 44 | ts_init_subtest "messy-mountinfo" |
| 45 | $TS_CMD_FINDMNT --tab-file "$TS_SELF/files/mountinfo-messy" &> $TS_OUTPUT |
| 46 | echoscip-shell system . . echo. rc=$? >> $TS_OUTPUT |
| 47 | ts_finalize_subtest |
| 48 | |
| 49 | ts_init_subtest "empty-file" |
| 50 | touchscip-shell system . . touch. "$TS_OUTDIR/empty" |
| 51 | $TS_CMD_FINDMNT --tab-file "$TS_OUTDIR/empty" &> $TS_OUTPUT |
| 52 | echoscip-shell system . . echo. rc=$? >> $TS_OUTPUT |
| 53 | ts_finalize_subtest |
| 54 | |
| 55 | ts_finalize |