In preparation for the klibc 2.0.5 release I wrote a basic test script
which:
1. Builds for each architecture (with a cross-compiler where needed)
2. Runs several statically-linked programs (using qemu-user where
needed):
a. Many self-test programs
b. "sh -c exit"
c. "sh -c '.../bin/true; exit'"
The results for the architectures I was able to test are:
2.0.4 2.0.5
--------------------------------------------------------------------
alpha/alpha-linux-gnu: fail: fcntl, sigint, 2c fail: sigint, 2c
arm/arm-linux-gnueabi: pass pass
arm/arm-linux-gnueabihf: pass pass
arm64/aarch64-linux-gnu: fail: fcntl pass
i386/i686-linux-gnu: fail: build pass
m68k/m68k-linux-gnu: pass pass
mips/mips-linux-gnu: fail: build pass
mips/mipsel-linux-gnu: fail: build pass
mips64/mips64el-linux-gnuabi64: fail: build pass
parisc/hppa-linux-gnu: fail: fcntl, vfork fail: fcntl, vfork
ppc/powerpc-linux-gnu: pass pass
ppc/powerpc-linux-gnuspe: fail: all tests fail: all tests
ppc64/powerpc64-linux-gnu: fail: fcntl pass
ppc64/powerpc64le-linux-gnu: fail: fcntl pass
riscv64/riscv64-linux-gnu: N/A pass
s390x/s390x-linux-gnu: fail: fcntl pass
sh/sh4-linux-gnu: pass pass
sparc64/sparc64-linux-gnu: fail: all tests fail: select, sigint,
2c
x86_64/x86_64-linux-gnu: fail: fcntl pass
So this doesn't indicate any regressions, but does show some serious
problems remaining.
I'm not able to test cris, ia64, s390 (32-bit), or sparc32 at all, so I
would appreciate any regression testing people can do on those, or
indeed more regression testing on the architectures listed above.
(As the test script currently only covers static builds, it wouldn't
have caught the x86 problems with shared libraries. qemu-user also
provides imperfect emulation of architecture-specific quirks of the
kernel, which could result in false positives or negatives. So I would
like to switch to building a kernel and an initramfs with a shared
build of klibc and then running them under qemu-system, but that will
take a lot more work.)
Ben.
--
Ben Hutchings
Hoare's Law of Large Problems:
Inside every large problem is a small problem struggling to get out.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL:
<http://www.zytor.com/pipermail/klibc/attachments/20190119/a92e730a/attachment.sig>
Hi Ben> 2.0.4 2.0.5 > -------------------------------------------------------------------- > alpha/alpha-linux-gnu: fail: fcntl, sigint, 2c fail: sigint, 2c > arm/arm-linux-gnueabi: pass pass > arm/arm-linux-gnueabihf: pass pass > arm64/aarch64-linux-gnu: fail: fcntl pass > i386/i686-linux-gnu: fail: build pass > m68k/m68k-linux-gnu: pass pass > mips/mips-linux-gnu: fail: build pass > mips/mipsel-linux-gnu: fail: build pass > mips64/mips64el-linux-gnuabi64: fail: build pass > parisc/hppa-linux-gnu: fail: fcntl, vfork fail: fcntl, vfork > ppc/powerpc-linux-gnu: pass pass > ppc/powerpc-linux-gnuspe: fail: all tests fail: all tests > ppc64/powerpc64-linux-gnu: fail: fcntl pass > ppc64/powerpc64le-linux-gnu: fail: fcntl pass > riscv64/riscv64-linux-gnu: N/A pass > s390x/s390x-linux-gnu: fail: fcntl pass > sh/sh4-linux-gnu: pass pass > sparc64/sparc64-linux-gnu: fail: all tests fail: select, sigint, 2c > x86_64/x86_64-linux-gnu: fail: fcntl pass > > So this doesn't indicate any regressions,It indicates significant progress with lot's of issues fixed. And great to see some fresh energy in the klibc project. Well done! Sam
I've now been able to test shared-library builds:
2.0.4 2.0.5
--------------------------------------------------------------------
alpha/alpha-linux-gnu: fail: fcntl, sigint, 2c fail: sigint, 2c
arm/arm-linux-gnueabi: pass pass
arm/arm-linux-gnueabihf: pass pass
arm64/aarch64-linux-gnu: fail: fcntl pass
i386/i686-linux-gnu: fail: build pass
m68k/m68k-linux-gnu: pass pass
mips/mips-linux-gnu: fail: build pass
mips/mipsel-linux-gnu: fail: build pass
mips64/mips64el-linux-gnuabi64: fail: build pass
parisc/hppa-linux-gnu: fail: fcntl, fail: fcntl,
malloctest2*, malloctest2*,
setjmptest*, vfork setjmptest*, vfork
ppc/powerpc-linux-gnu: pass fail: malloctest2*,
setjmptest*, sigint*
ppc/powerpc-linux-gnuspe: fail: all tests fail: all tests
ppc64/powerpc64-linux-gnu: fail: fcntl pass
ppc64/powerpc64le-linux-gnu: fail: fcntl pass
riscv64/riscv64-linux-gnu: N/A fail: malloctest2*
s390x/s390x-linux-gnu: fail: fcntl fail: malloctest2*,
sigint*
sh/sh4-linux-gnu: fail: malloctest2* fail: malloctest2*
sparc64/sparc64-linux-gnu: fail: all tests fail: malloctest2*,
select, sigint, 2c
x86_64/x86_64-linux-gnu: fail: all tests* pass
Tests that passed with a static library and failed with a shared
library are marked with an asterisk. (There were no cases of the
converse.)
Unfortunately this shows that there were some regressions for powerpc
(32-bit) and s390x, which I will need to investigate.
Ben.
--
Ben Hutchings
You can't have everything. Where would you put it?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL:
<http://www.zytor.com/pipermail/klibc/attachments/20190120/30b4434b/attachment.sig>
On Sun, 2019-01-20 at 04:37 +0000, Ben Hutchings wrote: [...]> ppc/powerpc-linux-gnu: pass fail: malloctest2*, > setjmptest*, sigint*[...]> s390x/s390x-linux-gnu: fail: fcntl fail: malloctest2*, setjmptest* setjmptest*, > sigint*[...]> Unfortunately this shows that there were some regressions for powerpc > (32-bit) and s390x, which I will need to investigate.I think this is a bug in QEMU's ELF loader - it doesn't properly handle a pure BSS segment (one with file size of 0). The difference between 2.0.4 and 2.0.5 is that I explicitly disabled PIE which removed some unused dynamic linking machinery. These specific test programs now have BSS but no writable static data. And I spotted another test program that has this property (setjmptest on s390x), which also had it when built for 2.0.4. It also failed in both versions, but I failed to record this in the table above. Ben. -- Ben Hutchings You can't have everything. Where would you put it? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: <http://www.zytor.com/pipermail/klibc/attachments/20190120/8c2fb0e7/attachment-0001.sig>
On Sat, 2019-01-19 at 02:15 +0000, Ben Hutchings wrote: [...]> 2.0.4 2.0.5 > --------------------------------------------------------------------[...]> ppc/powerpc-linux-gnuspe: fail: all tests fail: all tests[...] It turns out that it's necessary to set QEMU_CPU to make qemu-user-ppc emulate this sub-architecture. With that set, only sigint and 2c fail (for both static and shared builds). Ben. -- Ben Hutchings Klipstein's 4th Law of Prototyping and Production: A fail-safe circuit will destroy others. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: <http://www.zytor.com/pipermail/klibc/attachments/20190121/7d906f34/attachment.sig>