]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: Handle terminal width 0 case for running test in emacs 12146/head
authorDavid Zafman <dzafman@redhat.com>
Wed, 23 Nov 2016 05:41:17 +0000 (21:41 -0800)
committerDavid Zafman <dzafman@redhat.com>
Wed, 23 Nov 2016 05:41:17 +0000 (21:41 -0800)
Signed-off-by: David Zafman <dzafman@redhat.com>
src/test/osd/osd-scrub-repair.sh

index d33af5cc8c067317cfce69356d22266f3b050c8d..242521cc5be31b9f05f29034b50d1d4af38a6dc3 100755 (executable)
@@ -22,7 +22,7 @@ source $CEPH_ROOT/qa/workunits/ceph-helpers.sh
 getjson="no"
 
 termwidth=$(stty -a | head -1 | sed -e 's/.*columns \([0-9]*\).*/\1/')
-if test -n "$termwidth" ; then termwidth="-W ${termwidth}"; fi
+if test -n "$termwidth" -a "$termwidth" != "0"; then termwidth="-W ${termwidth}"; fi
 
 # Ignore the epoch and filter out the attr '_' value because it has date information and won't match
 jqfilter='.inconsistents | (.[].shards[].attrs[] | select(.name == "_") | .value) |= "----Stripped-by-test----"'