Always skip recovery SysV shared memory tests on Windows
These tests were disabled on git master in commit 8e5ce1c3f8. This does the same thing on the back branches. Discussion: https://postgr.es/m/a1c40fab-a38c-cb42-6879-125f834e837b@2ndQuadrant.com
This commit is contained in:
parent
3fb307bc4a
commit
7d49803259
@ -10,7 +10,14 @@ use Test::More;
|
|||||||
use TestLib;
|
use TestLib;
|
||||||
use Time::HiRes qw(usleep);
|
use Time::HiRes qw(usleep);
|
||||||
|
|
||||||
plan tests => 5;
|
if ($windows_os)
|
||||||
|
{
|
||||||
|
plan skip_all => 'SysV shared memory not supported by this platform';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
plan tests => 5;
|
||||||
|
}
|
||||||
|
|
||||||
my $tempdir = TestLib::tempdir;
|
my $tempdir = TestLib::tempdir;
|
||||||
my $port;
|
my $port;
|
||||||
@ -124,7 +131,7 @@ my $slow_pid = $gnat->safe_psql('postgres',
|
|||||||
"SELECT pid FROM pg_stat_activity WHERE query = '$slow_query'");
|
"SELECT pid FROM pg_stat_activity WHERE query = '$slow_query'");
|
||||||
$gnat->kill9;
|
$gnat->kill9;
|
||||||
unlink($gnat->data_dir . '/postmaster.pid');
|
unlink($gnat->data_dir . '/postmaster.pid');
|
||||||
$gnat->rotate_logfile; # on Windows, can't open old log for writing
|
$gnat->rotate_logfile;
|
||||||
log_ipcs();
|
log_ipcs();
|
||||||
# Reject ordinary startup. Retry for the same reasons poll_start() does.
|
# Reject ordinary startup. Retry for the same reasons poll_start() does.
|
||||||
my $pre_existing_msg = qr/pre-existing shared memory block/;
|
my $pre_existing_msg = qr/pre-existing shared memory block/;
|
||||||
@ -153,13 +160,10 @@ like($single_stderr, $pre_existing_msg,
|
|||||||
'single-user mode detected live backend via shared memory');
|
'single-user mode detected live backend via shared memory');
|
||||||
log_ipcs();
|
log_ipcs();
|
||||||
# Fail to reject startup if shm key N has become available and we crash while
|
# Fail to reject startup if shm key N has become available and we crash while
|
||||||
# using key N+1. This is unwanted, but expected. Windows is immune, because
|
# using key N+1. This is unwanted, but expected.
|
||||||
# its GetSharedMemName() use DataDir strings, not numeric keys.
|
|
||||||
$flea->stop; # release first key
|
$flea->stop; # release first key
|
||||||
is( $gnat->start(fail_ok => 1),
|
is($gnat->start(fail_ok => 1), 1, 'key turnover fools only sysv_shmem.c');
|
||||||
$TestLib::windows_os ? 0 : 1,
|
$gnat->stop; # release first key
|
||||||
'key turnover fools only sysv_shmem.c');
|
|
||||||
$gnat->stop; # release first key (no-op on $TestLib::windows_os)
|
|
||||||
$flea->start; # grab first key
|
$flea->start; # grab first key
|
||||||
# cleanup
|
# cleanup
|
||||||
TestLib::system_log('pg_ctl', 'kill', 'QUIT', $slow_pid);
|
TestLib::system_log('pg_ctl', 'kill', 'QUIT', $slow_pid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user