From: Timo Sirainen Date: Wed, 11 Jan 2023 12:31:55 +0000 (+0200) Subject: lib-http: test-http-payload - Add filenames to data mismatch error messages X-Git-Tag: 2.4.0~3190 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc29e0ab712a37535ce03abdb6dfa0b66e6aadb4;p=thirdparty%2Fdovecot%2Fcore.git lib-http: test-http-payload - Add filenames to data mismatch error messages --- diff --git a/src/lib-http/test-http-payload.c b/src/lib-http/test-http-payload.c index 9ca2565d46..827de84377 100644 --- a/src/lib-http/test-http-payload.c +++ b/src/lib-http/test-http-payload.c @@ -197,7 +197,9 @@ test_file_open(const char *path, unsigned int *status_r, const char **reason_r) return NULL; } - return i_stream_create_fd_autoclose(&fd, 40960); + struct istream *input = i_stream_create_fd_autoclose(&fd, 40960); + i_stream_set_name(input, path); + return input; } /* @@ -1040,7 +1042,8 @@ test_client_download_payload_input(struct test_client_request *tcreq) if (memcmp(pdata, fdata, fsize) != 0) { i_fatal("test client: download: " "received data does not match file " - "(%"PRIuUOFF_T":%"PRIuUOFF_T")", + "(%s, %"PRIuUOFF_T":%"PRIuUOFF_T")", + i_stream_get_name(tcreq->file_in), payload->v_offset, tcreq->file_in->v_offset); } @@ -1293,7 +1296,8 @@ static void test_client_echo_payload_input(struct test_client_request *tcreq) if (memcmp(pdata, fdata, fsize) != 0) { i_fatal("test client: echo: " "received data does not match file " - "(%"PRIuUOFF_T":%"PRIuUOFF_T")", + "(%s, %"PRIuUOFF_T":%"PRIuUOFF_T")", + i_stream_get_name(tcreq->file_in), payload->v_offset, tcreq->file_in->v_offset); }