mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-06 22:31:35 +02:00
52 lines
1.6 KiB
Diff
52 lines
1.6 KiB
Diff
This test fail with
|
|
|
|
Running case 'printf_hooks': ++-+-+++++++++++++++++
|
|
Failure in 'test_time_printf_hook': buf != time_data[_i].out ("Jan 01 00:00:01 1970" != "Jan 01 01:00:01 1970") (suites/test_utils.c:967, i = 2)
|
|
Failure in 'test_time_printf_hook': buf != time_data[_i].out ("Jul 01 13:43:16 2012" != "Jul 01 15:43:16 2012") (suites/test_utils.c:967, i = 4)
|
|
|
|
--- a/src/libstrongswan/tests/suites/test_utils.c
|
|
+++ b/src/libstrongswan/tests/suites/test_utils.c
|
|
@@ -941,34 +941,6 @@ START_TEST(test_path_absolute)
|
|
END_TEST
|
|
|
|
/*******************************************************************************
|
|
- * time_printf_hook
|
|
- */
|
|
-
|
|
-static struct {
|
|
- time_t in;
|
|
- bool utc;
|
|
- char *out;
|
|
-} time_data[] = {
|
|
- {UNDEFINED_TIME, FALSE, "--- -- --:--:-- ----"},
|
|
- {UNDEFINED_TIME, TRUE , "--- -- --:--:-- UTC ----"},
|
|
- {1, FALSE, "Jan 01 01:00:01 1970"},
|
|
- {1, TRUE , "Jan 01 00:00:01 UTC 1970"},
|
|
- {1341150196, FALSE, "Jul 01 15:43:16 2012"},
|
|
- {1341150196, TRUE , "Jul 01 13:43:16 UTC 2012"},
|
|
-};
|
|
-
|
|
-START_TEST(test_time_printf_hook)
|
|
-{
|
|
- char buf[32];
|
|
- int len;
|
|
-
|
|
- len = snprintf(buf, sizeof(buf), "%T", &time_data[_i].in, time_data[_i].utc);
|
|
- ck_assert(len >= 0 && len < sizeof(buf));
|
|
- ck_assert_str_eq(buf, time_data[_i].out);
|
|
-}
|
|
-END_TEST
|
|
-
|
|
-/*******************************************************************************
|
|
* time_delta_printf_hook
|
|
*/
|
|
|
|
@@ -1321,7 +1293,6 @@ Suite *utils_suite_create()
|
|
suite_add_tcase(s, tc);
|
|
|
|
tc = tcase_create("printf_hooks");
|
|
- tcase_add_loop_test(tc, test_time_printf_hook, 0, countof(time_data));
|
|
tcase_add_loop_test(tc, test_time_delta_printf_hook, 0, countof(time_delta_data));
|
|
suite_add_tcase(s, tc);
|
|
|