From 844a91444024b04e5a949b2c219dbf366fd4ce8e Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 24 Mar 2025 18:44:50 +0000 Subject: [PATCH] tests: jail: Consume any output of the pipe This is just because of the log streamer complaining Signed-off-by: Michael Tremer --- tests/libpakfire/jail.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/libpakfire/jail.c b/tests/libpakfire/jail.c index 2196fbe3..d10e3912 100644 --- a/tests/libpakfire/jail.c +++ b/tests/libpakfire/jail.c @@ -347,6 +347,11 @@ static ssize_t callback_stdin(struct pakfire_ctx* ctx, void* data, char* buffer, return bytes_written; } +// Just consume the entire line +static int callback_stdout(struct pakfire_ctx* ctx, void* data, const char* line, size_t length) { + return fwrite(line, 1, length, stdout); +} + static int test_communicate(const struct test* t) { struct pakfire_jail* jail = NULL; int r = EXIT_FAILURE; @@ -363,7 +368,7 @@ static int test_communicate(const struct test* t) { // Check if the mount actually works ASSERT_SUCCESS(pakfire_jail_communicate(jail, argv, NULL, 0, - callback_stdin, &lines, NULL, NULL)); + callback_stdin, &lines, callback_stdout, NULL)); // Success r = EXIT_SUCCESS; -- 2.39.5