summaryrefslogtreecommitdiffstats
path: root/tests/expected/libmount
Commit message (Collapse)AuthorAgeFilesLines
* tests: (libmount) make X-* and x-* more robustKarel Zak2019-07-152-0/+0
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/818 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add /mnt/test/foo^Mbar to mountinfo testsKarel Zak2019-04-086-0/+28
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/780 Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_table_{find,insert,move}_fs()Karel Zak2019-02-211-0/+1
| | | | | | | | Add functions to insert FS into table to specified position and to move FS between two tables. Co-Author: Tim Hildering <hilderingt@posteo.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add mountinfo with empty sourceKarel Zak2018-07-101-0/+78
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add /proc/swaps libmount parser testKarel Zak2018-03-201-0/+22
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update libmount outputsKarel Zak2017-04-284-6/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: Introduce libmount/loopStanislav Brabec2017-01-169-0/+12
| | | | | | Add libmount/loop test that tests various loop mount options. Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
* tests: add missing fileKarel Zak2016-12-131-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: Preserve empty string value in optstr parsingFilipe Brandenburger2016-08-107-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent mount (since the switch to libmount in v2.22) drops the '=' in mount options that are set to an empty value. For example, the command line below will be affected: # mount -o rw,myopt='' -t tmpfs tmpfs /mnt/tmp Fix that by preserving an empty string in the options passed to the mount(2) syscall when they are present on the command line. Add test cases to ensure empty string handling is working as expected and in order to prevent regressions in the future. Also tested manually by stracing mount commands (on a kernel which accepts a special extra option, for testing purposes.) Before this commit: # strace -e mount ./mount -t tmpfs -o rw,myopt='' tmpfs /mnt/tmp mount("tmpfs", "/mnt/tmp", "tmpfs", MS_MGC_VAL, "myarg") = -1 EINVAL (Invalid argument) After this commit: # strace -e mount ./mount -t tmpfs -o rw,myopt='' tmpfs /mnt/tmp mount("tmpfs", "/mnt/tmp", "tmpfs", MS_MGC_VAL, "myopt=") = 0 All test cases pass, including newly added test cases. Also checked them with valgrind using: $ tests/run.sh --memcheck libmount/optstr Fixes #332. Signed-off-by: Filipe Brandenburger <filbranden@google.com>
* tests: Add loop-overlay testStanislav Brabec2016-08-031-0/+7
| | | | | | | The test will check proper loop device reuse and error in case of overlapping loop device. Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
* tests: improve skipping of old btrfs-toolsRuediger Meier2016-03-132-2/+0Star
| | | | | | | | | | | | | | | | | Older Linux distributions came with differently incomplete btrfs-tools 0.19+git versions (2009-2013). Old mkfs.btrfs needs minimum device size 256M. Note the most simple way to skip btrfs-tools < 3.14 would be btrfs property --help 2>&1 || ts_skip "btrfs too old" but I want to include 3.12 because of Ubuntu Trusty on travis. This patch partly reverts/rewrites the following commits: 7e604f3c - tests: don't skip case "output undefined" 076153f8 - tests: don't compare btrfs mount options 370d31f7 - tests: skip btrfs tests if version too old Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: don't compare btrfs mount optionsKarel Zak2016-03-082-6/+0Star
| | | | | | | | | | | | We don't control mount options in the mountinfo file and the options depend on kernel version. It does not make sense to hardcode the options in the expected outputs. Note that libmount should be portable enough to be able to work with all kernel versions. It seems better to check libmount functionality than kernel mount options formatting. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: don't skip case "output undefined"Ruediger Meier2016-03-073-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | Treat missing expected files as empty and let the test fail if there is non-empty output. Expected output may be missing in these cases: 1. forgot to commit the file after changing/adding a (sub)test 2. a bug in a test where we do tricks with TS_EXPECTED 3. and most notable if ts_die() is called before a subtest is initialized, e.g. in ts_scsi_debug_init() I always wondered why we don't treat this as FAILED. Now we do so, ts_finalize and ts_gen_diff looks much cleaner now. The change discovers that tests with subtest were ignoring the "non-sub" expected files which had to be fixed. BTW we removed any zero sized files. Moreover now we respect diff's return value. In past all test succeeded when diff was not able to write to diffdir, e.g. when running tests as normal user after they run as root. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: add very long mount line to libmount mtabKees Cook2015-08-272-0/+14
| | | | | | | | Very long mount lines from the kernel (either from escaping or from giant option lists) could exceed BUFSIZ, leading to parsing failures. This adds a test for the condition. Signed-off-by: Kees Cook <keescook@chromium.org>
* libmount: cleanup fs root detection codeKarel Zak2015-03-103-3/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add debug testsOndrej Oprala2014-08-133-0/+3
| | | | | Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* tests: update Py parse mountinfo testKarel Zak2014-04-231-0/+11
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update libmount tabdiff testsKarel Zak2014-02-174-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: accept (deleted) path suffix in mountinfo fileKarel Zak2014-02-171-0/+11
| | | | | Addresses: debian bug #711183 Signed-off-by: Karel Zak <kzak@redhat.com>
* pylibmount: add regression testsOndrej Oprala2013-08-1934-0/+767
| | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update libmount fstab full parse testKarel Zak2013-07-031-10/+16
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add functions to safely replace a fs tableOndrej Oprala2013-07-031-0/+24
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* libmount: add functions to handle comments in fs tablesOndrej Oprala2013-07-031-0/+77
| | | | | | Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: add support for x-mount.mkdir[=<mode>] optionOndrej Oprala2013-01-091-0/+1
| | | | | | | | | If the target directory (mountpoint) does not exist then mount(8) will create it before mount.<type> is executed or mount(2) syscall is called. Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add private mnt_get_kernel_cmdline_option()Karel Zak2012-11-081-0/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add libmount optstr deduplicateKarel Zak2012-08-011-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update libmount testsKarel Zak2012-03-025-5/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: test non-canonical paths in fstabKarel Zak2012-02-243-0/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add missing fileKarel Zak2011-09-301-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add -o remount to libmount testsKarel Zak2011-07-251-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add 'none' source to libmount update testsKarel Zak2011-07-216-0/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_tabdiff_* functionsKarel Zak2011-04-265-0/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add support for x-* mount commentsKarel Zak2011-04-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | The current way how add any comment or extra information to /etc/fstab is to use comment="" mount option. This is not too elegant and readable if you want to add more than one comment. It seems better to add any generic prefix that will be used for all 3rd-party userspace mount options. Expected syntax is: x-<application>-<options>[=<data>] For example: x-systemd-bar=managed All x-* options (as well as comment=) are ignored by libmount and not stored to the mtab file. Requested-by: Lennart Poettering <lennart@poettering.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update libmount tests (add optstr output)Karel Zak2011-02-2315-1/+75
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: refresh libmount fstab parser testsKarel Zak2011-01-036-6/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add libmount utab testsKarel Zak2011-01-037-0/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: use separate buffer for userspace options, add mount attributesKarel Zak2011-01-0310-72/+98
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: remove utab from API, update testsKarel Zak2011-01-035-7/+39
| | | | | | | The utab file is private libmount stuff. Anything about utab should not be exported by library API. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: improve libmount context mount and umount testKarel Zak2011-01-037-0/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add basic libmount tests for mountingKarel Zak2011-01-031-0/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add utab update testsKarel Zak2011-01-034-0/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add libmount mtab update testKarel Zak2011-01-036-0/+18
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add quoted optstrKarel Zak2011-01-031-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add libmount lock testKarel Zak2011-01-031-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add libmount utils.c testsKarel Zak2011-01-0316-0/+16
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add libmount tags testsKarel Zak2011-01-036-0/+30
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add libmount mtab testsKarel Zak2011-01-032-0/+60
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add libmount tab_parse.c testsKarel Zak2011-01-036-0/+395
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add libmount optstr.c testsKarel Zak2011-01-0318-0/+24
Signed-off-by: Karel Zak <kzak@redhat.com>