]> arthur.barton.de Git - bup.git/commit
Fix the "set -e" problem in the test-meta.sh chattr tests.
authorRob Browning <rlb@defaultvalue.org>
Sat, 26 Oct 2013 20:03:12 +0000 (15:03 -0500)
committerRob Browning <rlb@defaultvalue.org>
Fri, 1 Nov 2013 23:24:16 +0000 (18:24 -0500)
commit58bd58870ff64075891321b378f1198da28cae85
tree2fa6620dfe9857f8c60799fb74e91c4bfa326ddb
parent6f3b9651341d1b10f4e5539f4ea71f8d44c38216
Fix the "set -e" problem in the test-meta.sh chattr tests.

Start fixing the "set -e" problem, beginning with the test-meta.sh
chattr tests, and add support to the test filesystem for options
needed by the chattr calls.

To allow us to produce a more digestable sequence of patches for the
broader "set -e" problem, temporarily establish BUP_SKIP_BROKEN_TESTS
which will do what it says when set, and until we finish repairing
everything, it must be set during any testing:

  BUP_SKIP_BROKEN_TESTS=1 make check

The fundamental issue with "set -e" is that it has some unexpected
(but documented) semantics.  For example:

  set -e
  foo() { false; rm -rf /; }

  # Effectively harmless
  foo

  # Erase the filesystem
  foo || true

If nothing else, this behavior appears to have been masking test
failures.  Better to just avoid "set -e" altogether.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
t/test-meta.sh