sandbox: Increase default SYS_MALLOC_LEN
PATCH 1/1 sandbox: Increase default SYS_MALLOC_LEN
Increase the malloc pool on sandbox in order to avoid spurious errors such as:
___________________ test_ut[ut_dm_dm_test_video_comp_bmp32] ____________________ test/py/tests/test_ut.py:43: in test_ut
assert output.endswith('Failures: 0')
E AssertionError: assert False
E + where False = <built-in method endswith of str object at 0x7f5de85efb20>('Failures: 0')
E + where <built-in method endswith of str object at 0x7f5de85efb20> = 'Test: dm_test_video_comp_bmp32: video.c\r\r\nSDL renderer does not exist\r\r\ntest/dm/video.c:86, compress_frame_buff..._test_video_comp_bmp32(): 2024 == compress_frame_buffer(uts, dev): Expected 0x7e8 (2024), got 0x1 (1)\r\r\nFailures: 2'.endswith
--- Kconfig | 1 + configs/sandbox64_defconfig | 1 - configs/sandbox_defconfig | 1 - configs/sandbox_flattree_defconfig | 1 - configs/sandbox_noinst_defconfig | 1 - configs/sandbox_spl_defconfig | 1 - 6 files changed, 1 insertion(+), 5 deletions(-)
Kconfig +1 -0
@@ -263,6 +263,7 @@ config SYS_MALLOC_F_LEN config SYS_MALLOC_LEN hex "Define memory for Dynamic allocation" + default 0x4000000 if SANDBOX default 0x2000000 if ARCH_ROCKCHIP || ARCH_OMAP2PLUS || ARCH_MESON default 0x200000 if ARCH_BMIPS || X86 default 0x120000 if MACH_SUNIV
configs/sandbox64_defconfig +0 -1
@@ -1,5 +1,4 @@ CONFIG_SYS_TEXT_BASE=0 -CONFIG_SYS_MALLOC_LEN=0x2000000 CONFIG_NR_DRAM_BANKS=1 CONFIG_ENV_SIZE=0x2000 CONFIG_DEFAULT_DEVICE_TREE="sandbox64"
configs/sandbox_defconfig +0 -1
@@ -1,5 +1,4 @@ CONFIG_SYS_TEXT_BASE=0 -CONFIG_SYS_MALLOC_LEN=0x2000000 CONFIG_NR_DRAM_BANKS=1 CONFIG_ENV_SIZE=0x2000 CONFIG_DEFAULT_DEVICE_TREE="sandbox"
configs/sandbox_flattree_defconfig +0 -1
@@ -1,5 +1,4 @@ CONFIG_SYS_TEXT_BASE=0 -CONFIG_SYS_MALLOC_LEN=0x2000000 CONFIG_NR_DRAM_BANKS=1 CONFIG_ENV_SIZE=0x2000 CONFIG_DEFAULT_DEVICE_TREE="sandbox"
configs/sandbox_noinst_defconfig +0 -1
@@ -1,5 +1,4 @@ CONFIG_SYS_TEXT_BASE=0x200000 -CONFIG_SYS_MALLOC_LEN=0x2000000 CONFIG_SPL_GPIO=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y
configs/sandbox_spl_defconfig +0 -1
@@ -1,5 +1,4 @@ CONFIG_SYS_TEXT_BASE=0x200000 -CONFIG_SYS_MALLOC_LEN=0x2000000 CONFIG_SPL_GPIO=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y
Signature · 1 line
2.25.1
Hi Tom,
Quoted 13 lines · Tom Rini
Increase the malloc pool on sandbox in order to avoid spurious errors such as:
___________________ test_ut[ut_dm_dm_test_video_comp_bmp32] ____________________test/py/tests/test_ut.py:43: intest_ut
assertoutput.endswith('Failures: 0')
E AssertionError: assert False
E + where False = <built-in method endswith of str object at 0x7f5de85efb20>('Failures: 0')
E + where <built-in method endswith of str object at0x7f5de85efb20> = 'Test:dm_test_video_comp_bmp32: video.c\r\r\nSDL renderer does not exist\r\r\ntest/dm/video.c:86, compress_frame_buff..._test_video_comp_bmp32(): 2024 ==compress_frame_buffer(uts, dev): Expected0x7e8(2024), got0x1(1)\r\r\nFailures: 2'.endswithCc Simon Glass <[email protected]>Cc Ramon Fried <[email protected]>Signed-off-by Tom Rini <[email protected]>
Quoted 8 lines
--- Kconfig | 1 + configs/sandbox64_defconfig | 1 - configs/sandbox_defconfig | 1 - configs/sandbox_flattree_defconfig | 1 - configs/sandbox_noinst_defconfig | 1 - configs/sandbox_spl_defconfig | 1 - 6 files changed, 1 insertion(+), 5 deletions(-)
This indicates a memory leak. The test system is supposed to detect memory leaks but it seems not in this case. So this seems good as a workaround for now.
Regards,
Simon
Quoted 66 lines
Kconfig +1
-0@@ -263,6 +263,7 @@ config SYS_MALLOC_F_LEN config SYS_MALLOC_LEN hex "Define memory for Dynamic allocation" + default 0x4000000 if SANDBOX default 0x2000000 if ARCH_ROCKCHIP || ARCH_OMAP2PLUS || ARCH_MESON default 0x200000 if ARCH_BMIPS || X86 default 0x120000 if MACH_SUNIVconfigs/sandbox64_defconfig +0
-1@@ -1,5 +1,4 @@ CONFIG_SYS_TEXT_BASE=0 -CONFIG_SYS_MALLOC_LEN=0x2000000 CONFIG_NR_DRAM_BANKS=1 CONFIG_ENV_SIZE=0x2000 CONFIG_DEFAULT_DEVICE_TREE="sandbox64"configs/sandbox_defconfig +0
-1@@ -1,5 +1,4 @@ CONFIG_SYS_TEXT_BASE=0 -CONFIG_SYS_MALLOC_LEN=0x2000000 CONFIG_NR_DRAM_BANKS=1 CONFIG_ENV_SIZE=0x2000 CONFIG_DEFAULT_DEVICE_TREE="sandbox"configs/sandbox_flattree_defconfig +0
-1@@ -1,5 +1,4 @@ CONFIG_SYS_TEXT_BASE=0 -CONFIG_SYS_MALLOC_LEN=0x2000000 CONFIG_NR_DRAM_BANKS=1 CONFIG_ENV_SIZE=0x2000 CONFIG_DEFAULT_DEVICE_TREE="sandbox"configs/sandbox_noinst_defconfig +0
-1@@ -1,5 +1,4 @@ CONFIG_SYS_TEXT_BASE=0x200000 -CONFIG_SYS_MALLOC_LEN=0x2000000 CONFIG_SPL_GPIO=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=yconfigs/sandbox_spl_defconfig +0
-2@@ -1,5 +1,4 @@ CONFIG_SYS_TEXT_BASE=0x200000 -CONFIG_SYS_MALLOC_LEN=0x2000000 CONFIG_SPL_GPIO=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y --2.25.1
Quoted 9 lines · Tom Rini
Increase the malloc pool on sandbox in order to avoid spurious errors such as:
___________________ test_ut[ut_dm_dm_test_video_comp_bmp32] ____________________test/py/tests/test_ut.py:43: intest_ut
assertoutput.endswith('Failures: 0')
E AssertionError: assert False
E + where False = <built-in method endswith of str object at 0x7f5de85efb20>('Failures: 0')
E + where <built-in method endswith of str object at0x7f5de85efb20> = 'Test:dm_test_video_comp_bmp32: video.c\r\r\nSDL renderer does not exist\r\r\ntest/dm/video.c:86, compress_frame_buff..._test_video_comp_bmp32(): 2024 ==compress_frame_buffer(uts, dev): Expected0x7e8(2024), got0x1(1)\r\r\nFailures: 2'.endswith
Quoted 3 lines
Cc Ramon Fried <[email protected]>Reviewed-by Simon Glass <[email protected]>Signed-off-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom