Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131204070650.GA24286@brightrain.aerifal.cx>
Date: Wed, 4 Dec 2013 02:06:50 -0500
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: Release test framework

On Wed, Dec 04, 2013 at 02:22:58PM +0800, 邓尧 wrote:
> On Wed, Dec 4, 2013 at 2:01 PM, Rich Felker <dalias@...ifal.cx> wrote:
> 
> > On Wed, Dec 04, 2013 at 01:51:42PM +0800, 邓尧 wrote:
> > > If busybox is used, the test framework itself would depend  on musl-libc,
> > > which means test test framework would depend on the test subject. In
> > > theory, it's a bad bad idea.
> > >
> > > 0.02$
> >
> > The busybox used need not even be linked with musl; it could be a
> > uclibc-linked binary from aboriginal, for example. The point was not
> > to use busybox as any major part of the test framework, just to have a
> > shell to run the script that would run all the tests from the
> > libc-test package inside qemu.
> >
> 
> Extracting test result isn't easy,

Netcat (busybox version) it to a port on the host system, or just send
it to the emulated serial tty and log the whole output of the qemu
session.

> and creating these initramfs and kernel
> images are time consuming.

Kernel images don't have to be created by the process (and shouldn't
be); they can be stolen from anywhere (e.g. Aboriginal).

> qemu-user may be a better choice, I'm not sure
> about the stability of qemu-user though. The following shows qemu-user
> could easily run a simple userspace program of a different architecture:

qemu-user fails the old libc-testsuite badly due to various signal and
thread issues that are almost impossible to get right with the design
of qemu-user. I'm not sure offhand how badly it fails the new
libc-test package tests; it's a bit of work to even configure the
framework process to run them under qemu-user. But if there are any
tests for thread cancellation, they should fail spectacularly under
qemu-user...

There are also some bad failures with SOCK_CLOEXEC and SOCK_NONBLOCK,
iirc, and the degree of failure varies with the qemu version.

> hoolala@...ntu:/tmp$ cat hello.c
> #include <stdio.h>
> 
> int main() {
>     printf("hello\n");
>     return 1;
> }
> hoolala@...ntu:/tmp$ arm-linux-gnueabi-gcc hello.c -static
> hoolala@...ntu:/tmp$ qemu-arm ./a.out
> hello
> hoolala@...ntu:/tmp$ echo $?
> 1

Yes, lots of simple programs work. But qemu-user has a long way to go
before it could be a viable test platform.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.