diff --git a/tests/libtest/lib518.c b/tests/libtest/lib518.c index b2aa0554c6..756f301d9e 100644 --- a/tests/libtest/lib518.c +++ b/tests/libtest/lib518.c @@ -409,8 +409,9 @@ static int rlimit(int keep_open) sprintf(strbuff1, fmt, num_open.rlim_max); sprintf(strbuff, "stdio fopen() fails with %s fds open()", strbuff1); - store_errmsg(strbuff, 0); fprintf(stderr, "%s\n", msgbuff); + sprintf(strbuff, "stdio fopen() fails with lots of fds open()"); + store_errmsg(strbuff, 0); close_file_descriptors(); free(memchunk); return -12; diff --git a/tests/libtest/lib537.c b/tests/libtest/lib537.c index eecda46262..a074bf9940 100644 --- a/tests/libtest/lib537.c +++ b/tests/libtest/lib537.c @@ -412,8 +412,9 @@ static int rlimit(int keep_open) sprintf(strbuff1, fmt, num_open.rlim_max); sprintf(strbuff, "stdio fopen() fails with %s fds open()", strbuff1); - store_errmsg(strbuff, 0); fprintf(stderr, "%s\n", msgbuff); + sprintf(strbuff, "stdio fopen() fails with lots of fds open()"); + store_errmsg(strbuff, 0); close_file_descriptors(); free(memchunk); return -10;