Skip to content

Commit a9a9df3

Browse files
committed
debug: start investigating missing sbrk
Signed-off-by: Alp Sayin <alpsayin@gmail.com>
1 parent c21d6c2 commit a9a9df3

File tree

1 file changed

+12
-0
lines changed
  • tests/lib/c_lib/common/src

1 file changed

+12
-0
lines changed

tests/lib/c_lib/common/src/main.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,20 +1109,29 @@ ZTEST(libc_common, test_time_asctime)
11091109
.tm_year = 124, /* Year (current year - 1900) */
11101110
};
11111111

1112+
#if !CONFIG_MICROBLAZE || CONFIG_NEWLIB_LIBC
1113+
/* These functions call snprintf: nothing interesting other than that */
11121114
zassert_not_null(asctime_r(&tp, buf));
1115+
#endif
11131116
zassert_equal(strncmp("Fri Jun 1 14:30:10 2024\n", buf, sizeof(buf)), 0);
11141117

11151118
zassert_not_null(asctime(&tp));
11161119
zassert_equal(strncmp("Fri Jun 1 14:30:10 2024\n", asctime(&tp), sizeof(buf)), 0);
11171120

11181121
if (IS_ENABLED(CONFIG_COMMON_LIBC_ASCTIME_R)) {
11191122
tp.tm_wday = 8;
1123+
#if !CONFIG_MICROBLAZE || CONFIG_NEWLIB_LIBC
1124+
/* These functions call snprintf: nothing interesting other than that */
11201125
zassert_is_null(asctime_r(&tp, buf));
1126+
#endif
11211127
zassert_is_null(asctime(&tp));
11221128

11231129
tp.tm_wday = 5;
11241130
tp.tm_mon = 12;
1131+
#if !CONFIG_MICROBLAZE || CONFIG_NEWLIB_LIBC
1132+
/* These functions call snprintf: nothing interesting other than that */
11251133
zassert_is_null(asctime_r(&tp, buf));
1134+
#endif
11261135
zassert_is_null(asctime(&tp));
11271136
}
11281137
}
@@ -1162,7 +1171,10 @@ ZTEST(libc_common, test_time_ctime)
11621171
#ifdef CONFIG_NATIVE_LIBC
11631172
setenv("TZ", "UTC", 1);
11641173
#endif
1174+
#if !CONFIG_MICROBLAZE || CONFIG_NEWLIB_LIBC
1175+
/* These functions call snprintf: nothing interesting other than that */
11651176
zassert_not_null(ctime_r(&test1, buf));
1177+
#endif
11661178
zassert_equal(strncmp("Thu Jun 13 06:26:40 2024\n", buf, sizeof(buf)), 0);
11671179

11681180
zassert_not_null(ctime(&test1));

0 commit comments

Comments
 (0)