From 72de31a36e39a453382f72187c9443458bb3c4ee Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 11 Jan 2023 14:31:55 +0200 Subject: [PATCH] lib-http: test-http-payload - Add filenames to data mismatch error messages --- src/lib-http/test-http-payload.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib-http/test-http-payload.c b/src/lib-http/test-http-payload.c index 4e638618a4..690f465d34 100644 --- a/src/lib-http/test-http-payload.c +++ b/src/lib-http/test-http-payload.c @@ -199,7 +199,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; } /* @@ -1036,7 +1038,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); } @@ -1289,7 +1292,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); } -- 2.47.3