From 1b8efb424ca7482ccf46ad772383b62ef16e664e Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Mon, 23 Jul 2018 15:10:06 +0200 Subject: [PATCH] skip zfs tests when not building with root Signed-off-by: Dominik Csapak --- test/run_test_zfspoolplugin.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/run_test_zfspoolplugin.pl b/test/run_test_zfspoolplugin.pl index f6218b1..b093eeb 100755 --- a/test/run_test_zfspoolplugin.pl +++ b/test/run_test_zfspoolplugin.pl @@ -2658,6 +2658,11 @@ sub volume_is_base { return $isBase; } +if ($> != 0) { #EUID + warn "not root, skipping zfs tests\n"; + exit 0; +} + eval { run_command("zpool status"); }; if ($@) { warn "zpool status failed, not running tests: $@\n";