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
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
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.
18 Signed-off-by: Petr Písař <ppisar@redhat.com>
21 ext/GDBM_File/t/fatal.t | 49 -------------------------------------------------
22 2 files changed, 50 deletions(-)
23 delete mode 100644 ext/GDBM_File/t/fatal.t
25 diff --git a/MANIFEST b/MANIFEST
26 index 95fa539095..b07fed1f54 100644
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
50 - plan(skip_all => "GDBM_File was not built")
51 - unless $Config{extensions} =~ /\bGDBM_File\b/;
53 - # https://rt.perl.org/Public/Bug/Display.html?id=117967
54 - plan(skip_all => "GDBM_File is flaky in $^O")
58 - use_ok('GDBM_File');
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");
68 -is((open $fh, "<&=$fileno"), undef,
69 - "Check that we cannot open fileno $fileno. \$! is $!");
73 -isa_ok(tie(%h, 'GDBM_File', 'Op_dbmx', GDBM_WRCREAT, 0640), 'GDBM_File');
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");
83 -}, undef, 'Trapped error when attempting to write to knobbled GDBM_File');
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
88 -like($@, qr/ at .*\bfatal\.t line \d+\.\n\z/,
89 - 'expected error message from GDBM_File');