From: Alan Somers Date: Fri, 11 Oct 2013 20:48:32 +0000 (-0700) Subject: test: Use a portable syntax for seq(1) X-Git-Tag: v0.73~65^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e5efc2929da75bb1d9bede09573c3773fa39ed37;p=ceph.git test: Use a portable syntax for seq(1) Use a portable syntax for seq(1). GNU seq has a default INCR of 1, but BSD seq has a default INCR of either +1 or -1, depending on the other arguments. INCR must be explicitly specified for portability. This bug is the reason that I was running into the segfaults whose fix I reported as BUG #6510. Signed-off-by: Alan Somers Signed-off-by: Noah Watkins --- diff --git a/src/test/encoding/check-generated.sh b/src/test/encoding/check-generated.sh index 486e2f927f6c..637e3bca9692 100755 --- a/src/test/encoding/check-generated.sh +++ b/src/test/encoding/check-generated.sh @@ -14,7 +14,7 @@ echo "numgen type" for type in `./ceph-dencoder list_types`; do num=`./ceph-dencoder type $type count_tests` echo "$num $type" - for n in `seq 1 $num`; do + for n in `seq 1 1 $num 2>/dev/null`; do if ! ./ceph-dencoder type $type select_test $n encode decode; then echo "**** $type test $n encode+decode check failed ****" echo " ceph-dencoder type $type select_test $n encode decode"