Skip to content

Commit c468bd5

Browse files
committed
Don't try to test files named with a trailing dot on Windows
The pg_verify_checksums test tries to create files with corrupt data named "123." and "123_." But on Windows a file name with a trailing dot is the same as a file without the trailing dot. In the first case this will create a file with a "valid" name, which causes the test to fail in an unexpected way, and in the secongd case this will be redandant as the test already creates a file named "123_". Bug discovered by buildfarm animal bowerbird.
1 parent ce5d342 commit c468bd5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/bin/pg_verify_checksums/t/002_actions.pl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919

2020
# Add set of dummy files with some contents. These should not be scanned
2121
# by the tool.
22-
append_to_file "$pgdata/global/123.", "foo";
22+
23+
# On Windows, file name "foo." == "foo", so skip that pattern there.
24+
append_to_file "$pgdata/global/123.", "foo" unless $windows_os;
2325
append_to_file "$pgdata/global/123_", "foo";
24-
append_to_file "$pgdata/global/123_.", "foo";
26+
append_to_file "$pgdata/global/123_.", "foo" unless $windows_os;;
2527
append_to_file "$pgdata/global/123.12t", "foo";
2628
append_to_file "$pgdata/global/foo", "foo2";
2729
append_to_file "$pgdata/global/t123", "bar";
@@ -32,7 +34,7 @@
3234
append_to_file "$pgdata/global/_vm.123", "foohoge";
3335
append_to_file "$pgdata/global/123_vm.123t", "foohoge2";
3436

35-
# Those are correct but empty files, so they should pass through.
37+
# These are correct but empty files, so they should pass through.
3638
append_to_file "$pgdata/global/99999", "";
3739
append_to_file "$pgdata/global/99999.123", "";
3840
append_to_file "$pgdata/global/99999_fsm", "";

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy