]> git.pld-linux.org Git - packages/perl.git/blob - remove-ext-GDBM_File-t-fatal.t.patch
- more hacks to get Getopt::Long prov version right
[packages/perl.git] / remove-ext-GDBM_File-t-fatal.t.patch
1 From 892e8b006aa99ac2c880cdc2a81fd16f06c1a0f3 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
3 Date: Mon, 9 Jul 2018 16:18:36 +0200
4 Subject: [PATCH] Remove ext/GDBM_File/t/fatal.t
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 gdbm-1.15 defaults to a memory-mapped I/O and does not report any I/O
10 errors on store and close operations. Thus ext/GDBM_File/t/fatal.t
11 test that expects these fatal error reports fails. Because there is
12 no other way to provoke a fatal error in gdbm-1.15 this patch
13 removes the test. Future gdbm version promisses reporting a regular
14 error on closing a database.
15
16 RT#133295
17
18 Signed-off-by: Petr Písař <ppisar@redhat.com>
19 ---
20  MANIFEST                |  1 -
21  ext/GDBM_File/t/fatal.t | 49 -------------------------------------------------
22  2 files changed, 50 deletions(-)
23  delete mode 100644 ext/GDBM_File/t/fatal.t
24
25 diff --git a/MANIFEST b/MANIFEST
26 index 95fa539095..b07fed1f54 100644
27 --- a/MANIFEST
28 +++ b/MANIFEST
29 @@ -4100,7 +4100,6 @@ ext/GDBM_File/GDBM_File.pm        GDBM extension Perl module
30  ext/GDBM_File/GDBM_File.xs     GDBM extension external subroutines
31  ext/GDBM_File/hints/sco.pl     Hint for GDBM_File for named architecture
32  ext/GDBM_File/Makefile.PL      GDBM extension makefile writer
33 -ext/GDBM_File/t/fatal.t                Test the fatal_func argument to gdbm_open
34  ext/GDBM_File/t/gdbm.t         See if GDBM_File works
35  ext/GDBM_File/typemap          GDBM extension interface types
36  ext/Hash-Util/Changes          Change history of Hash::Util
37 diff --git a/ext/GDBM_File/t/fatal.t b/ext/GDBM_File/t/fatal.t
38 deleted file mode 100644
39 index 0e426d4dbc..0000000000
40 --- a/ext/GDBM_File/t/fatal.t
41 +++ /dev/null
42 @@ -1,49 +0,0 @@
43 -#!./perl -w
44 -use strict;
45 -
46 -use Test::More;
47 -use Config;
48 -
49 -BEGIN {
50 -    plan(skip_all => "GDBM_File was not built")
51 -       unless $Config{extensions} =~ /\bGDBM_File\b/;
52 -
53 -    # https://rt.perl.org/Public/Bug/Display.html?id=117967
54 -    plan(skip_all => "GDBM_File is flaky in $^O")
55 -        if $^O =~ /darwin/;
56 -
57 -    plan(tests => 8);
58 -    use_ok('GDBM_File');
59 -}
60 -
61 -unlink <Op_dbmx*>;
62 -
63 -open my $fh, '<', $^X or die "Can't open $^X: $!";
64 -my $fileno = fileno $fh;
65 -isnt($fileno, undef, "Can find next available file descriptor");
66 -close $fh or die $!;
67 -
68 -is((open $fh, "<&=$fileno"), undef,
69 -   "Check that we cannot open fileno $fileno. \$! is $!");
70 -
71 -umask(0);
72 -my %h;
73 -isa_ok(tie(%h, 'GDBM_File', 'Op_dbmx', GDBM_WRCREAT, 0640), 'GDBM_File');
74 -
75 -isnt((open $fh, "<&=$fileno"), undef, "dup fileno $fileno")
76 -    or diag("\$! = $!");
77 -isnt(close $fh, undef,
78 -     "close fileno $fileno, out from underneath the GDBM_File");
79 -is(eval {
80 -    $h{Perl} = 'Rules';
81 -    untie %h;
82 -    1;
83 -}, undef, 'Trapped error when attempting to write to knobbled GDBM_File');
84 -
85 -# Observed "File write error" and "lseek error" from two different systems.
86 -# So there might be more variants. Important part was that we trapped the error
87 -# via croak.
88 -like($@, qr/ at .*\bfatal\.t line \d+\.\n\z/,
89 -     'expected error message from GDBM_File');
90 -
91 -unlink <Op_dbmx*>;
92 -- 
93 2.14.4
94
This page took 0.039744 seconds and 3 git commands to generate.