From: Christian Brauner Date: Sat, 14 Aug 2021 10:47:58 +0000 (+0200) Subject: idmapped-mounts: use die() helper X-Git-Tag: v2022.05.01~268 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=3507237efef9d2083030ede130a83f423d3eb3fe;p=xfstests-dev.git idmapped-mounts: use die() helper Use the dedicated helper to report an error and exit with failure instead of hand-rolling it. Cc: fstests@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner Signed-off-by: Eryu Guan --- 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); }