rt-thread icon indicating copy to clipboard operation
rt-thread copied to clipboard

[Bug] k230 utest libc测试部分测试例失败

Open yixinghua121 opened this issue 11 months ago • 2 comments

RT-Thread Version

c1166e0bf16aeda85e5facd01506973afcf6e8c6

Hardware Type/Architectures

k230

Develop Toolchain

GCC

Describe the bug

  1. 编译链接代码后,会生成test目录下生成一个应用程序:utestcases.elf,将其拷贝到sdcard或者编译进文件系统。
  2. 测试执行,进入应用程序所在目录,然后执行命令:utestcases.elf all 3.测试libc,部分case失败; 4.代码:maix3/software/userapps/testcases/test 5.失败case: utest.pingpong_test.pingpong_timeout_tc utest.libc_test.file.fcntl utest.libc_test.file.fscanf utest.libc_test.math.powf

Other additional context

No response

yixinghua121 avatar Jan 09 '25 06:01 yixinghua121

fscanf的问题是报的这个错吗,需要创建一个可写的sdcard目录。测试代码创建了文件:"char *temp_file = "/sdcard/temp_file_fscanf";"

msh />fscanf.elf
msh />fopen tmpfile failed
fscanf.c:65: !!(f=writetemp("      42")) failed (failed to make temp file)
fopen tmpfile failed
fscanf.c:76: !!(f=writetemp("[abc123]....x")) failed (failed to make temp file)
fopen tmpfile failed
fscanf.c:90: !!(f=writetemp("0x1p 12")) failed (failed to make temp file)
fopen tmpfile failed
fscanf.c:114: !!(f=writetemp("0x.1p4    012")) failed (failed to make temp file)
fopen tmpfile failed
fscanf.c:127: !!(f=writetemp("0xx")) failed (failed to make temp file)

heyuanjie87 avatar Mar 21 '25 08:03 heyuanjie87

utest.libc_test.file.fscanf, 问题已经解决;

yixinghua121 avatar Apr 01 '25 09:04 yixinghua121