diff mbox

[U-Boot] malloc: Turn on DEBUG when enabling unit tests

Message ID 1495729446-6028-1-git-send-email-pantelis.antoniou@konsulko.com
State Accepted
Commit 4e33316f656bf9a893ad0e828cc9a0acbc0a9d30
Delegated to: Tom Rini
Headers show

Commit Message

Pantelis Antoniou May 25, 2017, 4:24 p.m. UTC
Unit tests require mallinfo which in turn requires DEBUG on
dlmalloc to be enabled.

The dependancy on CONFIG_SANDBOX is wrong.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
---
 common/dlmalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini May 25, 2017, 6 p.m. UTC | #1
On Thu, May 25, 2017 at 07:24:06PM +0300, Pantelis Antoniou wrote:

> Unit tests require mallinfo which in turn requires DEBUG on
> dlmalloc to be enabled.
> 
> The dependancy on CONFIG_SANDBOX is wrong.
> 
> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass June 1, 2017, 3:11 a.m. UTC | #2
On 25 May 2017 at 10:24, Pantelis Antoniou
<pantelis.antoniou@konsulko.com> wrote:
> Unit tests require mallinfo which in turn requires DEBUG on
> dlmalloc to be enabled.
>
> The dependancy on CONFIG_SANDBOX is wrong.
>
> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
> ---
>  common/dlmalloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini June 6, 2017, 12:22 a.m. UTC | #3
On Thu, May 25, 2017 at 07:24:06PM +0300, Pantelis Antoniou wrote:

> Unit tests require mallinfo which in turn requires DEBUG on
> dlmalloc to be enabled.
> 
> The dependancy on CONFIG_SANDBOX is wrong.
> 
> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

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

Patch

diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index adc680e..fc1e8b3 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -1,6 +1,6 @@ 
 #include <common.h>
 
-#ifdef CONFIG_SANDBOX
+#if defined(CONFIG_UNIT_TEST)
 #define DEBUG
 #endif