All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libfdt: Use libfdt shared library for testcases
@ 2009-01-02 13:21 Josh Boyer
       [not found] ` <20090102132113.GC8954-jnIq6iUNB1CO8iYQgJmm/0EOCMrvLtNR@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Josh Boyer @ 2009-01-02 13:21 UTC (permalink / raw)
  To: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A

Link the testcases against the libfdt.so that is built and use
it for the testsuite verification.

Signed-off-by: Josh Boyer <jwboyer-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
 tests/Makefile.tests |    9 +++++++--
 tests/tests.sh       |    1 +
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile.tests b/tests/Makefile.tests
index 3a041ff..0b0ff70 100644
--- a/tests/Makefile.tests
+++ b/tests/Makefile.tests
@@ -35,9 +35,11 @@ TESTS_CLEANFILES = $(TESTS) $(TESTS_CLEANFILES_L:%=$(TESTS_PREFIX)%)
 .PHONY: tests
 tests:	$(TESTS) $(TESTS_TREES)
 
-$(LIB_TESTS): %: $(TESTS_PREFIX)testutils.o $(LIBFDT_archive)
+$(LIB_TESTS): LDFLAGS = -L$(LIBFDT_objdir) -lfdt
+$(LIB_TESTS): $(TESTS_PREFIX)testutils.o $(LIBFDT_lib)
 
-$(LIBTREE_TESTS): %: $(TESTS_PREFIX)testutils.o $(TESTS_PREFIX)trees.o $(LIBFDT_archive)
+$(LIBTREE_TESTS): LDFLAGS = -L$(LIBFDT_objdir) -lfdt
+$(LIBTREE_TESTS): %: $(TESTS_PREFIX)testutils.o $(TESTS_PREFIX)trees.o $(LIBFDT_lib)
 
 $(TESTS_PREFIX)dumptrees: $(TESTS_PREFIX)trees.o
 
@@ -45,6 +47,9 @@ $(TESTS_TREES): $(TESTS_PREFIX)dumptrees
 	@$(VECHO) DUMPTREES
 	cd $(TESTS_PREFIX); ./dumptrees >/dev/null
 
+$(TESTS_PREFIX)testutils.o: $(TESTS_PREFIX)testutils.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -L$(LIBFDT_objdir) -lfdt -o $@ -c $<
+
 tests_clean:
 	@$(VECHO) CLEAN "(tests)"
 	rm -f $(STD_CLEANFILES:%=$(TESTS_PREFIX)%)
diff --git a/tests/tests.sh b/tests/tests.sh
index 30ffead..6eb972b 100644
--- a/tests/tests.sh
+++ b/tests/tests.sh
@@ -11,6 +11,7 @@ FAIL () {
 }
 
 DTC=../dtc
+LD_LIBRARY_PATH=../libfdt
 
 verbose_run () {
     if [ -z "$QUIET_TEST" ]; then
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] libfdt: Use libfdt shared library for testcases
       [not found] ` <20090102132113.GC8954-jnIq6iUNB1CO8iYQgJmm/0EOCMrvLtNR@public.gmane.org>
@ 2009-01-02 15:41   ` Jon Loeliger
       [not found]     ` <E1LIm90-00048J-HK-CYoMK+44s/E@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Loeliger @ 2009-01-02 15:41 UTC (permalink / raw)
  To: Josh Boyer; +Cc: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A

> Link the testcases against the libfdt.so that is built and use
> it for the testsuite verification.
> 
> Signed-off-by: Josh Boyer <jwboyer-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>

Not applied.  Something is wrong here, not quite sure what.

First, after I apply this patch, when I do:

    $ make clean
    $ make check

I get this:

     DEP flattree.c
     DEP dtc.c
     DEP data.c
     DEP checks.c
    CHK version_gen.h
    UPD version_gen.h
     CC tests/get_mem_rsv.o
    cc: -lfdt: linker input file unused because linking not done
     CC libfdt/fdt.o
     CC libfdt/fdt_ro.o
     CC libfdt/fdt_wip.o
     CC libfdt/fdt_sw.o
     CC libfdt/fdt_rw.o
     CC libfdt/fdt_strerror.o
     LD libfdt/libfdt.so
    /usr/bin/ld: cannot find -lfdt
    collect2: ld returned 1 exit status
    make: *** [libfdt/libfdt.so] Error 1

Doing just:

    $ make
    $ make check

seems to clear it up and it finishes building.
So that is promising.

However, the "make check" yields funny results:

    $ make check

    ********** TEST SUMMARY
    *     Total testcases:1197
    *                PASS:88
    *                FAIL:0
    *   Bad configuration:0
    * Strange test result:1109
    **********

Not sure there at all..

jdl

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] libfdt: Use libfdt shared library for testcases
       [not found]     ` <E1LIm90-00048J-HK-CYoMK+44s/E@public.gmane.org>
@ 2009-01-02 17:07       ` Josh Boyer
  0 siblings, 0 replies; 3+ messages in thread
From: Josh Boyer @ 2009-01-02 17:07 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A

On Fri, Jan 02, 2009 at 09:41:02AM -0600, Jon Loeliger wrote:
>> Link the testcases against the libfdt.so that is built and use
>> it for the testsuite verification.
>> 
>> Signed-off-by: Josh Boyer <jwboyer-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
>
>Not applied.  Something is wrong here, not quite sure what.
>
>First, after I apply this patch, when I do:
>
>    $ make clean
>    $ make check
>
>I get this:
>
>     DEP flattree.c
>     DEP dtc.c
>     DEP data.c
>     DEP checks.c
>    CHK version_gen.h
>    UPD version_gen.h
>     CC tests/get_mem_rsv.o
>    cc: -lfdt: linker input file unused because linking not done
>     CC libfdt/fdt.o
>     CC libfdt/fdt_ro.o
>     CC libfdt/fdt_wip.o
>     CC libfdt/fdt_sw.o
>     CC libfdt/fdt_rw.o
>     CC libfdt/fdt_strerror.o
>     LD libfdt/libfdt.so
>    /usr/bin/ld: cannot find -lfdt
>    collect2: ld returned 1 exit status
>    make: *** [libfdt/libfdt.so] Error 1

Argh.  Yeah, that's annoying.  I hate makefile dependency crap.

>Doing just:
>
>    $ make
>    $ make check
>
>seems to clear it up and it finishes building.
>So that is promising.

Sort of :)

>However, the "make check" yields funny results:
>
>    $ make check
>
>    ********** TEST SUMMARY
>    *     Total testcases:1197
>    *                PASS:88
>    *                FAIL:0
>    *   Bad configuration:0
>    * Strange test result:1109
>    **********
>
>Not sure there at all..

Was that the first version of 'make clean; make check', or
the second version of 'make; make check'?

I ran the tests with 'make; make check' and they all passed
so I'll assume the first.  I think you get odd results
because the testcases aren't actually runnable.  The
cases where it passes are probably expecting error and/or
don't use libfdt (there are a few like that).

Anyway, I have a few things I need to do today and this
weekend so I'll try to fix up this patch as soon as I can.

josh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-02 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-02 13:21 [PATCH] libfdt: Use libfdt shared library for testcases Josh Boyer
     [not found] ` <20090102132113.GC8954-jnIq6iUNB1CO8iYQgJmm/0EOCMrvLtNR@public.gmane.org>
2009-01-02 15:41   ` Jon Loeliger
     [not found]     ` <E1LIm90-00048J-HK-CYoMK+44s/E@public.gmane.org>
2009-01-02 17:07       ` Josh Boyer

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.