From: Pete Wyckoff <pw@padd.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Sixt <j.sixt@viscovery.net>, git@vger.kernel.org
Subject: Re: [PATCH 3/9] git p4 test: simplify quoting involving TRASH_DIRECTORY
Date: Tue, 26 Jun 2012 10:10:53 -0700 [thread overview]
Message-ID: <20120626171053.GA31456@padd.com> (raw)
In-Reply-To: <7vk3yuca42.fsf@alter.siamese.dyndns.org>
gitster@pobox.com wrote on Tue, 26 Jun 2012 09:26 -0700:
> Johannes Sixt <j.sixt@viscovery.net> writes:
>
> > Am 6/26/2012 3:18, schrieb Pete Wyckoff:
> >> test_expect_success 'exit when p4 fails to produce marshaled output' '
> >> - badp4dir="$TRASH_DIRECTORY/badp4dir" &&
> >> - mkdir "$badp4dir" &&
> >> - test_when_finished "rm \"$badp4dir/p4\" && rmdir \"$badp4dir\"" &&
> >> - cat >"$badp4dir"/p4 <<-EOF &&
> >> + mkdir badp4dir &&
> >> + test_when_finished "rm badp4dir/p4 && rmdir badp4dir" &&
> >> + cat >badp4dir/p4 <<-EOF &&
> >> #!$SHELL_PATH
> >> exit 1
> >> EOF
> >> - chmod 755 "$badp4dir"/p4 &&
> >> - PATH="$badp4dir:$PATH" git p4 clone --dest="$git" //depot >errs 2>&1 ; retval=$? &&
> >> + chmod 755 badp4dir/p4 &&
> >> + PATH="$TRASH_DIRECTORY/badp4dir:$PATH" git p4 clone --dest="$git" //depot >errs 2>&1 ; retval=$? &&
> >> test $retval -eq 1 &&
> >
> > The long line here is severly broken, because the semicolon breaks the &&
> > chain; retval would be assigned to even if one of the earlier commands
> > fails, and that you don't want to treat as success. The least that is
> > needed is to put the line in braces. But I suggest to rewrite the two
> > lines above as
> >
> > (
> > PATH="$TRASH_DIRECTORY/badp4dir:$PATH" &&
> > export PATH &&
> > test_expect_code 1 git p4 clone --dest="$git" //depot >errs 2>&1
> > ) &&
> >
> >> test_must_fail grep -q Traceback errs
> >
> > We don't expect that grep fails due to segfault or something. Write this
> > line as
> >
> > ! grep Traceback errs
> >
> > Also drop the -q; if the test detects a failure, you do want to see the
> > grep output in a verbose test run.
>
> All true. Thanks for carefully reading.
Yes, both your reviews are quite appreciated. I've got patches
ready for these and will plan to send out an updated series
tonight.
-- Pete
next prev parent reply other threads:[~2012-06-26 17:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-26 1:18 [PATCH 0/9] git p4 test fixes Pete Wyckoff
2012-06-26 1:18 ` [PATCH 1/9] git p4 test: wait longer for p4d to start Pete Wyckoff
2012-06-26 3:46 ` Junio C Hamano
2012-06-26 1:18 ` [PATCH 2/9] git p4 test: use real_path to resolve p4 client symlinks Pete Wyckoff
2012-06-26 1:18 ` [PATCH 3/9] git p4 test: simplify quoting involving TRASH_DIRECTORY Pete Wyckoff
2012-06-26 6:24 ` Johannes Sixt
2012-06-26 16:26 ` Junio C Hamano
2012-06-26 17:10 ` Pete Wyckoff [this message]
2012-06-26 1:18 ` [PATCH 4/9] git p4 test: never create default test repo Pete Wyckoff
2012-06-26 1:18 ` [PATCH 5/9] git p4 test: rename some "git-p4 command" strings Pete Wyckoff
2012-06-26 1:18 ` [PATCH 6/9] git p4 test: check for error message in failed test Pete Wyckoff
2012-06-26 1:18 ` [PATCH 7/9] git p4 test: copy source indeterminate Pete Wyckoff
2012-06-26 1:18 ` [PATCH 8/9] git p4 test: cleanup_git should make a new $git Pete Wyckoff
2012-06-26 1:18 ` [PATCH 9/9] git p4 test: split up big t9800 test Pete Wyckoff
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=20120626171053.GA31456@padd.com \
--to=pw@padd.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.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.