summaryrefslogtreecommitdiff
path: root/tests/hexloader-test.c
AgeCommit message (Collapse)Author
2019-01-22tests/hexloader-test: Don't pass -nographic to the QEMU under testPeter Maydell
The hexloader test invokes QEMU with the -nographic argument. This is unnecessary, because the qtest_initf() function will pass it -display none, which suffices to disable the graphical window. It also means that the QEMU process will make the stdin/stdout O_NONBLOCK. Since O_NONBLOCK is not per-file descriptor but per "file description", this non-blocking behaviour is then shared with any other process that's using the stdin/stdout of the 'make check' run, including make itself. This can result in make falling over with "make: write error: stdout" because it got an unexpected EINTR trying to write output messages to the terminal. This is particularly noticable if running 'make check' in a loop with while make check; do true; done (It does not affect single make check runs so much because the shell will remove the O_NONBLOCK status before it reads the terminal for interactive input.) Remove the unwanted -nographic argument. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-11-05tests: Move tests/hex-loader-check-data/ to tests/data/hex-loader/Peter Maydell
Currently tests/hex-loader-check-data contains data files used by the hexloader-test, and configure individually symlinks those data files into the build directory using a wildcard. Using a wildcard like this is a bad idea, because if a new data file is added, nothing causes configure to be rerun, and so no symlink is added for the new file. This can cause tests to spuriously fail when they can't find their data. Instead, it's better to symlink an entire directory of data files. We already have such a directory: tests/data. Move the data files from tests/hex-loader-check-data/ to tests/data/hex-loader/, and remove the unnecessary symlinking. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-08-16Add QTest testcase for the Intel HexadecimalSu Hang
'test.hex' file is a memory test pattern stored in Hexadecimal Object Format. It loads at 0x10000 in RAM and contains values from 0 through 255. The test case verifies that the expected memory test pattern was loaded. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Suggested-by: Steffen Gortz <qemu.ml@steffen-goertz.de> Suggested-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Su Hang <suhang16@mails.ucas.ac.cn> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> [PMM: changed qtest_startf() to qtest_initf() to work with current master after the refactoring in commit 88b988c895e3c2] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>