syscall: fix listen case bug

Skip UDP listen test when CONFIG_NET_UDP is disabled to prevent
test failures on configurations without UDP support.

Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
This commit is contained in:
tengshuangshuang 2025-04-03 14:59:44 +08:00 committed by Donny(董九柱)
parent 338301de76
commit b6203955f9
3 changed files with 4 additions and 2 deletions

View file

@ -265,7 +265,7 @@ static void audio_test_help(FAR const char *progname, int exitcode)
" -f <format>\n"
" -b <bytes per sample> \n"
" -s <sample rate> \n"
" -c <channles> \n",
" -c <channels> \n",
progname);
printf(" [-a testcase] selects the testcase\n"
" Case 1: Capture\n"

View file

@ -133,7 +133,7 @@ int arch_libc_test_strcpy_offset(int dst_offset, int src_offset)
}
}
/* strcpy shouln't change arch_libc_test_strcpy's local variable */
/* strcpy shouldn't change arch_libc_test_strcpy's local variable */
if (dest != (g_test_dst_str + dst_offset) ||
src != (g_test_src_str + src_offset))

View file

@ -77,10 +77,12 @@ void test_nuttx_syscall_listen01(FAR void **state)
0, 0, 0, 0, -1, ENOTSOCK, "setup0", "cleanup0", "not a socket"
},
# ifdef CONFIG_NET_UDP
{
PF_INET, SOCK_DGRAM, 0, 0, -1, EOPNOTSUPP, "setup1", "cleanup1",
"UDP listen"
},
# endif
};
const char set[] = "setup0";