unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* git.t test failing in master
@ 2019-01-18 17:20 Konstantin Ryabitsev
  2019-01-18 19:47 ` [PATCH] t/git.t: avoid passing read-only value to git_unquote Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Ryabitsev @ 2019-01-18 17:20 UTC (permalink / raw)
  To: meta

[-- Attachment #1: Type: text/plain, Size: 1011 bytes --]

Hello:

I'm working to get lore.kernel.org to the latest master, but it would
appear "make test" is not completing correctly:

t/git.t .................... 1/? Modification of a read-only value attempted at /.../blib/lib/PublicInbox/Git.pm line 31.
# Tests were run but no plan was declared and done_testing() was not seen.
t/git.t .................... Dubious, test returned 255 (wstat 65280, 0xff00)

And, at the end:

Test Summary Report
-------------------
t/git.t                  (Wstat: 65280 Tests: 34 Failed: 0)
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
Files=67, Tests=2062, 37 wallclock secs ( 0.26 usr  0.07 sys + 16.95 cusr  9.63 csys = 26.91 CPU)
Result: FAIL
Failed 1/67 test programs. 0/2062 subtests failed.
make: *** [test_dynamic] Error 255

This is probably fairly benign from the looks of it, but I'd like your
opinion on whether this is something to worry about before deploying.

Perl: v5.16.3
Git: 2.16.5
Tree: d66aa534a4a7506cfc5cfab49d1e09f8db8be3dd

-K


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] t/git.t: avoid passing read-only value to git_unquote
  2019-01-18 17:20 git.t test failing in master Konstantin Ryabitsev
@ 2019-01-18 19:47 ` Eric Wong
  2019-01-18 20:07   ` Konstantin Ryabitsev
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2019-01-18 19:47 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: meta

Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
> This is probably fairly benign from the looks of it, but I'd like your
> opinion on whether this is something to worry about before deploying.

Yeah, the actual code only hits modifiable value

> Perl: v5.16.3

This is Fedora?  Which version?  I was working on getting a
chroot setup for testing some RPM-based distros, but some of the
mirrors/tools for doing that were out-of-date.  Might try
installing in QEMU...

> Git: 2.16.5
> Tree: d66aa534a4a7506cfc5cfab49d1e09f8db8be3dd

Thanks for the report, following should fix it.

----------8<--------
Subject: [PATCH] t/git.t: avoid passing read-only value to git_unquote

Older versions of Perl (tested 5.14.2 on Debian wheezy(*),
reported by Konstantin on Perl 5.16.3) considered the result of
concatenating two string literals to be a constant value.

(*) not that other stuff works on wheezy, but t/git.t should.

Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
---
 t/git.t | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/t/git.t b/t/git.t
index 50ec4fb..052e1ce 100644
--- a/t/git.t
+++ b/t/git.t
@@ -145,7 +145,8 @@ if ('alternates reloaded') {
 }
 
 use_ok 'PublicInbox::Git', qw(git_unquote);
-is("foo\nbar", git_unquote('"foo\\nbar"'.''), 'unquoted newline');
-is("Eléanor", git_unquote('"El\\303\\251anor"'.''), 'unquoted octal');
+my $s;
+is("foo\nbar", git_unquote($s = '"foo\\nbar"'), 'unquoted newline');
+is("Eléanor", git_unquote($s = '"El\\303\\251anor"'), 'unquoted octal');
 
 done_testing();
-- 
EW

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] t/git.t: avoid passing read-only value to git_unquote
  2019-01-18 19:47 ` [PATCH] t/git.t: avoid passing read-only value to git_unquote Eric Wong
@ 2019-01-18 20:07   ` Konstantin Ryabitsev
  0 siblings, 0 replies; 3+ messages in thread
From: Konstantin Ryabitsev @ 2019-01-18 20:07 UTC (permalink / raw)
  To: Eric Wong; +Cc: meta

On Fri, Jan 18, 2019 at 07:47:06PM +0000, Eric Wong wrote:
> > Perl: v5.16.3
> 
> This is Fedora?  Which version?  I was working on getting a
> chroot setup for testing some RPM-based distros, but some of the
> mirrors/tools for doing that were out-of-date.  Might try
> installing in QEMU...

No, this is RHEL/CentOS 7.

> > Git: 2.16.5
> > Tree: d66aa534a4a7506cfc5cfab49d1e09f8db8be3dd
> 
> Thanks for the report, following should fix it.

Yep, all tests pass now. Thanks!

-K

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-18 20:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-18 17:20 git.t test failing in master Konstantin Ryabitsev
2019-01-18 19:47 ` [PATCH] t/git.t: avoid passing read-only value to git_unquote Eric Wong
2019-01-18 20:07   ` Konstantin Ryabitsev

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).