mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-10-18 06:55:30 +08:00
When sal_socket() rejects a request, DFS v2 descriptor cleanup destroys the dfs_file but leaves its separately allocated vnode behind. Destroy the vnode before releasing the failed descriptor and add a regression test that verifies repeated failures do not consume heap. Fixes #11710 Assisted-by: OpenAI Codex:GPT-5
27 lines
665 B
Python
27 lines
665 B
Python
Import('rtconfig')
|
|
from building import *
|
|
|
|
cwd = GetCurrentDir()
|
|
src = []
|
|
CPPPATH = [cwd]
|
|
|
|
if GetDepend('RT_UTEST_TC_USING_LWIP'):
|
|
# Add lwIP test source if enabled
|
|
src += ['tc_lwip.c']
|
|
|
|
if GetDepend('RT_UTEST_TC_USING_NETDEV'):
|
|
# Add netdev test source if enabled
|
|
src += ['tc_netdev.c']
|
|
|
|
if GetDepend('RT_UTEST_TC_USING_SAL'):
|
|
# Add sal test source if enabled
|
|
src += ['tc_sal_socket.c']
|
|
|
|
if GetDepend(['RT_USING_DFS_V2', 'SAL_USING_POSIX']):
|
|
src += ['tc_sal_socket_failure.c']
|
|
|
|
# Define the test group with proper dependencies
|
|
group = DefineGroup('utestcases', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
Return('group')
|