Aleksandar Markovic <[email protected]> writes:
> Hello, folks. > > We are introducing a new MIPS platform - called nanoMIPS - to the QEMU. > > Besides providing new functionality, we would like to integrate into QEMU > some basic testing capabilities for that new platform. Something like this: > > Enable user to specify cross compiler and, using QEMU Linux user mode: > a. execute several tests that are just almost minimal tests of > emulation of selected instructions. > b. execute several tests that are just almost minimal tests of > translation of selected system calls. > > In other words, this would enable a user to run "smoke tests" for nanoMIPS > platform, and perhaps to use these tests as a starting point for some other > tests. > > My question is: > > 1. Is this a good idea at all? Totally. The test/tcg section languished for awhile as most people don't have cross compilers set up. Thanks to docker we can now have a fall-back to known good cross-compilers while still supporting local setups with --cross-cc-ARCH and --cross-cc-flags-ARCH. > 2. If yes, what would be the best way to integrate these tests into > current QEMU test organization? So currently tests/tcg is setup for linux-user testing. It will run everything in tests/tcg/multiarch and any additional user-mode tests in tests/tcg/ARCH as governed by the Makefile.include. For the existing MIPS it is basically multiarch however there are sub-directories that are system tests that need to be re-integrated. We have cross compilers for a bunch of the existing MIPS platforms in the form of: debian-mips-cross.docker debian-mips64-cross.docker debian-mipsel-cross.docker debian-mipsn32-cross.docker debian-mips64el-cross.docker If you would like to help resurrect the system emulation testing for the existing MIPS tests I would welcome the help. I think all the infrastructure for compilers is already there so it should just be a case of tweaking the Makefile structure a little. > I appreciate any opinion of yours. So the first question that needs to be answered is where can you get nanoMIPS compilers? For some of the more esoteric architectures QEMU supports we ended up using Debian's rolling Sid distribution as it still contains cross compilers for unofficial architectures that are in ports. If there is any push for getting a nanoMIPS Debian release that might be the quickest way. Otherwise you would need to write a dockerfile to install the toolchain on some reasonable base system - see for example debian-tricore-cross.docker which basically builds Bastien's fork of binutils. You don't have to build the toolchain from scratch - however it would nice to have a clear idea from of where the source for the toolchain comes from. At least with Debian images we know any binary is only an apt-get source away from it's code. If you have any more questions please ask away and also CC me on any patches (MAINTAINERS should take care of this). -- Alex Bennée
