Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
3
-
9223372036854775807
Description
trap is used in many tests to set actions to perform on cleanup.
IMHO, trap should be registered in this order:
cleanup_test_XX() { undo_something } test_XX() { trap cleanup_test_XX EXIT do_something ... }
Currently many tests do not respect this template.
Among those, some:
- register the trap after do_something();
- explicitly call cleanup_test_XX() at the end of the test;
- call trap 0 at the start of cleanup_test_XX() (this one may be controversial, I believe the test harness should provide, and probably already provides, trap isolation between tests).