git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t4129: don't fail if setgid is set in the parent directory

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 4, 2021, 23:57 UTC
Message-ID
<xmqqpn2k1ci0.fsf@gitster.c.googlers.com>
In-Reply-To
<88398ff952a68e8d134dcd50ef0772bb6fc3b456.1609339792.git.matheus.bernardino@usp.br>
Matheus Tavares <matheus.bernardino@usp.br> writes:
Show 20 quoted lines
> diff --git a/t/t4129-apply-samemode.sh b/t/t4129-apply-samemode.sh
> index 41818d8315..3818398ca9 100755
> --- a/t/t4129-apply-samemode.sh
> +++ b/t/t4129-apply-samemode.sh
> @@ -90,12 +90,10 @@ test_expect_success POSIXPERM 'do not use core.sharedRepository for working tree
>  		rm -rf d f1 &&
>  		git apply patch-f1-and-f2.txt &&
>  
> -		echo "-rw-------" >f1_mode.expected &&
> -		echo "drwx------" >d_mode.expected &&
> -		test_modebits f1 >f1_mode.actual &&
> -		test_modebits d >d_mode.actual &&
> -		test_cmp f1_mode.expected f1_mode.actual &&
> -		test_cmp d_mode.expected d_mode.actual
> +		test_modebits f1 >f1_mode &&
> +		test_modebits d >d_mode &&
> +		grep "^-rw-------$" f1_mode &&
> +		grep "^drwx--[-S]---$" d_mode
>  	)
>  '

It somehow feels to me that this approach would not scale well. Shouldn't this knowledge of inherited sticky gid bit hidden behind the test_modebits helper function?

Thanks.
Previous: Kevin DaudtNext: Matheus Tavares
Message 4 of 7 in “t4129 failure when sticky bit set”
  1. Kevin DaudtDec 30, 2020
  2. t4129: don't fail if setgid is set in the parent directoryMatheus Tavares, Dec 30, 2020
  3. Kevin DaudtDec 30, 2020
  4. Junio C HamanoJan 4, 2021
  5. t4129: don't fail if setgid is set in the test directoryMatheus Tavares, Jan 5, 2021
  6. Junio C HamanoJan 6, 2021
  7. Matheus Tavares BernardinoJan 9, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.