@@ -1109,20 +1109,29 @@ ZTEST(libc_common, test_time_asctime)
1109
1109
.tm_year = 124 , /* Year (current year - 1900) */
1110
1110
};
1111
1111
1112
+ #if !CONFIG_MICROBLAZE || CONFIG_NEWLIB_LIBC
1113
+ /* These functions call snprintf: nothing interesting other than that */
1112
1114
zassert_not_null (asctime_r (& tp , buf ));
1115
+ #endif
1113
1116
zassert_equal (strncmp ("Fri Jun 1 14:30:10 2024\n" , buf , sizeof (buf )), 0 );
1114
1117
1115
1118
zassert_not_null (asctime (& tp ));
1116
1119
zassert_equal (strncmp ("Fri Jun 1 14:30:10 2024\n" , asctime (& tp ), sizeof (buf )), 0 );
1117
1120
1118
1121
if (IS_ENABLED (CONFIG_COMMON_LIBC_ASCTIME_R )) {
1119
1122
tp .tm_wday = 8 ;
1123
+ #if !CONFIG_MICROBLAZE || CONFIG_NEWLIB_LIBC
1124
+ /* These functions call snprintf: nothing interesting other than that */
1120
1125
zassert_is_null (asctime_r (& tp , buf ));
1126
+ #endif
1121
1127
zassert_is_null (asctime (& tp ));
1122
1128
1123
1129
tp .tm_wday = 5 ;
1124
1130
tp .tm_mon = 12 ;
1131
+ #if !CONFIG_MICROBLAZE || CONFIG_NEWLIB_LIBC
1132
+ /* These functions call snprintf: nothing interesting other than that */
1125
1133
zassert_is_null (asctime_r (& tp , buf ));
1134
+ #endif
1126
1135
zassert_is_null (asctime (& tp ));
1127
1136
}
1128
1137
}
@@ -1162,7 +1171,10 @@ ZTEST(libc_common, test_time_ctime)
1162
1171
#ifdef CONFIG_NATIVE_LIBC
1163
1172
setenv ("TZ" , "UTC" , 1 );
1164
1173
#endif
1174
+ #if !CONFIG_MICROBLAZE || CONFIG_NEWLIB_LIBC
1175
+ /* These functions call snprintf: nothing interesting other than that */
1165
1176
zassert_not_null (ctime_r (& test1 , buf ));
1177
+ #endif
1166
1178
zassert_equal (strncmp ("Thu Jun 13 06:26:40 2024\n" , buf , sizeof (buf )), 0 );
1167
1179
1168
1180
zassert_not_null (ctime (& test1 ));
0 commit comments