From 8dc32a93fca3908e1f874393bcd56b89de269e2b Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 28 Jul 2015 19:15:44 +0530 Subject: tests: reset IFS after changing it Many thanks to fanghuang.data@yahoo.com for RC and BUG https://bugzilla.redhat.com/show_bug.cgi?id=1245425#c0 BUG: 1245425 Change-Id: I411384ad2b81db9941ac136f4e584a3a965d53f1 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/11779 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Raghavendra Talur --- tests/include.rc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/include.rc') diff --git a/tests/include.rc b/tests/include.rc index 1272cdecbda..4a35a7d04cf 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -843,12 +843,15 @@ log_newer() msg=$2 logdir=`$CLI --print-logdir` + local x_ifs=$IFS IFS="[" for date in `grep -hr "$msg" $logdir | grep -v "G_LOG" | awk -F '[\]]' '{print $1}'` ; do if [ `date -d "$date" +%s` -gt $ts ] ; then + IFS=$x_ifs return 0; fi done 2>/dev/null + IFS=$x_ifs return 1 } -- cgit