tests/drv_suspend: Replace "&> /dev/null" with "> /dev/null 2>&1"
PATCH 1/1 tests/drv_suspend: Replace "&> /dev/null" with "> /dev/null 2>&1"
From: Oscar Mateo <[email protected]>
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 <[email protected]>
--- tests/drv_suspend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tests/drv_suspend.c +2 -2
@@ -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 ); }
Signature · 1 line
1.7.9.5
Quoted 7 lines · On Mon, Nov 11, 2013 at 03:36:55PM +0000, [email protected] wrote:
From: Oscar Mateo <[email protected]>
Some shells do not understand "&>". For instance, my Ubuntu 12.04 machine has
/bin/shpointing to dash, which makes a mess out of "&>" (to the point that the helper processes cannot be killed).Signed-off-by Oscar Mateo <[email protected]>
Looks good to me, pushed. Thanks for the patch.
Signature · 1 line
Damien