[PATCH] tests: Set the group of the test directory of test-inherit-mode to one of the user's groups
Matt Mackall
mpm at selenic.com
Sun Mar 4 12:43:01 CST 2012
On Fri, 2012-03-02 at 09:01 +0000, Javi Merino wrote:
> On Thu, Mar 01, 2012 at 05:53:10PM -0600, Matt Mackall wrote:
> > On Thu, 2012-03-01 at 23:39 +0000, Javi Merino wrote:
> > > # HG changeset patch
> > > # User Javi Merino <cibervicho at gmail.com>
> > > # Date 1330644592 0
> > > # Node ID 92ce7b21428515eb0b1489e7ba37cfaf152ff54b
> > > # Parent 0196c437ca9fc26d872b21286bee6959f1cd73e6
> > > tests: Set the group of the test directory of test-inherit-mode to one of the user's groups
> > >
> > > Some $TMPDIRs
> >
> > Can you be more specific?
>
> When building the package for the freebsd kernel in Debian,
> test-inherit-mode fails when it tries to set the SGID bit of
> .hg/store
Indeed. SGID (and group management in general) works differently on BSD.
> ---
> --- /build/buildd-mercurial_2.1-2-kfreebsd-amd64-cREvYz/mercurial-2.1/tests/test-inherit-mode.t
> +++ /build/buildd-mercurial_2.1-2-kfreebsd-amd64-cREvYz/mercurial-2.1/tests/test-inherit-mode.t.err
> @@ -139,6 +139,7 @@
> $ cd setgid
> $ chmod g+rwx .hg/store
> $ chmod g+s .hg/store 2> /dev/null
> + [1]
> $ mkdir dir
> $ touch dir/file
> $ hg ci -qAm 'add dir/file'
>
> ERROR:
> /build/buildd-mercurial_2.1-2-kfreebsd-amd64-cREvYz/mercurial-2.1/tests/test-inherit-mode.t output changed
> ---
>
> https://buildd.debian.org/status/fetch.php?pkg=mercurial&arch=kfreebsd-amd64&ver=2.1-2&stamp=1330414397
>
> The test ignores stderr (why?) so you can't see the error message, but
> it is "chmod: changing permissions of `.hg/store': Operation not permitted".
Conveniently, we have an SCM that will answer the "why":
http://www.selenic.com/hg/annotate/8ca25589e960/tests/test-inherit-mode#81
So the right answer here is to arrange to for the return code to be
swallowed too.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list