* [PATCH] sandbox: Increase default SYS_MALLOC_LEN
@ 2022-04-14 15:36 Tom Rini
2022-04-14 19:05 ` Simon Glass
2022-04-15 12:08 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Tom Rini @ 2022-04-14 15:36 UTC (permalink / raw)
To: u-boot; +Cc: Simon Glass, Ramon Fried
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
Cc: Simon Glass <sjg@chromium.org>
Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
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(-)
diff --git a/Kconfig b/Kconfig
index 0ee3068b9a66..b45e60a75b93 100644
--- a/Kconfig
+++ b/Kconfig
@@ -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
diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig
index 88f9ecbb7fce..a13fa2e2c517 100644
--- a/configs/sandbox64_defconfig
+++ b/configs/sandbox64_defconfig
@@ -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"
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index cb8d590eb642..4d3e4f317fca 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -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"
diff --git a/configs/sandbox_flattree_defconfig b/configs/sandbox_flattree_defconfig
index 24b272068a19..d799f7ddcad3 100644
--- a/configs/sandbox_flattree_defconfig
+++ b/configs/sandbox_flattree_defconfig
@@ -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"
diff --git a/configs/sandbox_noinst_defconfig b/configs/sandbox_noinst_defconfig
index 9eefe4f1051c..c9430da0f09e 100644
--- a/configs/sandbox_noinst_defconfig
+++ b/configs/sandbox_noinst_defconfig
@@ -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
diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig
index 0092fea76ba7..13a76e89ea52 100644
--- a/configs/sandbox_spl_defconfig
+++ b/configs/sandbox_spl_defconfig
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sandbox: Increase default SYS_MALLOC_LEN
2022-04-14 15:36 [PATCH] sandbox: Increase default SYS_MALLOC_LEN Tom Rini
@ 2022-04-14 19:05 ` Simon Glass
2022-04-15 12:08 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2022-04-14 19:05 UTC (permalink / raw)
To: Tom Rini; +Cc: U-Boot Mailing List, Ramon Fried
Hi Tom,
On Thu, 14 Apr 2022 at 09:36, Tom Rini <trini@konsulko.com> wrote:
>
> 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
>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Ramon Fried <rfried.dev@gmail.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> 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.
Reviewed-by: Simon Glass <sjg@chromium.org>
Regards,
Simon
>
> diff --git a/Kconfig b/Kconfig
> index 0ee3068b9a66..b45e60a75b93 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -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
> diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig
> index 88f9ecbb7fce..a13fa2e2c517 100644
> --- a/configs/sandbox64_defconfig
> +++ b/configs/sandbox64_defconfig
> @@ -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"
> diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
> index cb8d590eb642..4d3e4f317fca 100644
> --- a/configs/sandbox_defconfig
> +++ b/configs/sandbox_defconfig
> @@ -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"
> diff --git a/configs/sandbox_flattree_defconfig b/configs/sandbox_flattree_defconfig
> index 24b272068a19..d799f7ddcad3 100644
> --- a/configs/sandbox_flattree_defconfig
> +++ b/configs/sandbox_flattree_defconfig
> @@ -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"
> diff --git a/configs/sandbox_noinst_defconfig b/configs/sandbox_noinst_defconfig
> index 9eefe4f1051c..c9430da0f09e 100644
> --- a/configs/sandbox_noinst_defconfig
> +++ b/configs/sandbox_noinst_defconfig
> @@ -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
> diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig
> index 0092fea76ba7..13a76e89ea52 100644
> --- a/configs/sandbox_spl_defconfig
> +++ b/configs/sandbox_spl_defconfig
> @@ -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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sandbox: Increase default SYS_MALLOC_LEN
2022-04-14 15:36 [PATCH] sandbox: Increase default SYS_MALLOC_LEN Tom Rini
2022-04-14 19:05 ` Simon Glass
@ 2022-04-15 12:08 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2022-04-15 12:08 UTC (permalink / raw)
To: u-boot; +Cc: Simon Glass, Ramon Fried
[-- Attachment #1: Type: text/plain, Size: 973 bytes --]
On Thu, Apr 14, 2022 at 11:36:13AM -0400, Tom Rini wrote:
> 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
>
> Cc: Ramon Fried <rfried.dev@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Tom Rini <trini@konsulko.com>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-15 12:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-14 15:36 [PATCH] sandbox: Increase default SYS_MALLOC_LEN Tom Rini
2022-04-14 19:05 ` Simon Glass
2022-04-15 12:08 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.