This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] time: ensure failing strptime() tests are reported correctly
- From: Vincent Bernat <Vincent dot Bernat at exoscale dot ch>
- To: libc-alpha at sourceware dot org
- Cc: Vincent Bernat <vincent at bernat dot im>
- Date: Fri, 6 Mar 2015 12:01:52 +0100
- Subject: [PATCH] time: ensure failing strptime() tests are reported correctly
- Authentication-results: sourceware.org; auth=none
- References: <20150306100412 dot GT12857 at vapier>
From: Vincent Bernat <vincent@bernat.im>
---
ChangeLog | 6 ++++++
time/tst-strptime2.c | 5 +----
time/tst-strptime3.c | 5 +----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 420f351ee0d9..0eb779d91fce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-06 Vincent Bernat <vincent@bernat.im>
+
+ * time/tst-strptime2.c (do_test): Ensure failing tests are
+ reported correctly.
+ * time/tst-strptime3.c (do_test): Likewise.
+
2015-03-06 Samuel Thibault <samuel.thibault@inria.fr>
Fix aio_error thread-safety.
diff --git a/time/tst-strptime2.c b/time/tst-strptime2.c
index bcd6cc8be98f..a08e6d7cb7de 100644
--- a/time/tst-strptime2.c
+++ b/time/tst-strptime2.c
@@ -52,10 +52,7 @@ do_test (void)
}
}
- if (result == 0)
- puts ("all OK");
-
- return 0;
+ return result;
}
#define TEST_FUNCTION do_test ()
diff --git a/time/tst-strptime3.c b/time/tst-strptime3.c
index 75b57c192871..d53f51ee2244 100644
--- a/time/tst-strptime3.c
+++ b/time/tst-strptime3.c
@@ -48,10 +48,7 @@ do_test (void)
result = 1;
}
- if (result == 0)
- puts ("all OK");
-
- return 0;
+ return result;
}
#define TEST_FUNCTION do_test ()
--
2.1.4