diff options
author | Matheus Tavares <matheus.bernardino@usp.br> | 2021-01-05 12:47:39 -0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-01-06 15:59:17 -0800 |
commit | ea8bbf2a4eb6632115e2caefc59e28715f8d5e22 (patch) | |
tree | ff6d011c55b7b6fd466f57b5100fa2c8efeacb01 /t/chainlint/block.expect | |
parent | Git 2.30 (diff) | |
download | tgif-ea8bbf2a4eb6632115e2caefc59e28715f8d5e22.tar.xz |
t4129: don't fail if setgid is set in the test directory
The last test of t4129 creates a directory and expects its setgid bit
(g+s) to be off. But this makes the test fail when the parent directory
has the bit set, as setgid's state is inherited by newly created
subdirectories.
One way to solve this problem is to allow the presence of this bit when
comparing the return of `test_modebits` with the expected value. But
then we may have the same problem in the future when other tests start
using `test_modebits` on directories (currently t4129 is the only one)
and forget about setgid. Instead, let's make the helper function more
robust with respect to the state of the setgid bit in the test directory
by removing this bit from the returning value. There should be no
problem with existing callers as no one currently expects this bit to be
on.
Note that the sticky bit (+t) and the setuid bit (u+s) are not
inherited, so we don't have to worry about those.
Reported-by: Kevin Daudt <me@ikke.info>
Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/chainlint/block.expect')
0 files changed, 0 insertions, 0 deletions