diff options
Diffstat (limited to 'xdelta3/xdelta3-test.h')
-rw-r--r-- | xdelta3/xdelta3-test.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/xdelta3/xdelta3-test.h b/xdelta3/xdelta3-test.h index 7464c4f..3c5446b 100644 --- a/xdelta3/xdelta3-test.h +++ b/xdelta3/xdelta3-test.h | |||
@@ -178,7 +178,7 @@ static int do_fail (xd3_stream *stream, const char *buf) | |||
178 | if (! WIFEXITED (ret) || WEXITSTATUS (ret) != 1) | 178 | if (! WIFEXITED (ret) || WEXITSTATUS (ret) != 1) |
179 | { | 179 | { |
180 | stream->msg = "command should have not succeeded"; | 180 | stream->msg = "command should have not succeeded"; |
181 | XPR(NT "command was %s", buf); | 181 | XPR(NT "command was %s\n", buf); |
182 | return XD3_INTERNAL; | 182 | return XD3_INTERNAL; |
183 | } | 183 | } |
184 | return 0; | 184 | return 0; |
@@ -218,15 +218,10 @@ test_random_numbers (xd3_stream *stream, int ignore) | |||
218 | static void | 218 | static void |
219 | test_unlink (char* file) | 219 | test_unlink (char* file) |
220 | { | 220 | { |
221 | char buf[TESTBUFSIZE]; | 221 | int ret; |
222 | while (unlink (file) != 0) | 222 | if ((ret = unlink (file)) != 0 && errno != ENOENT) |
223 | { | 223 | { |
224 | if (errno == ENOENT) | 224 | XPR(NT "unlink %s failed: %s\n", file, strerror(ret)); |
225 | { | ||
226 | break; | ||
227 | } | ||
228 | snprintf_func (buf, sizeof(buf), "rm -f %s", file); | ||
229 | system (buf); | ||
230 | } | 225 | } |
231 | } | 226 | } |
232 | 227 | ||