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

Commit5b8b137

Browse files
committed
Adjust pg_regress to print out the exact string given to system() when
'make install' or 'initdb' fails. Also minor simplification of fgets()usage --- fgets guarantees a trailing null anyway.
1 parent9d9a65b commit5b8b137

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

‎src/test/regress/pg_regress.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.3 2006/07/1905:21:57 tgl Exp $
14+
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.4 2006/07/1916:23:17 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -320,8 +320,8 @@ load_resultmap(void)
320320
progname,buf,strerror(errno));
321321
exit_nicely(2);
322322
}
323-
memset(buf,0,sizeof(buf));
324-
while (fgets(buf,sizeof(buf)-1,f))
323+
324+
while (fgets(buf,sizeof(buf),f))
325325
{
326326
char*platform;
327327
char*expected;
@@ -969,8 +969,7 @@ run_schedule(const char *schedule)
969969
exit_nicely(2);
970970
}
971971

972-
memset(scbuf,0,sizeof(scbuf));
973-
while (fgets(scbuf,sizeof(scbuf)-1,scf))
972+
while (fgets(scbuf,sizeof(scbuf),scf))
974973
{
975974
char*test=NULL;
976975
char*c;
@@ -1396,7 +1395,7 @@ main(int argc, char *argv[])
13961395
makeprog,top_builddir,temp_install,outputdir);
13971396
if (system(buf))
13981397
{
1399-
fprintf(stderr,_("\n%s: installation failed\nExamine %s/log/install.log for the reason.\n"),progname,outputdir);
1398+
fprintf(stderr,_("\n%s: installation failed\nExamine %s/log/install.log for the reason.\nCommand was: %s\n"),progname,outputdir,buf);
14001399
exit_nicely(2);
14011400
}
14021401

@@ -1410,7 +1409,7 @@ main(int argc, char *argv[])
14101409
outputdir);
14111410
if (system(buf))
14121411
{
1413-
fprintf(stderr,_("\n%s: initdb failed\nExamine %s/log/initdb.log for the reason.\n"),progname,outputdir);
1412+
fprintf(stderr,_("\n%s: initdb failed\nExamine %s/log/initdb.log for the reason.\nCommand was: %s\n"),progname,outputdir,buf);
14141413
exit_nicely(2);
14151414
}
14161415

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp