All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Matheus Tavares <matheus.bernardino@usp.br>
Cc: git@vger.kernel.org, me@ikke.info
Subject: Re: [PATCH] t4129: don't fail if setgid is set in the parent directory
Date: Mon, 04 Jan 2021 15:57:43 -0800	[thread overview]
Message-ID: <xmqqpn2k1ci0.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: 88398ff952a68e8d134dcd50ef0772bb6fc3b456.1609339792.git.matheus.bernardino@usp.br

Matheus Tavares <matheus.bernardino@usp.br> writes:

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

  parent reply	other threads:[~2021-01-04 23:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30 12:05 t4129 failure when sticky bit set Kevin Daudt
2020-12-30 14:52 ` [PATCH] t4129: don't fail if setgid is set in the parent directory Matheus Tavares
2020-12-30 21:05   ` Kevin Daudt
2021-01-04 23:57   ` Junio C Hamano [this message]
2021-01-05 15:47   ` [PATCH v2] t4129: don't fail if setgid is set in the test directory Matheus Tavares
2021-01-06 23:59     ` Junio C Hamano
2021-01-09 14:19       ` Matheus Tavares Bernardino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqpn2k1ci0.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=matheus.bernardino@usp.br \
    --cc=me@ikke.info \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.