git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Armin Kunaschik <megabreit@googlemail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
	Git List <git@vger.kernel.org>
Subject: Re: t7800 test failure
Date: Tue, 24 May 2016 19:20:21 +0200	[thread overview]
Message-ID: <CALR6jEj67MA7CCHQ_jfdtAuGoo9wjPie0+a=e-BqJjoYtJ9oHw@mail.gmail.com> (raw)
In-Reply-To: <xmqq1t4r75sv.fsf@gitster.mtv.corp.google.com>

On Tue, May 24, 2016 at 6:57 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>
>> Armin Kunaschik <megabreit@googlemail.com> writes:
>>
>>> t7800 fails on systems where readlink (GNUism?) is not available.
>>
>> I don't think it's POSIX, but it is present on all POSIX-like systems I
>> know. On which system did you get the issue?

It's not available in AIX or HP-UX.

>>> +readlink() { ls -ld "$1" | sed 's/.* -> //'; }
>>
>> This is much less robust than the actual readlink. For example, if ->
>> appears in the link name, it breaks.
>
> I wouldn't allow it in our scripted Porcelain, but the environment
> of our test scripts are under our control, so I do not think it is a
> problem ("ls piped to sed" has been an established idiom before
> readlink(1) was widely accepted, by the way).

I think so too. Maybe I can improve the sed expression a bit, but
it will never be a universal readlink replacement. But it doesn't have to.
It's defined locally for this one test only and it does the specific job.

>> It would be acceptable as a fall-back if readlink is not present, but
>> shouldn't activate the "ls" hack by default.
>
> Yup.

Ok, how can this be implemented within the test environment?

  reply	other threads:[~2016-05-24 17:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 15:53 t7800 test failure Armin Kunaschik
2016-05-24 16:48 ` Matthieu Moy
2016-05-24 16:57   ` Junio C Hamano
2016-05-24 17:20     ` Armin Kunaschik [this message]
2016-05-24 17:36       ` Junio C Hamano
2016-05-25  9:33         ` Armin Kunaschik
2016-05-27  4:19           ` David Aguilar
2016-05-27  7:48             ` Matthieu Moy
2016-05-31  0:26             ` [PATCH] t7800 readlink not found Armin Kunaschik
2016-05-31  5:06               ` Torsten Bögershausen
2016-05-31  5:51                 ` Junio C Hamano
2016-06-21 14:44                   ` Armin Kunaschik
2016-06-21 18:39                     ` Junio C Hamano
2016-06-21 20:30                       ` Torsten Bögershausen

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to='CALR6jEj67MA7CCHQ_jfdtAuGoo9wjPie0+a=e-BqJjoYtJ9oHw@mail.gmail.com' \
    --to=megabreit@googlemail.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).