Re: [PATCH] tests: A new test prereq for testing chmod -w as root

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

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> Some tests depend on not being able to read files after chmod -w. This
> doesn't work when running the tests as root.

Obviously you meant s/read/write/ or "chmod -r" ;-)

We discussed this prerequisite in the past as "SANITY", in the dual sense
that (1) nobody sane should be running tests as root and (2) for root many
normal assumptions programs make do not hold.  If we throw out the former
by saying that it is safe to run tests under fakeroot, we would need
something like this patch to cover the latter.  The patch is a step in the
right direction.

Having said that.

I wonder if we want to be so specific, as your patch does, to single out
"you can write even to a-w file" aspect of rootness, or just want to cover
the rootness more broadly so that other rooty conditions like "if you can
read even an a-r file, then the assumptions the test makes will not hold"
and "if you can kill other's processes, ...ditto..." can also be covered
with a single prerequisite token.

Also I think there was a discussion and proposed patch to support more
than one prerequisite tokens, concatenated with "," or something, like:

    test_expect_success POSIXPERM,SANITY 'notice unwritable repo' '
        ... test that depends on posixperm and not running
        ... as root comes here
    '

so that you don't have to invent permutations of prerequisite tokens.

Thanks.
--
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]