From: Christian Brauner <christian.brauner@xxxxxxxxxx> Use the dedicated helper to report an error and exit with failure instead of hand-rolling it. Cc: Christoph Hellwig <hch@xxxxxx> Cc: fstests@xxxxxxxxxxxxxxx Signed-off-by: Christian Brauner <christian.brauner@xxxxxxxxxx> --- /* v2 */ patch not present /* v3 */ - Christoph Hellwig <hch@xxxxxx>: - Split into separate patch. --- src/idmapped-mounts/idmapped-mounts.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/idmapped-mounts/idmapped-mounts.c b/src/idmapped-mounts/idmapped-mounts.c index 2c212131..69dcc027 100644 --- a/src/idmapped-mounts/idmapped-mounts.c +++ b/src/idmapped-mounts/idmapped-mounts.c @@ -8804,10 +8804,8 @@ static bool run_test(struct t_idmapped_mounts suite[], size_t suite_size) if (pid == 0) { ret = t->test(); - if (ret) { - fprintf(stderr, "failure: %s\n", t->description); - exit(EXIT_FAILURE); - } + if (ret) + die("failure: %s", t->description); exit(EXIT_SUCCESS); } -- 2.30.2