All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/drv_suspend: Replace "&> /dev/null" with "> /dev/null 2>&1"
@ 2013-11-11 15:36 oscar.mateo
  2013-11-11 18:27 ` Damien Lespiau
  0 siblings, 1 reply; 2+ messages in thread
From: oscar.mateo @ 2013-11-11 15:36 UTC (permalink / raw)
  To: intel-gfx

From: Oscar Mateo <oscar.mateo@intel.com>

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 <oscar.mateo@intel.com>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tests/drv_suspend: Replace "&> /dev/null" with "> /dev/null 2>&1"
  2013-11-11 15:36 [PATCH] tests/drv_suspend: Replace "&> /dev/null" with "> /dev/null 2>&1" oscar.mateo
@ 2013-11-11 18:27 ` Damien Lespiau
  0 siblings, 0 replies; 2+ messages in thread
From: Damien Lespiau @ 2013-11-11 18:27 UTC (permalink / raw)
  To: oscar.mateo; +Cc: intel-gfx

On Mon, Nov 11, 2013 at 03:36:55PM +0000, oscar.mateo@intel.com wrote:
> From: Oscar Mateo <oscar.mateo@intel.com>
> 
> 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 <oscar.mateo@intel.com>

Looks good to me, pushed. Thanks for the patch.

-- 
Damien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-11 18:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-11 15:36 [PATCH] tests/drv_suspend: Replace "&> /dev/null" with "> /dev/null 2>&1" oscar.mateo
2013-11-11 18:27 ` Damien Lespiau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.