summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorPeter Eisentraut2011-08-23 19:00:52 +0000
committerPeter Eisentraut2011-08-23 19:00:52 +0000
commit1af55e2751cdf3bf3bf25993c34be1fa9ad1e342 (patch)
tree2ba411836fc1e8a4a5d8a4e0ef7723e76ad6daa9 /src/test
parent6c6a4153338c2b2e33203bfb02a26ff8e3d2abd4 (diff)
Use consistent format for reporting GetLastError()
Use something like "error code %lu" for reporting GetLastError() values on Windows. Previously, a mix of different wordings and formats were in use.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/pg_regress.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 1c5c176e1f2..0b039959d9f 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -999,7 +999,7 @@ spawn_process(const char *cmdline)
/* Open the current token to use as base for the restricted one */
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &origToken))
{
- fprintf(stderr, _("could not open process token: %lu\n"),
+ fprintf(stderr, _("could not open process token: error code %lu\n"),
GetLastError());
exit_nicely(2);
}
@@ -1011,7 +1011,7 @@ spawn_process(const char *cmdline)
!AllocateAndInitializeSid(&NtAuthority, 2,
SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_POWER_USERS, 0, 0, 0, 0, 0, 0, &dropSids[1].Sid))
{
- fprintf(stderr, _("could not allocate SIDs: %lu\n"), GetLastError());
+ fprintf(stderr, _("could not allocate SIDs: error code %lu\n"), GetLastError());
exit_nicely(2);
}
@@ -1030,7 +1030,7 @@ spawn_process(const char *cmdline)
if (!b)
{
- fprintf(stderr, _("could not create restricted token: %lu\n"),
+ fprintf(stderr, _("could not create restricted token: error code %lu\n"),
GetLastError());
exit_nicely(2);
}
@@ -1054,7 +1054,7 @@ spawn_process(const char *cmdline)
&si,
&pi))
{
- fprintf(stderr, _("could not start process for \"%s\": %lu\n"),
+ fprintf(stderr, _("could not start process for \"%s\": error code %lu\n"),
cmdline2, GetLastError());
exit_nicely(2);
}
@@ -1380,7 +1380,7 @@ wait_for_tests(PID_TYPE * pids, int *statuses, char **names, int num_tests)
r = WaitForMultipleObjects(tests_left, active_pids, FALSE, INFINITE);
if (r < WAIT_OBJECT_0 || r >= WAIT_OBJECT_0 + tests_left)
{
- fprintf(stderr, _("failed to wait for subprocesses: %lu\n"),
+ fprintf(stderr, _("failed to wait for subprocesses: error code %lu\n"),
GetLastError());
exit_nicely(2);
}
@@ -2295,7 +2295,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
progname, strerror(errno));
#else
if (TerminateProcess(postmaster_pid, 255) == 0)
- fprintf(stderr, _("\n%s: could not kill failed postmaster: %lu\n"),
+ fprintf(stderr, _("\n%s: could not kill failed postmaster: error code %lu\n"),
progname, GetLastError());
#endif