* [U-Boot] [PATCH] test: hexdump: fix misplaced return
@ 2018-12-04 20:30 Simon Goldschmidt
2018-12-05 12:55 ` Simon Glass
2018-12-13 0:47 ` [U-Boot] " Tom Rini
0 siblings, 2 replies; 5+ messages in thread
From: Simon Goldschmidt @ 2018-12-04 20:30 UTC (permalink / raw)
To: u-boot
One of the hexdump tests in test/lib/hexdump.c returns right at the
start of the function without testing anything.
Fix this by moving the 'return 0;' statement to the end of the function.
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
---
test/lib/hexdump.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/lib/hexdump.c b/test/lib/hexdump.c
index e8b3e566e0..567b57686a 100644
--- a/test/lib/hexdump.c
+++ b/test/lib/hexdump.c
@@ -11,8 +11,6 @@
static int lib_test_hex_to_bin(struct unit_test_state *uts)
{
- return 0;
-
ut_asserteq(0x0, hex_to_bin('0'));
ut_asserteq(0x1, hex_to_bin('1'));
ut_asserteq(0x2, hex_to_bin('2'));
@@ -30,6 +28,8 @@ static int lib_test_hex_to_bin(struct unit_test_state *uts)
ut_asserteq(0xe, hex_to_bin('e'));
ut_asserteq(0xf, hex_to_bin('f'));
ut_asserteq(-1, hex_to_bin('g'));
+
+ return 0;
}
DM_TEST(lib_test_hex_to_bin, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] test: hexdump: fix misplaced return
2018-12-04 20:30 [U-Boot] [PATCH] test: hexdump: fix misplaced return Simon Goldschmidt
@ 2018-12-05 12:55 ` Simon Glass
2018-12-09 20:53 ` Simon Goldschmidt
2018-12-13 0:47 ` [U-Boot] " Tom Rini
1 sibling, 1 reply; 5+ messages in thread
From: Simon Glass @ 2018-12-05 12:55 UTC (permalink / raw)
To: u-boot
On Tue, 4 Dec 2018 at 13:30, Simon Goldschmidt
<simon.k.r.goldschmidt@gmail.com> wrote:
>
> One of the hexdump tests in test/lib/hexdump.c returns right at the
> start of the function without testing anything.
>
> Fix this by moving the 'return 0;' statement to the end of the function.
>
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> ---
>
> test/lib/hexdump.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
That's one way to make a test pass.
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] test: hexdump: fix misplaced return
2018-12-05 12:55 ` Simon Glass
@ 2018-12-09 20:53 ` Simon Goldschmidt
2018-12-11 1:07 ` Simon Glass
0 siblings, 1 reply; 5+ messages in thread
From: Simon Goldschmidt @ 2018-12-09 20:53 UTC (permalink / raw)
To: u-boot
Am 05.12.2018 um 13:55 schrieb Simon Glass:
> On Tue, 4 Dec 2018 at 13:30, Simon Goldschmidt
> <simon.k.r.goldschmidt@gmail.com> wrote:
>>
>> One of the hexdump tests in test/lib/hexdump.c returns right at the
>> start of the function without testing anything.
>>
>> Fix this by moving the 'return 0;' statement to the end of the function.
>>
>> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
>> ---
>>
>> test/lib/hexdump.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> That's one way to make a test pass.
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Is there a plan to make all tests under test/ run with 'make check'?
Seems like this one is not included there?
Simon
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] test: hexdump: fix misplaced return
2018-12-09 20:53 ` Simon Goldschmidt
@ 2018-12-11 1:07 ` Simon Glass
0 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2018-12-11 1:07 UTC (permalink / raw)
To: u-boot
On Sun, 9 Dec 2018 at 13:53, Simon Goldschmidt
<simon.k.r.goldschmidt@gmail.com> wrote:
>
> Am 05.12.2018 um 13:55 schrieb Simon Glass:
> > On Tue, 4 Dec 2018 at 13:30, Simon Goldschmidt
> > <simon.k.r.goldschmidt@gmail.com> wrote:
> >>
> >> One of the hexdump tests in test/lib/hexdump.c returns right at the
> >> start of the function without testing anything.
> >>
> >> Fix this by moving the 'return 0;' statement to the end of the function.
> >>
> >> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> >> ---
> >>
> >> test/lib/hexdump.c | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > That's one way to make a test pass.
> >
> > Reviewed-by: Simon Glass <sjg@chromium.org>
>
> Is there a plan to make all tests under test/ run with 'make check'?
> Seems like this one is not included there?
Yes I agree, it needs to be added.
- Simon
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] test: hexdump: fix misplaced return
2018-12-04 20:30 [U-Boot] [PATCH] test: hexdump: fix misplaced return Simon Goldschmidt
2018-12-05 12:55 ` Simon Glass
@ 2018-12-13 0:47 ` Tom Rini
1 sibling, 0 replies; 5+ messages in thread
From: Tom Rini @ 2018-12-13 0:47 UTC (permalink / raw)
To: u-boot
On Tue, Dec 04, 2018 at 09:30:08PM +0100, Simon Goldschmidt wrote:
> One of the hexdump tests in test/lib/hexdump.c returns right at the
> start of the function without testing anything.
>
> Fix this by moving the 'return 0;' statement to the end of the function.
>
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181212/1e69481e/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-12-13 0:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-04 20:30 [U-Boot] [PATCH] test: hexdump: fix misplaced return Simon Goldschmidt
2018-12-05 12:55 ` Simon Glass
2018-12-09 20:53 ` Simon Goldschmidt
2018-12-11 1:07 ` Simon Glass
2018-12-13 0:47 ` [U-Boot] " 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.