diff mbox series

[5/5] dlmalloc: remove unit test support in SPL

Message ID 20200415164623.142908-6-xypron.glpk@gmx.de
State Accepted
Commit be621c11b9f88bf9715618fc402efa543232399d
Headers show
Series lib: reduce SPL size | expand

Commit Message

Heinrich Schuchardt April 15, 2020, 4:46 p.m. UTC
We cannot run unit tests in SPL. So remove the unit test support.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 common/dlmalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.25.1

Comments

Tom Rini April 16, 2020, 2:32 a.m. UTC | #1
On Wed, Apr 15, 2020 at 06:46:23PM +0200, Heinrich Schuchardt wrote:

> We cannot run unit tests in SPL. So remove the unit test support.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  common/dlmalloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Does this show up as a problem somewhere?  I don't see this resulting in
size savings anywhere, thanks.
Heinrich Schuchardt April 16, 2020, 3:37 p.m. UTC | #2
On 4/16/20 4:32 AM, Tom Rini wrote:
> On Wed, Apr 15, 2020 at 06:46:23PM +0200, Heinrich Schuchardt wrote:
>
>> We cannot run unit tests in SPL. So remove the unit test support.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>> ---
>>  common/dlmalloc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Does this show up as a problem somewhere?  I don't see this resulting in
> size savings anywhere, thanks.
>

pine64-lts_defconfig + CONFIG_UNIT_TEST=y:

without patch:
1487904 spl/u-boot-spl

with patch:
1485712 spl/u-boot-spl

The difference seems to be in the size of debug sections.

Best regards

Heinrich
Tom Rini April 16, 2020, 5 p.m. UTC | #3
On Thu, Apr 16, 2020 at 05:37:56PM +0200, Heinrich Schuchardt wrote:
> On 4/16/20 4:32 AM, Tom Rini wrote:
> > On Wed, Apr 15, 2020 at 06:46:23PM +0200, Heinrich Schuchardt wrote:
> >
> >> We cannot run unit tests in SPL. So remove the unit test support.
> >>
> >> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> >> ---
> >>  common/dlmalloc.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Does this show up as a problem somewhere?  I don't see this resulting in
> > size savings anywhere, thanks.
> >
> 
> pine64-lts_defconfig + CONFIG_UNIT_TEST=y:
> 
> without patch:
> 1487904 spl/u-boot-spl
> 
> with patch:
> 1485712 spl/u-boot-spl
> 
> The difference seems to be in the size of debug sections.

Interesting, what toolchain are you using?  That doesn't show up here.
Thanks!
Heinrich Schuchardt April 16, 2020, 5:19 p.m. UTC | #4
On 16.04.20 19:00, Tom Rini wrote:
> On Thu, Apr 16, 2020 at 05:37:56PM +0200, Heinrich Schuchardt
> wrote:
>> On 4/16/20 4:32 AM, Tom Rini wrote:
>>> On Wed, Apr 15, 2020 at 06:46:23PM +0200, Heinrich Schuchardt
>>> wrote:
>>>
>>>> We cannot run unit tests in SPL. So remove the unit test
>>>> support.
>>>>
>>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de> ---
>>>> common/dlmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1
>>>> deletion(-)
>>>
>>> Does this show up as a problem somewhere?  I don't see this
>>> resulting in size savings anywhere, thanks.
>>>
>>
>> pine64-lts_defconfig + CONFIG_UNIT_TEST=y:
>>
>> without patch: 1487904 spl/u-boot-spl
>>
>> with patch: 1485712 spl/u-boot-spl
>>
>> The difference seems to be in the size of debug sections.
>
> Interesting, what toolchain are you using?  That doesn't show up
> here. Thanks!
>

I am on Debian Bullseye gcc-9.2.

As you already remarked replying to another patch the linker is
stripping the differences. My idea is that we should only compile the
necessary.

Best regards

Heinrich
Tom Rini April 24, 2020, 5:11 p.m. UTC | #5
On Wed, Apr 15, 2020 at 06:46:23PM +0200, Heinrich Schuchardt wrote:

> We cannot run unit tests in SPL. So remove the unit test support.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index dade68faf7..db5ab55ed3 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -1,6 +1,6 @@ 
 #include <common.h>

-#if defined(CONFIG_UNIT_TEST)
+#if CONFIG_IS_ENABLED(UNIT_TEST)
 #define DEBUG
 #endif