From: oscar.mateo@intel.com Subject: [PATCH] tests/drv_suspend: Replace "&> /dev/null" with "> /dev/null 2>&1" Date: Mon, 11 Nov 2013 15:36:55 +0000 Message-ID: <1384184215-19252-1-git-send-email-oscar.mateo@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A59BFAAF0 for ; Mon, 11 Nov 2013 07:42:03 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org From: Oscar Mateo Some shells do not understand "&>". For instance, my Ubuntu 12.04 machine has /bin/sh pointing to dash, which makes a mess out of "&>" (to the point that the helper processes cannot be killed). Signed-off-by: Oscar Mateo --- tests/drv_suspend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/drv_suspend.c b/tests/drv_suspend.c index e526e2a..9b3df2b 100644 --- a/tests/drv_suspend.c +++ b/tests/drv_suspend.c @@ -106,7 +106,7 @@ test_debugfs_reader(void) static char tmp[1024]; snprintf(tmp, sizeof(tmp) - 1, - "while true; do find %s/%i/ -type f | xargs cat &> /dev/null; done", + "while true; do find %s/%i/ -type f | xargs cat > /dev/null 2>&1; done", dfs_base, drm_get_card()); assert(execl("/bin/sh", "sh", "-c", tmp, (char *) NULL) != -1); } @@ -131,7 +131,7 @@ test_sysfs_reader(void) static char tmp[1024]; snprintf(tmp, sizeof(tmp) - 1, - "while true; do find %s%i*/ -type f | xargs cat &> /dev/null; done", + "while true; do find %s%i*/ -type f | xargs cat > /dev/null 2>&1; done", dfs_base, drm_get_card()); assert(execl("/bin/sh", "sh", "-c", tmp, (char *) NULL) != -1); } -- 1.7.9.5