Please provide process for small, targeted fixes in tools/regression

Garrett Cooper yaneurabeya at gmail.com
Wed Apr 30 17:28:04 UTC 2014

On Wed, Apr 30, 2014 at 10:03 AM, Peel, Casey <casey.peel at isilon.com> wrote:
> Julio, here are 3 additional changes in tools/regression to get tests in there to run and pass via prove.
>
> * libutil.diff - fixes test-humanize_number.c to print 1-based test numbers instead of 0-based test numbers as prove expects.
> * mmap.diff - adds .t file to allow running mmap test through prove
> * fifo.diff - adds a top-level Makefile to compile the code in the fifo/ subdirectories. Adds .t to run the tests via prove.

These changes look ok. The only thing (just a consistency nit) is that
I would choose a consistent way of incrementing in loops, i.e.

i=\$(expr \$i + 1)
: \$(( i += 1 ))
i=\$(( \$i + 1 ))

e.g.

\$ cat increment.sh ; sh increment.sh
#!/bin/sh

set -x

sh -c 'i=\$(expr \$i + 1); echo \$i'
sh -c ': \$(( i += 1 )); echo \$i'
sh -c 'i=\$(( \$i + 1 )); echo \$i'
+ sh -c 'i=\$(expr \$i + 1); echo \$i'
1
+ sh -c ': \$(( i += 1 )); echo \$i'
1
+ sh -c 'i=\$(( \$i + 1 )); echo \$i'
1

On the other hand, if it's all going to be converted over to ATF in
the near future, it doesn't really matter :). If you (or Peter) commit
the work to isilon-atf, then I'll do the work required to convert it
(minus the libutil testcases -- these need to be merged into what's in
isilon-atf from NetBSD).

Thanks!
-Garrett