public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] uclinux support?
@ 2018-11-11 20:23 Christophe Lyon
  2018-11-12 11:01 ` Cyril Hrubis
  0 siblings, 1 reply; 7+ messages in thread
From: Christophe Lyon @ 2018-11-11 20:23 UTC (permalink / raw)
  To: ltp

Hello,

I wanted to try to run at least some of the LTP tests on a uclinux
system for arm (arm-uclinuxfdpiceabi), as I am in the process of
upstreaming the toolchain support for the FDPIC ABI for ARM.

I've tried this:
$ make autotools
$ configure CC=~XXX/bin/arm-none-uclinuxfdpiceabi-gcc
CXX=~XXX/bin/arm-none-uclinuxfdpiceabi-g++ --host
arm-none-uclinuxfdpiceabi
$ make all
XXX/lib/gcc/arm-none-uclinuxfdpiceabi/9.0.0/../../../../arm-none-uclinuxfdpiceabi/bin/ld:
../../lib/libltp.a(tst_test.o): in function `fork_testrun':
XXX/ltp/lib/tst_test.c:1104: undefined reference to `fork'
XXX/lib/gcc/arm-none-uclinuxfdpiceabi/9.0.0/../../../../arm-none-uclinuxfdpiceabi/bin/ld:
../../lib/libltp.a(tst_test.o): in function `safe_fork':
XXX/ltp/lib/tst_test.c:395: undefined reference to `fork'
XXX/lib/gcc/arm-none-uclinuxfdpiceabi/9.0.0/../../../../arm-none-uclinuxfdpiceabi/bin/ld:
../../lib/libltp.a(tst_res.o): in function `tst_fork':
XXX/ltp/lib/tst_res.c:421: undefined reference to `fork'

config.h has:
#define UCLINUX 1
/* #undef HAVE_FORK */
#define HAVE_VFORK 1

so it looks like confgure correctly detected the target system.

Am I missing something?

Thanks

Christophe

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

* [LTP] uclinux support?
  2018-11-11 20:23 [LTP] uclinux support? Christophe Lyon
@ 2018-11-12 11:01 ` Cyril Hrubis
  2018-11-12 13:47   ` Christophe Lyon
  0 siblings, 1 reply; 7+ messages in thread
From: Cyril Hrubis @ 2018-11-12 11:01 UTC (permalink / raw)
  To: ltp

Hi!
> I wanted to try to run at least some of the LTP tests on a uclinux
> system for arm (arm-uclinuxfdpiceabi), as I am in the process of
> upstreaming the toolchain support for the FDPIC ABI for ARM.
> 
> I've tried this:
> $ make autotools
> $ configure CC=~XXX/bin/arm-none-uclinuxfdpiceabi-gcc
> CXX=~XXX/bin/arm-none-uclinuxfdpiceabi-g++ --host
> arm-none-uclinuxfdpiceabi
> $ make all
> XXX/lib/gcc/arm-none-uclinuxfdpiceabi/9.0.0/../../../../arm-none-uclinuxfdpiceabi/bin/ld:
> ../../lib/libltp.a(tst_test.o): in function `fork_testrun':
> XXX/ltp/lib/tst_test.c:1104: undefined reference to `fork'
> XXX/lib/gcc/arm-none-uclinuxfdpiceabi/9.0.0/../../../../arm-none-uclinuxfdpiceabi/bin/ld:
> ../../lib/libltp.a(tst_test.o): in function `safe_fork':
> XXX/ltp/lib/tst_test.c:395: undefined reference to `fork'
> XXX/lib/gcc/arm-none-uclinuxfdpiceabi/9.0.0/../../../../arm-none-uclinuxfdpiceabi/bin/ld:
> ../../lib/libltp.a(tst_res.o): in function `tst_fork':
> XXX/ltp/lib/tst_res.c:421: undefined reference to `fork'
> 
> config.h has:
> #define UCLINUX 1
> /* #undef HAVE_FORK */
> #define HAVE_VFORK 1
> 
> so it looks like confgure correctly detected the target system.
> 
> Am I missing something?

uClinux support in LTP has been broken for years and nobody seemed to
really care. I even tried to ask if there is someone interesting in
running LTP on uClinux on the uClinux mailing list but it seems that
even the list is basically dead at this point. So for a last year or so
we are slowly getting rid of the uClinux specific bits from the codebase
in order to simplify the LTP maintenance. You are free to step up and
restore uClinux support in LTP if you have time for that but unless that
happens we will continue to stage it out.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] uclinux support?
  2018-11-12 11:01 ` Cyril Hrubis
@ 2018-11-12 13:47   ` Christophe Lyon
  2018-11-12 14:22     ` Cyril Hrubis
  0 siblings, 1 reply; 7+ messages in thread
From: Christophe Lyon @ 2018-11-12 13:47 UTC (permalink / raw)
  To: ltp

On Mon, 12 Nov 2018 at 12:03, Cyril Hrubis <chrubis@suse.cz> wrote:
>
> Hi!
> > I wanted to try to run at least some of the LTP tests on a uclinux
> > system for arm (arm-uclinuxfdpiceabi), as I am in the process of
> > upstreaming the toolchain support for the FDPIC ABI for ARM.
> >
> > I've tried this:
> > $ make autotools
> > $ configure CC=~XXX/bin/arm-none-uclinuxfdpiceabi-gcc
> > CXX=~XXX/bin/arm-none-uclinuxfdpiceabi-g++ --host
> > arm-none-uclinuxfdpiceabi
> > $ make all
> > XXX/lib/gcc/arm-none-uclinuxfdpiceabi/9.0.0/../../../../arm-none-uclinuxfdpiceabi/bin/ld:
> > ../../lib/libltp.a(tst_test.o): in function `fork_testrun':
> > XXX/ltp/lib/tst_test.c:1104: undefined reference to `fork'
> > XXX/lib/gcc/arm-none-uclinuxfdpiceabi/9.0.0/../../../../arm-none-uclinuxfdpiceabi/bin/ld:
> > ../../lib/libltp.a(tst_test.o): in function `safe_fork':
> > XXX/ltp/lib/tst_test.c:395: undefined reference to `fork'
> > XXX/lib/gcc/arm-none-uclinuxfdpiceabi/9.0.0/../../../../arm-none-uclinuxfdpiceabi/bin/ld:
> > ../../lib/libltp.a(tst_res.o): in function `tst_fork':
> > XXX/ltp/lib/tst_res.c:421: undefined reference to `fork'
> >
> > config.h has:
> > #define UCLINUX 1
> > /* #undef HAVE_FORK */
> > #define HAVE_VFORK 1
> >
> > so it looks like confgure correctly detected the target system.
> >
> > Am I missing something?
>
> uClinux support in LTP has been broken for years and nobody seemed to
> really care. I even tried to ask if there is someone interesting in
> running LTP on uClinux on the uClinux mailing list but it seems that
> even the list is basically dead at this point. So for a last year or so
> we are slowly getting rid of the uClinux specific bits from the codebase
> in order to simplify the LTP maintenance. You are free to step up and
> restore uClinux support in LTP if you have time for that but unless that
> happens we will continue to stage it out.
>

OK understood, I was right to ask :)

I'd like to roll back to a point where it was mostly working, any idea
when that would be?
I've looked at the history, and tried several commits that seemed to
remove uclinux support,
but I'm still facing similar errors (I'm now back to 2011....)

A point were a subset worked would be nice, I'd like to run tests
involving unwinding and
signals.

I'm not sure I'll have time to work on resurrecting uclinux support in
LTP though,
I didn't anticipate it was beeing removed.

Thanks

Christophe

> --
> Cyril Hrubis
> chrubis@suse.cz

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

* [LTP] uclinux support?
  2018-11-12 13:47   ` Christophe Lyon
@ 2018-11-12 14:22     ` Cyril Hrubis
  2018-11-13  8:56       ` Petr Vorel
  0 siblings, 1 reply; 7+ messages in thread
From: Cyril Hrubis @ 2018-11-12 14:22 UTC (permalink / raw)
  To: ltp

Hi!
> > uClinux support in LTP has been broken for years and nobody seemed to
> > really care. I even tried to ask if there is someone interesting in
> > running LTP on uClinux on the uClinux mailing list but it seems that
> > even the list is basically dead at this point. So for a last year or so
> > we are slowly getting rid of the uClinux specific bits from the codebase
> > in order to simplify the LTP maintenance. You are free to step up and
> > restore uClinux support in LTP if you have time for that but unless that
> > happens we will continue to stage it out.
> >
> 
> OK understood, I was right to ask :)
> 
> I'd like to roll back to a point where it was mostly working, any idea
> when that would be?
>
> I've looked at the history, and tried several commits that seemed to
> remove uclinux support,
> but I'm still facing similar errors (I'm now back to 2011....)

Actually I have no idea. But generally the further back you go the more
unstable the whole LTP gets. I'm pretty sure you will not be able to
even compile 10 years old LTP regardless the uClinux enabled or not.

Looking at the commit logs it looks like last time anything has been
fixed for uClinux was 2009.

> A point were a subset worked would be nice, I'd like to run tests
> involving unwinding and signals.

You may be better off taking an LTP from 2016 before we added the new
LTP test library which is about the time we started to remove uClinux
support, i.e. before commit:

commit bbdb9f78378c7e038f463efa39d2470e1c51ad54
Author: Cyril Hrubis <chrubis@suse.cz>
Date:   Wed Mar 16 15:53:57 2016 +0100

    lib: Add new test library API

And disable tests until it compiles.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] uclinux support?
  2018-11-12 14:22     ` Cyril Hrubis
@ 2018-11-13  8:56       ` Petr Vorel
  2018-11-13  9:25         ` Christophe Lyon
  0 siblings, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2018-11-13  8:56 UTC (permalink / raw)
  To: ltp

Hi,

> > > uClinux support in LTP has been broken for years and nobody seemed to
> > > really care. I even tried to ask if there is someone interesting in
> > > running LTP on uClinux on the uClinux mailing list but it seems that
> > > even the list is basically dead at this point. So for a last year or so
> > > we are slowly getting rid of the uClinux specific bits from the codebase
> > > in order to simplify the LTP maintenance. You are free to step up and
> > > restore uClinux support in LTP if you have time for that but unless that
> > > happens we will continue to stage it out.


> > OK understood, I was right to ask :)

> > I'd like to roll back to a point where it was mostly working, any idea
> > when that would be?

> > I've looked at the history, and tried several commits that seemed to
> > remove uclinux support,
> > but I'm still facing similar errors (I'm now back to 2011....)

> Actually I have no idea. But generally the further back you go the more
> unstable the whole LTP gets. I'm pretty sure you will not be able to
> even compile 10 years old LTP regardless the uClinux enabled or not.

> Looking at the commit logs it looks like last time anything has been
> fixed for uClinux was 2009.

> > A point were a subset worked would be nice, I'd like to run tests
> > involving unwinding and signals.

> You may be better off taking an LTP from 2016 before we added the new
> LTP test library which is about the time we started to remove uClinux
> support, i.e. before commit:

> commit bbdb9f78378c7e038f463efa39d2470e1c51ad54
> Author: Cyril Hrubis <chrubis@suse.cz>
> Date:   Wed Mar 16 15:53:57 2016 +0100

>     lib: Add new test library API

> And disable tests until it compiles.

FYI LTP compiles under uclibc-ng. Buildroot distribution (which uses glibc,
uclibc-ng and musl) disabled it just for musl [1]. It's tested with their
autobuild service [2] and currently no build reports are for latest release [3].
IMHO it shouldn't be difficult to support musl as well.

[1] https://git.busybox.net/buildroot/tree/package/ltp-testsuite/Config.in
[2] https://buildroot.org/downloads/manual/manual.html#_analyzing_and_fixing_autobuild_failures
[3] http://autobuild.buildroot.net/stats/

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

* [LTP] uclinux support?
  2018-11-13  8:56       ` Petr Vorel
@ 2018-11-13  9:25         ` Christophe Lyon
  2018-11-13 14:02           ` Petr Vorel
  0 siblings, 1 reply; 7+ messages in thread
From: Christophe Lyon @ 2018-11-13  9:25 UTC (permalink / raw)
  To: ltp

On Tue, 13 Nov 2018 at 09:56, Petr Vorel <pvorel@suse.cz> wrote:
>
> Hi,
>
> > > > uClinux support in LTP has been broken for years and nobody seemed to
> > > > really care. I even tried to ask if there is someone interesting in
> > > > running LTP on uClinux on the uClinux mailing list but it seems that
> > > > even the list is basically dead at this point. So for a last year or so
> > > > we are slowly getting rid of the uClinux specific bits from the codebase
> > > > in order to simplify the LTP maintenance. You are free to step up and
> > > > restore uClinux support in LTP if you have time for that but unless that
> > > > happens we will continue to stage it out.
>
>
> > > OK understood, I was right to ask :)
>
> > > I'd like to roll back to a point where it was mostly working, any idea
> > > when that would be?
>
> > > I've looked at the history, and tried several commits that seemed to
> > > remove uclinux support,
> > > but I'm still facing similar errors (I'm now back to 2011....)
>
> > Actually I have no idea. But generally the further back you go the more
> > unstable the whole LTP gets. I'm pretty sure you will not be able to
> > even compile 10 years old LTP regardless the uClinux enabled or not.
>
> > Looking at the commit logs it looks like last time anything has been
> > fixed for uClinux was 2009.
>
> > > A point were a subset worked would be nice, I'd like to run tests
> > > involving unwinding and signals.
>
> > You may be better off taking an LTP from 2016 before we added the new
> > LTP test library which is about the time we started to remove uClinux
> > support, i.e. before commit:
>
> > commit bbdb9f78378c7e038f463efa39d2470e1c51ad54
> > Author: Cyril Hrubis <chrubis@suse.cz>
> > Date:   Wed Mar 16 15:53:57 2016 +0100
>
> >     lib: Add new test library API
>
> > And disable tests until it compiles.
>
> FYI LTP compiles under uclibc-ng. Buildroot distribution (which uses glibc,
> uclibc-ng and musl) disabled it just for musl [1]. It's tested with their
> autobuild service [2] and currently no build reports are for latest release [3].
> IMHO it shouldn't be difficult to support musl as well.
>
> [1] https://git.busybox.net/buildroot/tree/package/ltp-testsuite/Config.in

IIUC, it depends on BR2_USE_MMU, which probably means that it
runs only on targets with an MMU, which is not my case.
And the "#fork()" comment seems to indicate that otherwise
LTP fails to build for lack of fork(), which is precisely what I'm seeing.

Using a brutal -Dfork=vfork helped me go much further,
and I was actually able to run some of the tests involving pthreads and signals.

> [2] https://buildroot.org/downloads/manual/manual.html#_analyzing_and_fixing_autobuild_failures
> [3] http://autobuild.buildroot.net/stats/

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

* [LTP] uclinux support?
  2018-11-13  9:25         ` Christophe Lyon
@ 2018-11-13 14:02           ` Petr Vorel
  0 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2018-11-13 14:02 UTC (permalink / raw)
  To: ltp

Hi,

> > FYI LTP compiles under uclibc-ng. Buildroot distribution (which uses glibc,
> > uclibc-ng and musl) disabled it just for musl [1]. It's tested with their
> > autobuild service [2] and currently no build reports are for latest release [3].
> > IMHO it shouldn't be difficult to support musl as well.

> > [1] https://git.busybox.net/buildroot/tree/package/ltp-testsuite/Config.in

> IIUC, it depends on BR2_USE_MMU, which probably means that it
> runs only on targets with an MMU,
Yep.
> which is not my case.
OK, I didn't consider non-MMU system.

> And the "#fork()" comment seems to indicate that otherwise
> LTP fails to build for lack of fork(), which is precisely what I'm seeing.

> Using a brutal -Dfork=vfork helped me go much further,
> and I was actually able to run some of the tests involving pthreads and signals.
I see some vfork support for uclibc in legacy C API (include/old/test.h),
but no support in new C API (as Cyril mentioned).

Good luck.

Kind regards,
Petr

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

end of thread, other threads:[~2018-11-13 14:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-11 20:23 [LTP] uclinux support? Christophe Lyon
2018-11-12 11:01 ` Cyril Hrubis
2018-11-12 13:47   ` Christophe Lyon
2018-11-12 14:22     ` Cyril Hrubis
2018-11-13  8:56       ` Petr Vorel
2018-11-13  9:25         ` Christophe Lyon
2018-11-13 14:02           ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox