Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a475a2f

Browse filesBrowse files
committed
Don't clobber test exit code at cleanup in LDAP/Kerberors tests
If the test script die()d before running the first test, the whole test was interpreted as SKIPped rather than failed. The PostgreSQL::Cluster module got this right. Backpatch to all supported versions. Discussion: https://www.postgresql.org/message-id/fb898a70-3a88-4629-88e9-f2375020061d@iki.fi
1 parent e13b586 commit a475a2f
Copy full SHA for a475a2f

File tree

Expand file treeCollapse file tree

2 files changed

+10
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-0
lines changed

‎src/test/kerberos/t/001_auth.pl

Copy file name to clipboardExpand all lines: src/test/kerberos/t/001_auth.pl
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,12 @@
203203

204204
END
205205
{
206+
# take care not to change the script's exit value
207+
my $exit_code = $?;
208+
206209
kill 'INT', `cat $kdc_pidfile` if defined($kdc_pidfile) && -f $kdc_pidfile;
210+
211+
$? = $exit_code;
207212
}
208213

209214
note "setting up PostgreSQL instance";

‎src/test/ldap/LdapServer.pm

Copy file name to clipboardExpand all lines: src/test/ldap/LdapServer.pm
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,18 @@ INIT
145145

146146
END
147147
{
148+
# take care not to change the script's exit value
149+
my $exit_code = $?;
150+
148151
foreach my $server (@servers)
149152
{
150153
next unless -f $server->{pidfile};
151154
my $pid = slurp_file($server->{pidfile});
152155
chomp $pid;
153156
kill 'INT', $pid;
154157
}
158+
159+
$? = $exit_code;
155160
}
156161

157162
=pod

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.