diff mbox series

[liburing,1/6] tests: do not report an error message when return ret that might be a skip

Message ID 20220706034059.2817423-2-eschwartz93@gmail.com (mailing list archive)
State New
Headers show
Series More wor on updating exit codes to use | expand

Commit Message

Eli Schwartz July 6, 2022, 3:40 a.m. UTC
We are going to update these functions to distinguish between pass/skip,
so ret might be nonzero but have handled its own non-error message.

Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
---
 test/fallocate.c   | 8 ++++++--
 test/file-update.c | 4 +++-
 2 files changed, 9 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/test/fallocate.c b/test/fallocate.c
index 6cb57e0..a9bf6fd 100644
--- a/test/fallocate.c
+++ b/test/fallocate.c
@@ -230,7 +230,9 @@  int main(int argc, char *argv[])
 
 	ret = test_fallocate(&ring);
 	if (ret) {
-		fprintf(stderr, "test_fallocate failed\n");
+		if (ret != T_EXIT_SKIP) {
+			fprintf(stderr, "test_fallocate failed\n");
+		}
 		return ret;
 	}
 
@@ -242,7 +244,9 @@  int main(int argc, char *argv[])
 
 	ret = test_fallocate_rlimit(&ring);
 	if (ret) {
-		fprintf(stderr, "test_fallocate_rlimit failed\n");
+		if (ret != T_EXIT_SKIP) {
+			fprintf(stderr, "test_fallocate_rlimit failed\n");
+		}
 		return ret;
 	}
 
diff --git a/test/file-update.c b/test/file-update.c
index 97db95a..b8039c9 100644
--- a/test/file-update.c
+++ b/test/file-update.c
@@ -165,7 +165,9 @@  int main(int argc, char *argv[])
 
 	ret = test_sqe_update(&r1);
 	if (ret) {
-		fprintf(stderr, "test_sqe_update failed\n");
+		if (ret != T_EXIT_SKIP) {
+			fprintf(stderr, "test_sqe_update failed\n");
+		}
 		return ret;
 	}