From 7ad6b84be2e86aef3df86af7327b2068759563c9 Mon Sep 17 00:00:00 2001
From: Oksana Salyk <oksana.salyk@intel.com>
Date: Tue, 14 Jan 2020 12:12:33 +0100
Subject: [PATCH] common: fix noisy tests

Ref: pmem/pmdk/issues/4231
---
 src/test/unittest/unittest.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/unittest/unittest.sh b/src/test/unittest/unittest.sh
index d59a9825c..c96bfbadf 100644
--- a/src/test/unittest/unittest.sh
+++ b/src/test/unittest/unittest.sh
@@ -1,5 +1,5 @@
 #
-# Copyright 2014-2019, Intel Corporation
+# Copyright 2014-2020, Intel Corporation
 # Copyright (c) 2016, Microsoft Corporation. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -1031,7 +1031,7 @@ function require_sudo_allowed() {
 		exit 0
 	fi
 
-	if ! timeout --signal=SIGKILL --kill-after=3s 3s sudo date >/dev/null 2>&1
+	if ! sh -c "timeout --signal=SIGKILL --kill-after=3s 3s sudo date" >/dev/null 2>&1
 	then
 		msg "$UNITTEST_NAME: SKIP required: sudo allowed"
 		exit 0
-- 
GitLab