Re: t5539 broken under Mac OS X

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

 



On Thu, Jan 15, 2015 at 12:29:39PM -0800, Junio C Hamano wrote:

> This should not be the final patch (I think it should become a lazy
> prereq as it does a lot more), but just for testing, how does this
> look?
> 
>  t/test-lib.sh | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index bb1402d..cdafab5 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -1033,7 +1033,16 @@ test_lazy_prereq USR_BIN_TIME '
>  
>  # When the tests are run as root, permission tests will report that
>  # things are writable when they shouldn't be.
> -test -w / || test_set_prereq SANITY
> +if test_have_prereq POSIXPERM &&
> +	! test -w / &&
> +	>sanitytest &&
> +	chmod a= sanitytest &&
> +	! (>sanitytest) 2>/dev/null &&
> +	chmod +w sanitytest &&
> +	rm -f sanitytest
> +then
> +	test_set_prereq SANITY
> +fi

The current scheme does not require POSIXPERM. Would this mean that
some platforms no longer runs SANITY tests (e.g., Windows)?

Many of the SANITY-marked tests already require both, but not all. And
certainly lib-httpd actually cares whether you are _truly_ root, not
about weird filesystem permissions. Should lib-httpd literally be
checking the output of `id` (though I can imagine that is anything but
portable)?

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]