coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils-8.12.193-d8dc8: 2 tests skipped: failed to create ext2 fil


From: Jim Meyering
Subject: Re: coreutils-8.12.193-d8dc8: 2 tests skipped: failed to create ext2 file system
Date: Wed, 07 Sep 2011 12:42:10 +0200

Jim Meyering wrote:
> Here are some minor changes I expect to merge into your commit.
> I'll post a complete patch for your ACK before I push it.
>
> (btw, your patch did not apply via "git am FILE"
> due to fuzz in the init.cfg patch, but I managed
> by applying with patch, pasting your log into ChangeLog
> and running vc-dwim --commit.  However that failed
> due to a typo fixed via s/writeable/writable.)
>
> diff --git a/tests/init.cfg b/tests/init.cfg
> index bbd576c..4565907 100644
> --- a/tests/init.cfg
> +++ b/tests/init.cfg
> @@ -180,18 +180,17 @@ uid_is_privileged_()
>    esac
>  }
>
> -# Some distributions do not add /sbin to PATH for non-root users.
> +# Some distributions do not include /sbin in the sudo-to-root PATH.
>  # Test if mkfs is in PATH, otherwise try to adapt PATH.
>  require_mkfs_PATH_()
>  {
> -  which mkfs >/dev/null 2>&1 \
> -    && return
> +  type mkfs && return
>
>    case ":$PATH:" in
>      *:/sbin:*) skip_ "no usable mkfs found" ;;
>    esac
>
> -  [ -x /sbin/mkfs ] \
> +  test -x /sbin/mkfs \
>      || skip_ "no usable mkfs found"

Explaining the code changes above:

    "which" is not portable, so we use the "type" built-in instead.

    coreutils tests consistently use "test ARGS..." rather
    than "[ ARGS... ]" because I prefer the former syntax.
    With it, there is no need to ensure that there is a matching "]".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]