Re: [PATCH] tests: avoid one last `...` command substitution in 'test-init.sh'

2012-06-22 Thread Eric Blake
On 06/22/2012 04:28 PM, Stefano Lattarini wrote: >>> - # Guard against failure to spawn sed (seen on MSYS), or empty $argv0. >>> - me=`echo "$argv0" | sed -e 's,.*[\\/],,;s/\.sh$//;s/\.tap$//'` \ >>> -&& test -n "$me" \ >>> -|| { echo "$argv0: failed to define \$me" >&2; exit 99; } >>> +

Re: [PATCH] {master} missing: do not touch timestamps; only warn for out-of-date files

2012-06-22 Thread Stefano Lattarini
On 06/21/2012 09:36 PM, Stefano Lattarini wrote: > On 06/21/2012 05:44 PM, Dave Hart wrote: > >> Looks good. >> > Thanks. I will push by tomorrow if nobody objects. > Pushed. Regards, Stefano

[FYI] Merge branch 'maint' into master

2012-06-22 Thread Stefano Lattarini
commit edbcd8f1948b35f956bba1586d7cc2e628b98338 Merge: 3b83966 5898641 Author: Stefano Lattarini Date: Sat Jun 23 00:16:26 2012 +0200 Merge branch 'maint' * maint: tests: avoid one last `...` command substitution in 'test-init.sh' maintcheck: guard against `...` for command

Re: [PATCH] tests: avoid one last `...` command substitution in 'test-init.sh'

2012-06-22 Thread Stefano Lattarini
Hi Eric. On 06/23/2012 12:17 AM, Eric Blake wrote: > On 06/22/2012 04:13 PM, Stefano Lattarini wrote: >> * t/ax/test-init.sh (me): In the definition of this variable. This >> also shave off a couple of forks, and the need for a sanity check >> only required in fringe situations. >> >> Signed-off-

Re: [PATCH] tests: avoid one last `...` command substitution in 'test-init.sh'

2012-06-22 Thread Eric Blake
On 06/22/2012 04:13 PM, Stefano Lattarini wrote: > * t/ax/test-init.sh (me): In the definition of this variable. This > also shave off a couple of forks, and the need for a sanity check > only required in fringe situations. > > Signed-off-by: Stefano Lattarini > --- > t/ax/test-init.sh | 11 +

[FYI] maintcheck: guard against `...` for command substitution in test cases

2012-06-22 Thread Stefano Lattarini
But still allow them in configure.ac, Makefile.am and shell scripts created or used inside test cases itself, because Autoconf (as of version 2.69) does not yet ensure that $CONFIG_SHELL will be set to a proper POSIX shell. * syntax-checks.mk (sc_tests_command_subst): New check. (syntax-check_rule

[PATCH] tests: avoid one last `...` command substitution in 'test-init.sh'

2012-06-22 Thread Stefano Lattarini
* t/ax/test-init.sh (me): In the definition of this variable. This also shave off a couple of forks, and the need for a sanity check only required in fringe situations. Signed-off-by: Stefano Lattarini --- t/ax/test-init.sh | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) di

[FYI] tests: more uses of $(...) over `...` for command substitution

2012-06-22 Thread Stefano Lattarini
Somehow missed by the previous changes. No big deal, fix them now. * t/ax/depcomp.sh: Here. * t/autodist.sh: And here. * t/autodist-no-duplicate.sh: And here. * t/autodist-subdir.sh: Ad here. * t/remake11.sh t/self-check-me.tap: And here. * t/perf/testsuite-summary.sh: And here. * t/perf/testsuit

[FYI] {maint} cosmetics: quote `like this', not 'like this', in a couple of tests

2012-06-22 Thread Stefano Lattarini
* t/ansi2knr-no-more.sh: Here. * t/aclocal-verbose-install.sh: And here. Signed-off-by: Stefano Lattarini --- t/aclocal-verbose-install.sh |2 +- t/ansi2knr-no-more.sh|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/aclocal-verbose-install.sh b/t/aclocal-ve

[FYI] {maint} readme: clarify/extend few entries in 't/README'

2012-06-22 Thread Stefano Lattarini
* t/README (Writing test cases): Here. Signed-off-by: Stefano Lattarini --- t/README | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/t/README b/t/README index 829b97a..3f56400 100644 --- a/t/README +++ b/t/README @@ -143,7 +143,8 @@ Writin

[FYI] readme: better separation of entries in 't/README'

2012-06-22 Thread Stefano Lattarini
* t/README (Writing test cases): Prepend different entries with a '*' character acting like a bullet in a list. This make different entries better separated, visually-wise. Signed-off-by: Stefano Lattarini --- t/README | 77 -- 1 fil

[FYI] {maint} readme: subsections "Do" and "Do not" in 't/README' merged

2012-06-22 Thread Stefano Lattarini
* t/README (Writing test cases): Merge subsections "Do" and "Do not". The distinction was rather artificial, and more confusing than helpful. Signed-off-by: Stefano Lattarini --- t/README |8 1 file changed, 8 deletions(-) diff --git a/t/README b/t/README index 57cab89..b666d6b 100

[FYI] {maint} tests: new requirement 'grep-nonprint'

2012-06-22 Thread Stefano Lattarini
* t/ax/test-inist.sh ($esc): New, a literal escape character. (grep-nonprint): New requirement, check that the grep implementation available that can handle non-printing characters correctly. * t/color.sh: Use it instead of hand-rolled equivalent, and do not (re)define '$esc' explicitly. * t/color2

[FYI] {maint} cosmetics: fix description of an expected error message in a test

2012-06-22 Thread Stefano Lattarini
* t/vartypo2.sh: Here. This reflects the change from `this style' of quoting to 'this style'. Signed-off-by: Stefano Lattarini --- t/vartypo2.sh | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/t/vartypo2.sh b/t/vartypo2.sh index cc9f4dd..7941fbb

[FYI] {master} tests: assume automake quotes 'like this', not `like this'

2012-06-22 Thread Stefano Lattarini
* t/add-missing.tap: Here. This slightly simplifies and/or enhances some grepping checks on automake diagnostic. Signed-off-by: Stefano Lattarini --- t/add-missing.tap |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/add-missing.tap b/t/add-missing.tap index 6f16a0

[FYI] Merge branch 'maint' into master

2012-06-22 Thread Stefano Lattarini
commit 3b83966e81cd038e79be4225225787d3766c54ec Merge: 062aeb2 13dd512 Author: Stefano Lattarini Date: Fri Jun 22 18:55:01 2012 +0200 Merge branch 'maint' * maint: tests: prefer using 'is_newest' over 'ls -t' hacks tests: implement is_newest as an auxiliary script, not shel

[FYI] Merge branch 'maint' into master

2012-06-22 Thread Stefano Lattarini
commit 3b83966e81cd038e79be4225225787d3766c54ec Merge: 062aeb2 13dd512 Author: Stefano Lattarini Date: Fri Jun 22 18:55:01 2012 +0200 Merge branch 'maint' * maint: tests: prefer using 'is_newest' over 'ls -t' hacks tests: implement is_newest as an auxiliary script, not shel

[FYI] {maint} tests: prefer using 'is_newest' over 'ls -t' hacks

2012-06-22 Thread Stefano Lattarini
To verify that a file 'new' is newer than the file 'old', it's much cleaner to use "is_newest new old" rather than the more clumsy "ls -t". Adjust several of our tests accordingly. * syntax-checks.mk (sc_tests_ls_t): New check, guard against uses of "ls -t" and similar. (syntax_check_rules): Add i

[FYI] {maint} tests: fix some spurious failures in VPATH setup

2012-06-22 Thread Stefano Lattarini
* t/self-check-cleanup.tap: No need to copy the 'ax/t/test-init.sh' file over in our temporary directory. * t/self-check-reexec.tap: Likewise. Signed-off-by: Stefano Lattarini --- t/self-check-cleanup.tap |6 ++ t/self-check-reexec.tap |9 - 2 files changed, 2 insertions(+),

[FYI] {maint} tests: work in VPATH setup again

2012-06-22 Thread Stefano Lattarini
* defs: Drop overly paranoid sanity checks that was causing all the tests to fail spuriously when run in a VPATH setup, with a message like: "../t/nodef.sh: ./t/ax/test-init.sh: not found in current directory". Those checks looked for invariants that, even if broken, would still cause the test to f

[FYI] Merge branch 'maint' into master

2012-06-22 Thread Stefano Lattarini
commit 19c5bd9fa8bbf9e46e37f93b864137e842c2adc2 Merge: 488de31 3a1a8c6 Author: Stefano Lattarini Date: Fri Jun 22 14:52:21 2012 +0200 Merge branch 'maint' * maint: tests: automatic re-execution works for non-POSIX shells too tests: use more POSIX shell features our test scr

[FYI] {maint} tests: automatic re-execution works for non-POSIX shells too

2012-06-22 Thread Stefano Lattarini
Some inferior shells are too greedy in parsing their input. If a non-POSIX Bourne shell (like Solaris 10 /bin/sh) was used to launch one of our test scripts, it would fail unconditionally, because it unexpectedly saw some (by it) unsupported constructs, notwithstanding such constructs being placed

Re: [PATCH] {maint} tests: use more POSIX shell features our test scripts

2012-06-22 Thread Stefano Lattarini
On 06/21/2012 09:38 PM, Stefano Lattarini wrote: > On 06/14/2012 09:55 PM, Stefano Lattarini wrote: >> >>> This is as far as I got in my line-by-line review in the time I have >>> today; if you want to wait for another few days, I can resume my review >>> in time for your initial push. Or you can