btrfs-progs/tests
Qu Wenruo a624680b0e btrfs-progs: fsck-test: Add check_sudo to check valid root/sudo privilege
Although fsck-test/012 uses sudo, it uses 'sudo -n', which won't prompt
user to input password and will return 1 if no valid credential is
found.

And this makes test result quite annoying since it fails to mount and
still continue, which will always fail.

This patch will check 'sudo -v -n' and 'sudo -n true' to determine
whether sudo works fine in different version/settings, since in some
setting/version, 'sudo -v -n' will fail even the user is set NOPASSWD.

Also, remove the 'have_root_helper' variant, since there is a
possibility that sudo credential will timeout during the test and
'have_root_helper' won't help to detect such problem.
New '_sudo' command will do credential check if needed to avoid such
problem.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-03-09 12:08:56 +01:00
..
fsck-tests btrfs-progs: fsck-test: Add check_sudo to check valid root/sudo privilege 2015-03-09 12:08:56 +01:00
common btrfs-progs: fsck-test: Add check_sudo to check valid root/sudo privilege 2015-03-09 12:08:56 +01:00
convert-tests.sh btrfs-progs: tests, adjust alignment of the pretty command name 2015-01-14 18:34:18 +01:00
fsck-tests.sh btrfs-progs: tests, adjust alignment of the pretty command name 2015-01-14 18:34:18 +01:00