Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit337903a

Browse files
Consider a failed process as a failed test in pg_regress
Commit55de145 added reporting of child process failures, but thetest suite is still allowed to pass even if the process failed. Sinceregress tests are higher level tests, a false positive is more likelyin this case so report failed test processes as failed tests.Reported-by: Andres Freund <andres@anarazel.de>Discussion:https://postgr.es/m/82C46B5E-1821-4039-82C2-56BCA5992989@yesql.seDiscussion:https://postgr.es/m/20221122235636.4frx7hjterq6bmls@awork3.anarazel.de
1 parent78be04e commit337903a

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

‎src/test/regress/pg_regress.c

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1697,19 +1697,26 @@ run_schedule(const char *schedule, test_start_function startfunc,
16971697
differ |=newdiff;
16981698
}
16991699

1700-
if (differ)
1700+
if (statuses[i]!=0)
17011701
{
17021702
status(_("FAILED"));
1703+
log_child_failure(statuses[i]);
17031704
fail_count++;
17041705
}
17051706
else
17061707
{
1707-
status(_("ok "));/* align with FAILED */
1708-
success_count++;
1709-
}
17101708

1711-
if (statuses[i]!=0)
1712-
log_child_failure(statuses[i]);
1709+
if (differ)
1710+
{
1711+
status(_("FAILED"));
1712+
fail_count++;
1713+
}
1714+
else
1715+
{
1716+
status(_("ok "));/* align with FAILED */
1717+
success_count++;
1718+
}
1719+
}
17131720

17141721
INSTR_TIME_SUBTRACT(stoptimes[i],starttimes[i]);
17151722
status(_(" %8.0f ms"),INSTR_TIME_GET_MILLISEC(stoptimes[i]));
@@ -1778,20 +1785,26 @@ run_single_test(const char *test, test_start_function startfunc,
17781785
differ |=newdiff;
17791786
}
17801787

1781-
if (differ)
1788+
if (exit_status!=0)
17821789
{
17831790
status(_("FAILED"));
17841791
fail_count++;
1792+
log_child_failure(exit_status);
17851793
}
17861794
else
17871795
{
1788-
status(_("ok "));/* align with FAILED */
1789-
success_count++;
1796+
if (differ)
1797+
{
1798+
status(_("FAILED"));
1799+
fail_count++;
1800+
}
1801+
else
1802+
{
1803+
status(_("ok "));/* align with FAILED */
1804+
success_count++;
1805+
}
17901806
}
17911807

1792-
if (exit_status!=0)
1793-
log_child_failure(exit_status);
1794-
17951808
INSTR_TIME_SUBTRACT(stoptime,starttime);
17961809
status(_(" %8.0f ms"),INSTR_TIME_GET_MILLISEC(stoptime));
17971810

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp