]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: Use a portable syntax for seq(1)
authorAlan Somers <asomers@gmail.com>
Fri, 11 Oct 2013 20:48:32 +0000 (13:48 -0700)
committerNoah Watkins <noahwatkins@gmail.com>
Mon, 28 Oct 2013 18:50:50 +0000 (11:50 -0700)
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 <asomers@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
src/test/encoding/check-generated.sh

index 486e2f927f6c8c5b513e23a6d0f63656b2971b02..637e3bca9692b71b57c27581fb883c5bf05d2547 100755 (executable)
@@ -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"