Hi Luke, (BTW. Note that HTML emails will get dropped, you should get a bounce from the mailinglist.)
On Tue, 2019-01-29 at 19:46 +0000, Luke Diamand wrote: > Thanks for the comments on the other emails, I'll rework my patch to > incorporate them. > > I've got a small test case I've been using which uses a prebuilt ARM > and MIPS(!) libc.so (from buildroot) and a core file. But I think in > theory it ought to be possible to fake something up with a purely > source code based test. Perhaps create a shared library which dumps > core, and play around with the rpath? > > Is there an existing test case you would suggest that I start from? > > I'll have a look. To test cross arch things it is sometimes just necessary to include precompiled binaries in the test files (hopefully as small as possible of course). For example the tests/run-backtrace-core-<arch>.sh tests include such pregenerated binaries: # executable generated by: # # gcc -D_GNU_SOURCE -I. -I.. -I../lib -m32 -pthread -static -g \ # -o backtrace.ppc.exec backtrace-child.c # # core generated by: # # ./backtrace.ppc.exec --gencore tests/backtrace-subr.sh has some overly complicated code to generate a core file for the run-backtrace-native-core.sh testcase. For none-core, running native tests you could look at tests/run-native-test.sh All these are slightly fragile though. Cheers, Mark