Re: rcs-5.8 test failure
"Mr. Aaron W. Swenson" <[email protected]> Mon, 17 Oct 2011 20:48:58 -0400
| Newsgroups | gmane.comp.version-control.rcs.bugs |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Oct 17, 2011 at 04:15:36PM -0700, Paul Eggert wrote:
> On 10/17/11 14:57, Karl Berry wrote:
> > test -w /".
> >
> > Couldn't it fail on NFS-mounted root filesystems?
>
> Yes in theory, but in practice the NFS-mounted root
> file systems that I've dealt with have been explicitly
> root-writable, using no_root_squash in the server's
> /etc/exports or equivalent.
>
> > test -w / could certainly have a false positive
>
> True. (Though at least our tests will pass....)
>
> Perhaps a better approach would be something like the
> following: it avoids the issue for NFS-mounted roots
> in exactly the same way that it avoids it for Cygwin.
>
> --- common-i 2011-08-08 04:54:51.000000000 -0700
> +++ common-i-fix 2011-10-17 16:12:04.686900722 -0700
> @@ -29,10 +29,9 @@ log_rx=
> cmd=
> wdisp=
>
> -case $(uname -s | tr A-Z a-z) in
> - cygwin*) dont_check_readonly=true ;;
> - *) dont_check_readonly=false ;;
> -esac
> +dont_check_readonly=false
> +(umask a-w && test -w $wd/toe >$wd/toe) && dont_check_readonly=true
> +rm -f $wd/toe || problem "$wd/toe not removed"
>
> # functions
>
>
This patch does the trick. There is still the matter of test t150 failing
unless KEEPD or VERBOSE is set.
On a side note, how about using:
touch -c $wd/toe &> /dev/null && dont_check_readonly=true
To test for whether or not it's read-only? You wouldn't have to cleanup
after yourself then.
And isn't 'umask a-w' useless, or am I missing something?
--
Mr. Aaron W. Swenson
Gentoo Linux Developer
Email : [email protected]
GnuPG FP : 2C00 7719 4F85 FB07 A49C 0E31 5713 AA03 D1BB FDA0
GnuPG ID : D1BBFDA0
signature.asc
(application/pgp-signature, 230 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iF4EAREIAAYFAk6czPkACgkQVxOqA9G7/aDLKwD/T04tIUfRmmz4Go7Iit+QIHVG qy9FM9ULkwRtlXTwbXIA+wfllubZ1Cb7qhR9H+dcwFN2nV4mImhB2HFMjtTrKly5 =r257 -----END PGP SIGNATURE-----