git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Eric Sunshine <sunshine@sunshineco.com>,
	Junio C Hamano <gitster@pobox.com>
Cc: Git List <git@vger.kernel.org>, Max Kirillov <max@max630.net>
Subject: Re: t5562: gzip -k is not portable
Date: Tue, 19 Jun 2018 22:40:16 +0200	[thread overview]
Message-ID: <117d2657-067a-6fe6-3713-de7a5aa75a11@web.de> (raw)
In-Reply-To: <CAPig+cT2xkR=LbAJLCdeynGkiPysakbVna61cfrtgO3kKh85+g@mail.gmail.com>



On 06/19/2018 08:22 PM, Eric Sunshine wrote:
> On Tue, Jun 19, 2018 at 2:06 PM Junio C Hamano <gitster@pobox.com> wrote:
>> Torsten Bögershausen <tboegi@web.de> writes:
>>> t5562 fails here under MacOS:
>>> "gzip -k"  is not portable.
> Very odd. Stock /usr/bin/gzip on my MacOS 10.12.6 _does_ recognize -k,
> and the test does pass.

This is the test box running Mac OS X 10.6 speaking.
The -c seems to need even -f.
But this doesn't work either:

gzip 1.3.12
Copyright (C) 2007 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by Jean-loup Gailly.
prerequisite GZIP ok
expecting success:
     gzip -f -c fetch_body >fetch_body.gz &&
     test_copy_bytes 10 <fetch_body.gz >fetch_body.gz.trunc &&
     gzip -f -c push_body >push_body,gz &&
     test_copy_bytes 10 <push_body.gz >push_body.gz.trunc

./test-lib.sh: line 632: push_body.gz: No such file or directory
not ok 2 - setup, compression related
#
#        gzip -f -c fetch_body >fetch_body.gz &&
#        test_copy_bytes 10 <fetch_body.gz >fetch_body.gz.trunc &&
#        gzip -f -c push_body >push_body,gz &&
#        test_copy_bytes 10 <push_body.gz >push_body.gz.trunc
#


>> Sigh.  Perhaps -c would help.  Or do BSD implementations also lack -c?
> MacOS and BSD do support -c, so this solution would also work (and is
> "cleaner" the the other proposal).
>
>> diff --git a/t/t5562-http-backend-content-length.sh b/t/t5562-http-backend-content-length.sh
>> @@ -61,9 +61,9 @@ test_expect_success 'setup' '
>>   test_expect_success GZIP 'setup, compression related' '
>> -       gzip -k fetch_body &&
>> +       gzip -c fetch_body >fetch_body.gz &&
>>          test_copy_bytes 10 <fetch_body.gz >fetch_body.gz.trunc &&
>> -       gzip -k push_body &&
>> +       gzip -c push_body >push_body.gz &&
>>          test_copy_bytes 10 <push_body.gz >push_body.gz.trunc
>>   '


  reply	other threads:[~2018-06-19 20:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19 17:25 t5562: gzip -k is not portable Torsten Bögershausen
2018-06-19 18:06 ` Junio C Hamano
2018-06-19 18:22   ` Eric Sunshine
2018-06-19 20:40     ` Torsten Bögershausen [this message]
2018-06-19 20:53       ` Rodrigo Campos
2018-06-19 20:53       ` Jeff King
2018-06-20  6:13         ` Torsten Bögershausen
2018-06-20 12:40           ` Jeff King
2018-06-20 15:41             ` Torsten Bögershausen
2018-06-19 20:48 ` Rodrigo Campos

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=117d2657-067a-6fe6-3713-de7a5aa75a11@web.de \
    --to=tboegi@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=max@max630.net \
    --cc=sunshine@sunshineco.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).