Re: EOF test fixes (t5615/t7004)
- From
Stefan Beller <sbeller@google.com>
- Date
- Mar 22, 2017, 18:47 UTC
- Message-ID
- <CAGZ79kYe73_iAPU7J9Z+7q_J3F6sUmbHpiC-u2G89auns3bP3Q@mail.gmail.com>
- In-Reply-To
- <20170322173528.ho43ulndlozq35tu@kalarepa>
On Wed, Mar 22, 2017 at 10:35 AM, Jan Palus <jan.palus@gmail.com> wrote:
Show 30 quoted lines
> Hi, > > attached patch fixes 2 out of 3 tests failing in my env -- missing EOF, > incorrectly placed "&&" after EOF. One test seems to be incorrect as it > fails even after fixing. I suspect the main difference between my env and > others is in shell used -- mksh in my case and probably bash in others. > Looks like bash has a nasty behavior when it encounters syntax error: > > $ cat test.sh > cat >/dev/null <<-\EOF > tagname : forged-tag > EOF && > echo foo > > $ bash test.sh && echo success || echo failed > test.sh: line 4: warning: here-document at line 1 delimited by > end-of-file (wanted `EOF') > success > > # notice no "foo" printed > > $ mksh test.sh && echo success || echo failed > test.sh[5]: here document 'EOF' unclosed > failed > > Test that fails even after fixing EOFs: > t7004-tag.sh:verifying a forged tag with --format fail and format accordingly > > Note that I'm not subscribed to mailing list so in case of any questions > please mail me directly.
Thanks for catching these bugs!
Please have a look at Documentation/SubmittingPatches. (the most important thing is the "Sign-off-by" line indicating you are legally permitted to send such a patch; for one-off patches the format can be negotiated, but it is easier for maintainers to take the proper format.)
This email conveys the actual problem very well, so only a little change is needed to make it a proper commit message. (c.f. git clone git://git.kernel.org/pub/scm/git/git.git/ && git -C git log)
Thanks, Stefan