News for hackers. Stuff that matters.
Re:Exagear: Run x86 Applications on Raspberry Pi by exikyut on Wednesday August 16, 2017 @08:18PM (#15032578)
I don't quite have the domain knowledge required to tie weird/confusing app breakages back to specific QEMU issues, but I'm curious what "testing" actually means. For example, using american fuzzy lop to run apps inside qemu-user-??? could be one way to generate a steady stream of noise/data.

Using AFL like this sounds like it could be fun to experiment/play with, although I don't know if it has the necessary comprehension to handle "emulation or host program running guest program" semantics at the moment, where two programs (the emulator and the guest program) both need to be tracked for best results.

These ideas don't exactly find any time to fix bugs, however...

Re:Exagear: Run x86 Applications on Raspberry Pi by pm215 on Thursday August 17, 2017 @05:27AM (#15035077)
No, I mean "try big complicated programs, see whether they fail or not, narrow down what's going wrong". What we need to do is get the expected cases to work. AFL is good for checking that weird corner cases don't blow up, but we don't care so much about those for user-mode, because by definition we allow the guest app to call any syscalls it likes -- you don't need to overrun a buffer to run arbitrary code because you're already running arbitrary code. (Also, there are a number of things that are technically permitted and supported by a native Linux kernel but which QEMU's user-mode emulation doesn't support, but which don't matter because real-world programs don't use those corner cases. AFL can't tell the difference between "bug that doesn't matter" and "bug that real code will hit".)
Re:Exagear: Run x86 Applications on Raspberry Pi by exikyut on Friday August 18, 2017 @12:34AM (#15043589)
Ohhhh, I see. Woops.

Thanks for explaining that. I was actually aiming to describe code coverage in my previous comment, but completely overshot that and went to fuzzing instead, lol.

I just found https://coverage.nodejs.org/, which you're probably already aware of. Apparently it uses istanbul for JS coverage and gcov for V8.

Also, https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#s... says that `make test` runs tests, presumably from https://github.com/nodejs/node/tree/master/test. Thinking about it, if Node.js' tests pass running under QEMU usermode, that should be good evidence that QEMU usermode is working too, right?

Looking further afield, I wonder if running tests from other large projects - Qt comes to mind, although you could also be utterly insane and try GCC/LLVM xD - could be used to exercise QEMU.

As an aside, I'm very curious to learn what QEMU's corner cases are, if just so that if I want to do horrible things in ELF files one day I know what won't work. :P