aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2018-10-21 09:00:13 -0400
committerAndrew Dunstan <andrew@dunslane.net>2018-10-21 09:00:13 -0400
commitc468bd5c087051e2edc573118a42d73a8ae3c3a4 (patch)
treecac991bac80f2066635fcd34015dc3d8bba65404 /src
parentce5d3424d6411f7a7228fd4463242cb382af3e0c (diff)
downloadpostgresql-c468bd5c087051e2edc573118a42d73a8ae3c3a4.tar.gz
postgresql-c468bd5c087051e2edc573118a42d73a8ae3c3a4.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_verify_checksums/t/002_actions.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/pg_verify_checksums/t/002_actions.pl b/src/bin/pg_verify_checksums/t/002_actions.pl
index ff4772708b5..d59970b7350 100644
--- a/src/bin/pg_verify_checksums/t/002_actions.pl
+++ b/src/bin/pg_verify_checksums/t/002_actions.pl
@@ -19,9 +19,11 @@ command_like(['pg_controldata', $pgdata],
# Add set of dummy files with some contents. These should not be scanned
# by the tool.
-append_to_file "$pgdata/global/123.", "foo";
+
+# On Windows, file name "foo." == "foo", so skip that pattern there.
+append_to_file "$pgdata/global/123.", "foo" unless $windows_os;
append_to_file "$pgdata/global/123_", "foo";
-append_to_file "$pgdata/global/123_.", "foo";
+append_to_file "$pgdata/global/123_.", "foo" unless $windows_os;;
append_to_file "$pgdata/global/123.12t", "foo";
append_to_file "$pgdata/global/foo", "foo2";
append_to_file "$pgdata/global/t123", "bar";
@@ -32,7 +34,7 @@ append_to_file "$pgdata/global/_init", "foobar3";
append_to_file "$pgdata/global/_vm.123", "foohoge";
append_to_file "$pgdata/global/123_vm.123t", "foohoge2";
-# Those are correct but empty files, so they should pass through.
+# These are correct but empty files, so they should pass through.
append_to_file "$pgdata/global/99999", "";
append_to_file "$pgdata/global/99999.123", "";
append_to_file "$pgdata/global/99999_fsm", "";