All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "René Scharfe" <l.s.r@web.de>,
	git@vger.kernel.org, "David Coppa" <dcoppa@openbsd.org>,
	"brian m . carlson" <sandals@crustytoothpaste.net>
Subject: Re: [PATCH] t0001: fix broken not-quite getcwd(3) test in bed67874e2
Date: Mon, 07 Jun 2021 13:29:18 +0200	[thread overview]
Message-ID: <87y2bl52v4.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <xmqq4kehs2nt.fsf@gitster.g>


On Wed, Jun 02 2021, Junio C Hamano wrote:

> René Scharfe <l.s.r@web.de> writes:
>
>>> On AIX under both bash and ksh this test breaks because "pwd -P" will
>>> happily display the current working directory, but getcwd(3) called by
>>> the "git init" we're testing here will fail to get it.
>>>
>>> I checked whether clobbering the $PWD environment variable would
>>> affect it, and it didn't. Presumably these shells keep track of their
>>> working directory internally.
>>>
>>> Let's change the test to a new "test-tool getcwd".
>>
>> Makes sense.
>>
>> If /bin/pwd can figure out the path to the current working directory
>> without read permissions to parent directories then it might be possible
>> to teach strbuf_getcwd() the same trick, though.  How does it do it?
>> ...
>> If strbuf_getcwd() were to learn any of these tricks, then so would
>> "test-tool getcwd", via its xgetcwd() call.  At that point we'd better
>> rename GETCWD_IGNORES_PERMS to XGETCWD_IGNORES_PERMS.
>>
>> But I guess we need none of that because we never got a request from
>> an AIX user to support a /home directory without read permissions,
>> right?
>
> Nice "thinking aloud".

I see (well, rc/release period and all) that you didn't pick this up. I
think per my just-sent
http://lore.kernel.org/git/871r9d6hhy.fsf@evledraar.gmail.com that it
makes sense to just leave this at s/pwd(1)/getcwd(3)/ as this patch
does.

  reply	other threads:[~2021-06-07 11:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-06 23:38 [PATCH] tests: don't give unportable ">" to "test" built-in, use -gt Ævar Arnfjörð Bjarmason
2017-08-07  1:18 ` brian m. carlson
2017-08-07 10:17   ` René Scharfe
2017-08-07 10:59     ` Ævar Arnfjörð Bjarmason
2017-08-07 11:04     ` [PATCH] t0001: skip test with restrictive permissions if getpwd(3) respects them René Scharfe
2021-06-01  0:38       ` [PATCH] t0001: fix broken not-quite getcwd(3) test in bed67874e2 Ævar Arnfjörð Bjarmason
2021-06-01 16:15         ` René Scharfe
2021-06-01 21:20           ` Junio C Hamano
2021-06-07 11:29             ` Ævar Arnfjörð Bjarmason [this message]
2021-06-07 11:24           ` Ævar Arnfjörð Bjarmason
2021-06-07 15:26             ` René Scharfe
2021-06-07 15:38               ` Ævar Arnfjörð Bjarmason
2021-07-30 16:18         ` [PATCH v2] " Ævar Arnfjörð Bjarmason
2021-07-30 17:16           ` Junio C Hamano
2017-08-07  1:33 ` [PATCH] tests: don't give unportable ">" to "test" built-in, use -gt Junio C Hamano
2017-08-07 17:32 ` Junio C Hamano
2017-08-07 18:06 ` Andreas Schwab

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=87y2bl52v4.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=dcoppa@openbsd.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=l.s.r@web.de \
    --cc=sandals@crustytoothpaste.net \
    /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.