Skip to content

Commit 243d738

Browse files
committed
[utest][klibc] add rt_sprintf family functions test cases
1 parent a9746ed commit 243d738

File tree

6 files changed

+1093
-7
lines changed

6 files changed

+1093
-7
lines changed

Diff for: bsp/stm32/stm32l475-atk-pandora/board/linker_scripts/link.lds

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ SECTIONS
4040
KEEP(*(VSymTab))
4141
__vsymtab_end = .;
4242

43+
/* section information for utest */
44+
. = ALIGN(4);
45+
__rt_utest_tc_tab_start = .;
46+
KEEP(*(UtestTcTab))
47+
__rt_utest_tc_tab_end = .;
48+
4349
/* section information for initial. */
4450
. = ALIGN(4);
4551
__rt_init_start = .;

Diff for: src/klibc/Kconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
menu "klibc options"
22
menu "rt_vsnprintf options"
33
config RT_KLIBC_USING_LIBC_VSNPRINTF
4-
bool "Enable rt_vsnprintf to use libc vsscanf"
4+
bool "Enable rt_vsnprintf to use libc vsnprintf"
55
default n
66

77
config RT_KLIBC_USING_VSNPRINTF_LONGLONG

Diff for: src/klibc/rt_vsnprintf_tiny.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ int rt_vsnprintf(char *buf, rt_size_t size, const char *fmt, va_list args)
448448
s = va_arg(args, char *);
449449
if (!s)
450450
{
451-
s = "(NULL)";
451+
s = "(null)";
452452
}
453453

454454
for (len = 0; (len != field_width) && (s[len] != '\0'); len++);

Diff for: src/klibc/utest/SConscript

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ from building import *
33
src = []
44

55
if GetDepend('RT_USING_CI_ACTION') or GetDepend('RT_UTEST_TC_USING_KLIBC'):
6-
src += Glob('tc_*.c')
6+
src += Glob('TC_*.c')
77

88
group = DefineGroup('utestcases', src, depend = [''])
99

0 commit comments

Comments
 (0)