From 554caaf6ffc721fe83debe0eb5e555136b01f0bb Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 4 Aug 2011 20:52:31 +0200 Subject: tests: complete the renaming framework_failure -> framework_failure_ These changes were mostly mechanical, made by running the following command: git grep -lw framework_failure | grep -v ChangeLog \ | xargs perl -pi -e 's/\b(framework_failure)\b/${1}_/' and then editing init.cfg and `tests/cp/cp-a-selinux' by hand. * tests/init.cfg (framework_failure): Remove, `framework_failure_' from init.sh should be used instead in the tests. Remove now-obsolete "FIXME" comment. (is_local_dir_, require_strace_, require_membership_in_two_groups_, require_sparse_support_, skip_if_mcstransd_is_running_, mkfifo_or_skip_) Use `framework_failure_', not `framework_failure'. * Many test scripts: Likewise. --- tests/init.cfg | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'tests/init.cfg') diff --git a/tests/init.cfg b/tests/init.cfg index 60c5108d4..d60dd1fdc 100644 --- a/tests/init.cfg +++ b/tests/init.cfg @@ -4,9 +4,6 @@ # TESTS_ENVIRONMENT definition. stderr_fileno_=9 -# FIXME: eventually, FIXME: s/(framework_failure)\>/${1}_/ and remove the -# FIXME: definition of framework_failure below - # Having an unsearchable directory in PATH causes execve to fail with EACCES # when applied to an unresolvable program name, contrary to the desired ENOENT. # Avoid the problem by rewriting PATH to exclude unsearchable directories. @@ -52,7 +49,7 @@ require_acl_() is_local_dir_() { - test $# = 1 || framework_failure + test $# = 1 || framework_failure_ df --local "$1" >/dev/null 2>&1 } @@ -108,7 +105,7 @@ require_readable_root_() # with the named syscall. Usage: require_strace_ unlink require_strace_() { - test $# = 1 || framework_failure + test $# = 1 || framework_failure_ strace -V < /dev/null > /dev/null 2>&1 || skip_ 'no strace program' @@ -265,13 +262,12 @@ require_root_() } skip_if_root_() { uid_is_privileged_ && skip_ "must be run as non-root"; } -framework_failure() { fatal_ 'failure in testing framework'; } # Set `groups' to a space-separated list of at least two groups # of which the user is a member. require_membership_in_two_groups_() { - test $# = 0 || framework_failure + test $# = 0 || framework_failure_ groups=${COREUTILS_GROUPS-`(id -G || /usr/xpg4/bin/id -G) 2>/dev/null`} case "$groups" in @@ -326,7 +322,7 @@ require_dirent_d_type_() # Does the current (working-dir) file system support sparse files? require_sparse_support_() { - test $# = 0 || framework_failure + test $# = 0 || framework_failure_ # Test whether we can create a sparse file. # For example, on Darwin6.5 with a file system of type hfs, it's not possible. # NTFS requires 128K before a hole appears in a sparse file. @@ -342,7 +338,7 @@ require_sparse_support_() mkfifo_or_skip_() { - test $# = 1 || framework_failure + test $# = 1 || framework_failure_ if ! mkfifo "$1"; then # Make an exception of this case -- usually we interpret framework-creation # failure as a test failure. However, in this case, when running on a SunOS @@ -369,12 +365,12 @@ skip_if_setgid_() skip_if_mcstransd_is_running_() { - test $# = 0 || framework_failure + test $# = 0 || framework_failure_ # When mcstransd is running, you'll see only the 3-component # version of file-system context strings. Detect that, # and if it's running, skip this test. - __ctx=$(stat --printf='%C\n' .) || framework_failure + __ctx=$(stat --printf='%C\n' .) || framework_failure_ case $__ctx in *:*:*:*) ;; # four components is ok *) # anything else probably means mcstransd is running -- cgit v1.2.3-54-g00ecf