From: john at keeping.me.uk (John Keeping)
Subject: [PATCH 1/2] t0109: refactor test code into a function
Date: Mon, 15 Apr 2013 15:56:11 +0100 [thread overview]
Message-ID: <20130415145611.GG2278@serenity.lan> (raw)
In-Reply-To: <CAHmME9rSCWtueOX3aRnmaD_MGFqpadwT92UjZ5YMN_J3KL9V4Q@mail.gmail.com>
On Mon, Apr 15, 2013 at 04:48:45PM +0200, Jason A. Donenfeld wrote:
> On Sun, Apr 14, 2013 at 6:07 PM, John Keeping <john at keeping.me.uk> wrote:
> > -test_expect_success 'no access to $HOME' '
> > +test_no_home_access () {
> > non_existant_path="/path/to/some/place/that/does/not/possibly/exist"
> > while test -d "$non_existant_path"; do
> > non_existant_path="$non_existant_path/$(date +%N)"
> > - done
> > + done &&
> > + CGIT_CONFIG="$(pwd)/cgitrc" QUERY_STRING="url=$1" \
>
> Superfluous, as strace sets environment variables.
>
>
> > strace \
> > -E HOME="$non_existant_path" \
> > -E CGIT_CONFIG="$PWD/cgitrc" \
> > -E QUERY_STRING="url=foo/commit" \
>
> In fact, it still picks up this old one.
Ah, so it does :-(
> > -e access -f -o strace.out cgit &&
> > test_must_fail grep "$non_existant_path" strace.out
> > +}
> > +
> > +test_expect_success 'no access to $HOME' '
> > + test_no_home_access ""
> > '
> >
>
> I refactored this commit and 2/2 here:
>
> http://git.zx2c4.com/cgit/commit/?h=wip&id=a814ede7838c5d2be8d0e926e2dfe4a4c66d7dcc
Thanks. The code looks good, but the commit message seems a little
confused now. How about:
t0109: test more URLs
In order to ensure that we don't access $HOME at some point after
initial startup when rendering a specific view, run the strace test
on a range of different pages.
?
next prev parent reply other threads:[~2013-04-15 14:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-14 16:07 john
2013-04-14 16:07 ` [PATCH 2/2] t0109: test using multiple URLs john
2013-04-15 14:48 ` [PATCH 1/2] t0109: refactor test code into a function Jason
2013-04-15 14:56 ` john [this message]
2013-04-15 15:00 ` Jason
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=20130415145611.GG2278@serenity.lan \
--to=cgit@lists.zx2c4.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.
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 NNTP newsgroup(s).