From 1fcb190793b55317463cf1674a3d0bb2f00fe4d7 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Fri, 23 Oct 2015 11:34:50 +0200 Subject: btrfs-progs: tests: do not run sudo helper tests if not necessary We use setup_root_helper in some helpers to make sure that the sudo helper is set up, and adding that to each test. Make the real test run only once. Signed-off-by: David Sterba --- tests/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/common b/tests/common index 785280f..4542fa8 100644 --- a/tests/common +++ b/tests/common @@ -157,7 +157,7 @@ root_helper() setup_root_helper() { - if [ $UID -eq 0 ]; then + if [ $UID -eq 0 -o -n "$SUDO_HELPER" ]; then return fi -- cgit v1.2.1