]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
idmapped-mounts: use die() helper
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 14 Aug 2021 10:47:58 +0000 (12:47 +0200)
committerEryu Guan <guaneryu@gmail.com>
Sun, 22 Aug 2021 11:48:09 +0000 (19:48 +0800)
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 <hch@lst.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
src/idmapped-mounts/idmapped-mounts.c

index 2c212131d2664247361ba4f98510e085ed5767c4..69dcc027346eb7aaef5b572d2404b389ca758782 100644 (file)
@@ -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);
                }