[patch] testsuite/cpio.tests: removes the SKIP line

Denys Vlasenko vda.linux at googlemail.com
Tue May 6 09:18:14 PDT 2008


On Tuesday 06 May 2008 15:45, Cristian Ionescu-Idbohrn wrote:
>  #!/bin/sh
> +
> +set -e
> 
> > Why?
> 
> Why not?
> 
> Unhandled errors will abort the rest of the script:
...
> but I believe you already know that.  Scripts, and especially test
> scripts, should handle all possible errors.

Did you actually tried the result?

Original:

# ./runtest cpio
PASS: cpio extracts zero-sized hardlinks
FAIL: cpio lists hardlinks
Failures detected, running with -v (verbose) will give more info

After set -e added to cpio.tests:

# ./runtest cpio
PASS: cpio extracts zero-sized hardlinks
Failures detected, running with -v (verbose) will give more info

After I intentionally broke "cpio extracts zero-sized hardlinks"
test:

# ./runtest cpio
Failures detected, running with -v (verbose) will give more info


Do you think that not showing failed test's name is better?

# ./runtest cpio cut
PASS: cut-cuts-a-character
PASS: cut-cuts-a-closed-range
PASS: cut-cuts-a-field
PASS: cut-cuts-an-open-range
PASS: cut-cuts-an-unclosed-range
PASS: cut '-' (stdin) and multi file handling
Failures detected, running with -v (verbose) will give more info

That's what happens when you are fixing the problems which do not exist.
You run the risk of creating more problems than you fix.
--
vda


More information about the busybox mailing list