New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
utf8cache.t tried to lauches nonexistant process on Win32 but still passes #13628
Comments
From @bulk88Created by @bulk88I noticed this strange message during a harness run from utf8cache.t, so -------------------------------------------------------------- C:\perl519\src\t> From utf8cache.t ------------------------------------------------------------------- $pid is true, and is a PID to the following process, I am not sure if the CHILD FH actually works (IDK what works means). Its The '-|' is from day 1 of this test, from Perl Info
|
From @tonycozOn Thu Feb 27 01:33:37 2014, bulk88 wrote:
As is, it's broken on POSIX systems too, but for a different reason. open $foo, "-|"; is a fork that feeds the output of the child process to the $foo in the current process. Unfortunately, back in c45bec6 the load of Devel::Peek was removed, so the child process now outputs only: Undefined subroutine &Devel::Peek::Dump called at op/utf8cache.t line 27. Adding a require fixes the output and makes it saner. This should probably be modified to use runperl() to capture the output. And presumably a test to make sure the output is reasonable as well as checking it doesn't contain duplicate magic. Tony |
The RT System itself - Status changed from 'new' to 'open' |
From @tonycozOn Thu Feb 27 01:33:37 2014, bulk88 wrote:
Attached a patch that fixes it for me. Tony |
From @tonycoz0001-perl-121337-fix-issues-with-op-utf8cache.t.patchFrom 2d0dd748b750074a63b42d0cb1985fd2115422ec Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Tue, 4 Nov 2014 17:26:21 +1100
Subject: [PATCH] [perl #121337] fix issues with op/utf8cache.t
This test had two problems:
- it used Devel::Peek::Dump() without loading it, broken when the script
was refactored to use test.pl in c45bec600
- the C< open CHILD "-|" > doesn't work on Win32
Since the test didn't check it was receiving reasonable dump output,
neither problem resulted in a test failure.
---
t/op/utf8cache.t | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/t/op/utf8cache.t b/t/op/utf8cache.t
index 65254b1..fba94a4 100644
--- a/t/op/utf8cache.t
+++ b/t/op/utf8cache.t
@@ -9,34 +9,33 @@ BEGIN {
use strict;
-plan(tests => 15);
+plan(tests => 16);
SKIP: {
skip_without_dynamic_extension("Devel::Peek");
-my $pid = open CHILD, '-|';
-die "kablam: $!\n" unless defined $pid;
-unless ($pid) {
- open STDERR, ">&STDOUT";
- $a = "hello \x{1234}";
+my $out = runperl(stderr => 1,
+ progs => [ split /\n/, <<'EOS' ]);
+ require Devel::Peek;
+ $a = qq(hello \x{1234});
for (1..2) {
bar(substr($a, $_, 1));
}
sub bar {
- $_[0] = "\x{4321}";
+ $_[0] = qq(\x{4321});
Devel::Peek::Dump($_[0]);
}
- exit;
-}
+EOS
-{ local $/; $_ = <CHILD> }
+like($out, qr/\ASV =/, "check we got dump output"); # [perl #121337]
my $utf8magic = qr{ ^ \s+ MAGIC \s = .* \n
\s+ MG_VIRTUAL \s = .* \n
\s+ MG_TYPE \s = \s PERL_MAGIC_utf8 .* \n
\s+ MG_LEN \s = .* \n }xm;
-unlike($_, qr{ $utf8magic $utf8magic }x);
+unlike($out, qr{ $utf8magic $utf8magic }x,
+ "no duplicate utf8 magic");
} # SKIP
--
1.7.10.4
|
From @tonycozOn Mon Nov 03 22:28:57 2014, tonyc wrote:
Applied as 17571de. Tony |
@tonycoz - Status changed from 'open' to 'pending release' |
From @khwilliamsonThanks for submitting this ticket The issue should be resolved with the release today of Perl v5.22. If you find that the problem persists, feel free to reopen this ticket -- |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#121337 (status was 'resolved')
Searchable as RT121337$
The text was updated successfully, but these errors were encountered: