Use upstream patch to fix a test failure in perl5db.t when TERM=vt100
This commit is contained in:
parent
efc191f45f
commit
e17570c952
@ -1,57 +0,0 @@
|
||||
From 27728658b28c256f96dd6e7b5a2de70373d62ff1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Tue, 9 Jul 2013 12:25:00 +0200
|
||||
Subject: [PATCH] Disable ornaments on perl5db AutoTrace tests
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
If TERM=vt100, Term::ReadLine will put ornaments that break the
|
||||
AutoTrace test:
|
||||
|
||||
Failed test 100 - Test the o AutoTrace command at ../lib/perl5db.t line 2302
|
||||
got 'main::(../lib/perl5db/t/disable-breakpoints-1:2):
|
||||
2: my $x = "One";
|
||||
main::(../lib/perl5db/t/disable-breakpoints-1:3):
|
||||
3: my $dummy = 0;
|
||||
main::(../lib/perl5db/t/disable-breakpoints-1:5):
|
||||
5: $x = "FirstVal";
|
||||
main::(..Debugged program terminated. Use [1m<31><6D>q[0m<30><6D> to quit or [1m<31><6D>R[0m<30><6D> to restart,
|
||||
use [1m<31><6D>o[0m<30><6D> [4m<34><6D>inhibit_exit[m<><6D> to avoid stopping after program termination,
|
||||
[1m<31><6D>h q[0m<30><6D>, [1m<31><6D>h R[0m<30><6D> or [1m<31><6D>h o[0m<30><6D> to get additional info.
|
||||
auto(-1) DB<2> q
|
||||
::(../lib/perl5db/t/disable-breakpoints-1:15):
|
||||
15: $dummy++;
|
||||
main::(../lib/perl5db/t/disable-breakpoints-1:17):
|
||||
17: $x = "FourthVal";
|
||||
main::(../lib/perl5db/t/disable-breakpoints-1:19):
|
||||
19: $dummy++;
|
||||
'
|
||||
expected /(?^msx:
|
||||
^main::\([^:]+:15\):\n
|
||||
15:\s+\$dummy\+\+;\n
|
||||
main::\([^:]+:17\):\n
|
||||
17:\s+\$x\ =\ "FourthVal";\n
|
||||
)/
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
lib/perl5db.t | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/perl5db.t b/lib/perl5db.t
|
||||
index 9a57960..186f695 100644
|
||||
--- a/lib/perl5db.t
|
||||
+++ b/lib/perl5db.t
|
||||
@@ -2334,7 +2334,7 @@ sub _calc_trace_wrapper
|
||||
{
|
||||
cmds =>
|
||||
[
|
||||
- 'o AutoTrace',
|
||||
+ 'o AutoTrace ornaments=0',
|
||||
'c',
|
||||
'q',
|
||||
],
|
||||
--
|
||||
1.8.1.4
|
||||
|
101
perl-5.19.7-avoid-using-2-handles-to-write-to-the-de.patch
Normal file
101
perl-5.19.7-avoid-using-2-handles-to-write-to-the-de.patch
Normal file
@ -0,0 +1,101 @@
|
||||
From 7b58d7c4e3ad14ac3c60f1ea5d1032205a086e71 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Cook <tony@develop-help.com>
|
||||
Date: Tue, 14 Jan 2014 09:24:40 +1100
|
||||
Subject: [PATCH] [perl #118817] avoid using 2 handles to write to the debug
|
||||
output
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Previously the tests were run with the following config:
|
||||
|
||||
NonStop=0 TTY=db.out LineInfo=db.out
|
||||
|
||||
This meant that the debugger would write the prologue, command prompts
|
||||
and their results and the epilogue to one handle, and any line trace
|
||||
information to the second handle. Since those handles didn't share
|
||||
file a file position, the line trace info would overwrite the
|
||||
prologue, and the epilogue would overwrite part of the line trace
|
||||
info.
|
||||
|
||||
When TTY=vt100 on Redhat systems, this made the epilogue just long
|
||||
enough to overwrite the line trace data that a test matched against,
|
||||
causing the test to fail.
|
||||
|
||||
To fix this, I avoided setting LineInfo:
|
||||
|
||||
NonStop=0 TTY=db.out
|
||||
|
||||
and since LineInfo defaults to using the TTY handle, both type of
|
||||
content are written to db.out *without* overwriting each other.
|
||||
|
||||
Unfortunately this broke some other tests, since now the command
|
||||
prompts which were overwritten by line trace information are mixed in
|
||||
with the line traces - I've modified the tests that failed to account
|
||||
for the included command lines.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
lib/perl5db.t | 15 ++++++++++++---
|
||||
1 file changed, 12 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/perl5db.t b/lib/perl5db.t
|
||||
index 17fa744..95d2030 100644
|
||||
--- a/lib/perl5db.t
|
||||
+++ b/lib/perl5db.t
|
||||
@@ -72,7 +72,7 @@ sub _out_contents
|
||||
rc(
|
||||
<<'EOF',
|
||||
|
||||
-&parse_options("NonStop=0 ReadLine=0 TTY=db.out LineInfo=db.out");
|
||||
+&parse_options("NonStop=0 ReadLine=0 TTY=db.out");
|
||||
|
||||
sub afterinit {
|
||||
push(@DB::typeahead,
|
||||
@@ -267,7 +267,7 @@ sub _quote
|
||||
sub _run {
|
||||
my $self = shift;
|
||||
|
||||
- my $rc = qq{&parse_options("NonStop=0 TTY=db.out LineInfo=db.out");\n};
|
||||
+ my $rc = qq{&parse_options("NonStop=0 TTY=db.out");\n};
|
||||
|
||||
$rc .= join('',
|
||||
map { "$_\n"}
|
||||
@@ -1235,6 +1235,7 @@ DebugWrap->new({
|
||||
$wrapper->contents_like(
|
||||
qr/
|
||||
$line_out
|
||||
+ auto\(-\d+\)\s+DB<\d+>\s+\.\n
|
||||
$line_out
|
||||
/msx,
|
||||
'Test the "." command',
|
||||
@@ -2380,6 +2381,10 @@ DebugWrap->new({
|
||||
$wrapper->contents_like(qr/
|
||||
^main::\([^:]+:28\):\n
|
||||
28:\s+myfunc\(\);\n
|
||||
+ auto\(-\d+\)\s+DB<1>\s+t\n
|
||||
+ Trace\ =\ on\n
|
||||
+ auto\(-\d+\)\s+DB<1>\s+b\ 18\n
|
||||
+ auto\(-\d+\)\s+DB<2>\s+c\n
|
||||
main::myfunc\([^:]+:25\):\n
|
||||
25:\s+bar\(\);\n
|
||||
/msx,
|
||||
@@ -2407,10 +2412,14 @@ DebugWrap->new({
|
||||
$wrapper->contents_like(qr/
|
||||
^main::\([^:]+:28\):\n
|
||||
28:\s+myfunc\(\);\n
|
||||
+ auto\(-\d+\)\s+DB<1>\s+o\ AutoTrace\n
|
||||
+ \s+AutoTrace\s+=\s+'1'\n
|
||||
+ auto\(-\d+\)\s+DB<2>\s+b\ 18\n
|
||||
+ auto\(-\d+\)\s+DB<3>\s+c\n
|
||||
main::myfunc\([^:]+:25\):\n
|
||||
25:\s+bar\(\);\n
|
||||
/msx,
|
||||
- 'Test the t command with function calls.',
|
||||
+ 'Test the o AutoTrace command with function calls.',
|
||||
);
|
||||
}
|
||||
|
||||
--
|
||||
1.8.4.2
|
||||
|
10
perl.spec
10
perl.spec
@ -30,7 +30,7 @@
|
||||
Name: perl
|
||||
Version: %{perl_version}
|
||||
# release number must be even higher, because dual-lived modules will be broken otherwise
|
||||
Release: 291%{?dist}
|
||||
Release: 292%{?dist}
|
||||
Epoch: %{perl_epoch}
|
||||
Summary: Practical Extraction and Report Language
|
||||
Group: Development/Languages
|
||||
@ -85,8 +85,9 @@ Patch10: perl-5.19.0-Synchronize-h2ph-POD-text-with-usage-output.patch
|
||||
# Update pod2html(1) documentation, rhbz#948538, RT#117623
|
||||
Patch11: perl-5.16.3-Synchronize-pod2html-usage-output-and-its-POD-text.patch
|
||||
|
||||
# Fix a test failure in perl5db.t when TERM=vt100, RT#118817
|
||||
Patch12: perl-5.18.0-Disable-ornaments-on-perl5db-AutoTrace-tests.patch
|
||||
# Fix a test failure in perl5db.t when TERM=vt100, RT#118817,
|
||||
# in upstream after 5.19.7
|
||||
Patch12: perl-5.19.7-avoid-using-2-handles-to-write-to-the-de.patch
|
||||
|
||||
# Prevent from loading system Term::ReadLine::Gnu while running tests,
|
||||
# RT#118821
|
||||
@ -3626,6 +3627,9 @@ sed \
|
||||
|
||||
# Old changelog entries are preserved in CVS.
|
||||
%changelog
|
||||
* Tue Jan 14 2014 Petr Pisar <ppisar@redhat.com> - 4:5.18.2-292
|
||||
- Use upstream patch to fix a test failure in perl5db.t when TERM=vt100
|
||||
|
||||
* Tue Dec 10 2013 Jitka Plesnikova <jplesnik@redhat.com> - 4:5.18.2-291
|
||||
- 5.18.2 bump (see <http://search.cpan.org/dist/perl-5.18.2/pod/perldelta.pod>
|
||||
for release notes)
|
||||
|
Loading…
Reference in New Issue
Block a user