|
9 | 9 | use TestLib;
|
10 | 10 | use Time::HiRes qw(usleep);
|
11 | 11 |
|
12 |
| -if ($^O eq 'msys') |
| 12 | +if ($windows_os) |
13 | 13 | {
|
14 |
| - plan skip_all => 'missing SIGKILL implementation'; |
| 14 | + plan skip_all => 'SysV shared memory not supported by this platform'; |
15 | 15 | }
|
16 | 16 | else
|
17 | 17 | {
|
@@ -129,7 +129,7 @@ sub init_start
|
129 | 129 | "SELECT pid FROM pg_stat_activity WHERE query = '$slow_query'");
|
130 | 130 | $gnat->kill9;
|
131 | 131 | unlink($gnat->data_dir . '/postmaster.pid');
|
132 |
| -$gnat->rotate_logfile; # on Windows, can't open old log for writing |
| 132 | +$gnat->rotate_logfile; |
133 | 133 | log_ipcs();
|
134 | 134 | # Reject ordinary startup. Retry for the same reasons poll_start() does.
|
135 | 135 | my $pre_existing_msg = qr/pre-existing shared memory block/;
|
@@ -158,13 +158,10 @@ sub init_start
|
158 | 158 | 'single-user mode detected live backend via shared memory');
|
159 | 159 | log_ipcs();
|
160 | 160 | # Fail to reject startup if shm key N has become available and we crash while
|
161 |
| -# using key N+1. This is unwanted, but expected. Windows is immune, because |
162 |
| -# its GetSharedMemName() use DataDir strings, not numeric keys. |
| 161 | +# using key N+1. This is unwanted, but expected. |
163 | 162 | $flea->stop; # release first key
|
164 |
| -is( $gnat->start(fail_ok => 1), |
165 |
| - $TestLib::windows_os ? 0 : 1, |
166 |
| - 'key turnover fools only sysv_shmem.c'); |
167 |
| -$gnat->stop; # release first key (no-op on $TestLib::windows_os) |
| 163 | +is($gnat->start(fail_ok => 1), 1, 'key turnover fools only sysv_shmem.c'); |
| 164 | +$gnat->stop; # release first key |
168 | 165 | $flea->start; # grab first key
|
169 | 166 | # cleanup
|
170 | 167 | TestLib::system_log('pg_ctl', 'kill', 'QUIT', $slow_pid);
|
|
0 commit comments