summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* test: Update qemu arguments to use bmc simulatorJoel Stanley2018-12-133-3/+6
| | | | | | | | | | | | | | | | | | | | | | THe qemu skiboot platform as of 8340a9642bba ("plat/qemu: use the common OpenPOWER routines to initialize") uses the common aspeed BMC setup routines. This means a BT interface is always set up, and if the corresponding Qemu model is not present the timeout is 30 seconds. It looks like this every time an IPMI message is sent: BT: seq 0x9e netfn 0x06 cmd 0x31: Maximum queue length exceeded BT: seq 0x9d netfn 0x06 cmd 0x31: Removed from queue BT: seq 0x9f netfn 0x06 cmd 0x31: Maximum queue length exceeded BT: seq 0x9e netfn 0x06 cmd 0x31: Removed from queue BT: seq 0xa0 netfn 0x06 cmd 0x31: Maximum queue length exceeded BT: seq 0x9f netfn 0x06 cmd 0x31: Removed from queue Avoid this by adding the bmc simulator model to the Qemu powernv machine. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* Use $() rather than backticks in all shellStewart Smith2018-09-139-31/+31
| | | | | | | | | | | The cool kids are all using $() these days as backticks are all backwards and uncool. Practically speaking, it makes it easier to escape things, nest things, and all the other reasons listed on http://mywiki.wooledge.org/BashFAQ/082 Signed-off-by: Stewart Smith <stewart@linux.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test/qemu: start building qemu again, and use our built qemu for testsStewart Smith2018-06-273-15/+15
| | | | | | | We need to use QEMU_BIN rather than QEMU as the makefiles define QEMU already. Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* test/qemu: skip qemu test if 'old' qemu without PCRStewart Smith2018-05-292-0/+14
| | | | | | | | 3d019581c98153 introduced clearing PCR on reinit cpus, and until (the near future from now) qemu didn't support this register. Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* test: Simplify build process for hello and sreset testsJoel Stanley2018-05-094-76/+24
| | | | | | | | | | | | | | | | | | | | | | | Link with ld instead of gcc so we can build with clang as cc. Remove the linker script and unnecessary flags. The application links just fine without them. Add cflags required by clang in order to build for the correct target. Remove the dependency file generation. The assembly files don't include any headers, so they weren't doing anything. Simplify clean rule, as the $(RM) alias does -f for us, and we no longer have .d files. Build tested on ppc64le and amd64. Booted in Qemu on both using: qemu-system-ppc64 -M powernv -nodefaults -nographic -serial stdio \ -kernel test/hello_world/hello_kernel/hello_kernel Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* qemu-debian-test: Remove unusable hda optionJoel Stanley2018-05-091-4/+3
| | | | | | | | | | | | | | | | When running this: qemu-system-ppc64 -m 2G -M powernv -kernel debian-jessie-vmlinux \ -initrd debian-jessie-initrd.gz -nographic \ -device ipmi-bmc-sim,id=ipmi0 -device isa-ipmi-bt,bmc=ipmi0 \ -hda /tmp/debian-jessie-install.qcow2.kDubGYDrqa We die with this error: qemu-system-ppc64: -hda /tmp/debian-jessie-install.qcow2.kDubGYDrqa: machine type does not support if=ide,bus=0,unit=0 Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* test: qemu-debian-jessie boot: fix qemu-imgStewart Smith2018-05-061-1/+1
| | | | | | | We can just use whatever qemu-img binary that's laying around, including the distro one. Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* sreset_world: re-enable the non-stb buildJoel Stanley2018-05-041-1/+1
| | | | | | | | | | This breaks the test when you don't have the SKIBOOT_ENABLE_MAMBO_STB flag set, as the binary is removed as an intermediate artefact (I suspect) when building the sreset_world.stb binary. Fixes: 1ddf7e51936f ("Mambo: run hello_world and sreset_world tests with Secure and Trusted Boot") Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* tests: Specfiy Qemu with a single environment variableJoel Stanley2018-05-023-27/+15
| | | | | | | | | | | | This allows Qemu to work out of the box if the user has an appropriate Qemu installed. Support for running TCG power guests has come a long way from when we first added these test scripts. It makes sense to use the system Qemu where possible, as for most people this will succeed. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* Mambo: run hello_world and sreset_world tests with Secure and Trusted BootStewart Smith2017-12-206-8/+59
| | | | | | | | | We *disable* the secure boot part, but we keep the verified boot part as we don't currently have container verification code for Mambo. We can run a small part of the code currently though. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* sreset_kernel: only run SMT tests due to not supporting re-entryStewart Smith2017-12-042-9/+2
| | | | | Fixes: 0d84ea6bda03a00a1765dd7240a9e5231a537e96 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test kernels: link with -NStewart Smith2017-08-242-2/+2
| | | | | | | "Not enough room for program headers, try linking with -N" Turns out the error message is helpful Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test/qemu-jessie: bail out fast on kernel panicStewart Smith2017-07-121-0/+1
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test/qemu-jessie: dump boot log on failureStewart Smith2017-07-121-0/+1
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test/hello_world: Properly report P9MAMBO pathMichael Ellerman2017-06-191-1/+1
| | | | | | | | | | | | | | | | In the P9 hello script we look for $P9MAMBO_BINARY, but then if we don't find it we print a message using $MAMBO_BINARY, which is confusing: $ set -x P9MAMBO_BINARY run/p9/run_cmdline $ ./test/hello_world/run_mambo_p9_hello_world.sh Could not find executable P9MAMBO_BINARY (/opt/ibm/systemsim-p9//). Fix it so the right thing is printed: Could not find executable P9MAMBO_BINARY (/opt/ibm/systemsim-p9//run/p9/run_cmdline). Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Mambo/Qemu boot tests: expect (and fail) on checkstopStewart Smith2017-03-318-0/+12
| | | | | | This allows us to fail a lot faster if we checkstop Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test/sreset_world: Kind of like Hello World, but from the SRESET vector.Stewart Smith2017-03-076-0/+327
| | | | | | A regression test for the mambo implementation of OPAL_SIGNAL_SYSTEM_RESET. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test/hello_world: use P9MAMBO_ to differentiate from P8Stewart Smith2017-02-221-8/+7
| | | | | | | | Helps if you're building mambo from source (or haven't used the packages in exactly the way they install) to ensure you run both the p8 and p9 mambo simulators for testing. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata_to_dt: Only output dtbStewart Smith2017-02-161-1/+3
| | | | | | | | | | | convert test cases to diff DTS rather than DTB. This means we also have to build dtc on CentOS 7 to be able to run the test suite. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> [oohall@gmail.com moved the test cases into seperate patches] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hello_world: print out full path of missing MAMBO_BINARYStewart Smith2016-12-222-2/+2
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hello_world: run p9 mambo testsStewart Smith2016-12-222-0/+70
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test/qemu: bump qemu version used in CI, adds IPMI supportStewart Smith2016-08-262-2/+2
| | | | | | Now based on Cédric's branch. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test/hello_world: always use shutdown type zeroOliver O'Halloran2016-07-221-0/+1
| | | | | | | | | | | The hello world kernel fails to correctly set r3 before making the shutdown opal call. On FSP machines only shutdown types 0 and 1 are recognised as valid shutdown types. If any other type is specified (in r3) the call is rejected with an OPAL_PARAMETER error and the machine will continue running. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Use mktemp rather than the deprecated tempfileStewart Smith2016-07-183-3/+3
| | | | | Fixes: 2ceb8b8c0ac53a9014e83d12e1c758d5f9e07fe6 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* make check: Use mktemp instead of tempfileVasant Hegde2016-07-181-1/+1
| | | | | | | | | | | | | | | | | | | Commit 2ceb8b8c (make check: make test runs less noisy) used tempfile command to create temporary files. Looks like distros like Fedora doesn't have tempfile command. Looks like mktemp is supported on all distros (at least Fedora and Ubuntu supports this command). Hence replace tempfile with mktemp. Output without patch: [ CLEANUP ] gard-test-clean ./test/run.sh: line 3: tempfile: command not found skiboot/external/gard/test/Makefile.check:18: recipe for target 'gard-test-clean' failed make: *** [gard-test-clean] Error 1 Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reported-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Remove empty 'echo' from boot test scriptsStewart Smith2016-07-124-4/+0
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* make remaining noisy tests quietStewart Smith2016-07-122-10/+10
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* make check: make test runs less noisyStewart Smith2016-07-124-4/+62
| | | | | | | | | | | Run a small wrapper around some unit tests with the QTEST makefile macro (QTEST=Quiet TEST). Also, wrap boot tests in mambo and qemu to be quiet by default. Both ./test/run.sh and the modified mambo/qemu test runner scripts output full stdout and stderr in the event of error. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test/hello_world: Call OPAL_CEC_POWER_DOWN at endMichael Neuling2016-05-102-4/+18
| | | | | | | | | | | | | | | | | Call OPAL_CEC_POWER_DOWN at end rather than using a raw attn instruction. We are doing this since attn should be disabled in the host kernel otherwise userspace may crash the machine by calling it. We are now doing two opal calls so need to save some registers which are volatile over opal calls. This bloats the code from 10 instructions up to 16. May god have mercy on my soul. Signed-off-by: Michael Neuling <mikey@neuling.org> [stewart@linux.vnet.ibm.com: change hello world test run to look for power down rather than ATTN] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test: add multithreaded mambo testsOliver O'Halloran2016-03-072-5/+15
| | | | | | | | | Adds make targets to perform boot tests using multithreaded mambo. There are seperate targets for the kernel and hello_world payloads. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> [stewart@linux.vnet.ibm.com: Use SMT rather than threaded in test description] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Merge branch 'stable'Stewart Smith2016-01-211-0/+70
|\ | | | | | | Merge device tree sorting
| * DT sorting testOliver O'Halloran2016-01-211-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | Moved the dt_dump() into test/dt_common.c so that it can be shared between hdata/test/hdata_to_dt.c and core/test/run-device.c run-device.c contains two tests, one basic sorting test and a generate-and-sort test. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> [stewart@linux.vnet.ibm.com: remove trailing whitespace] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
| * hello_world: don't link with libgccStewart Smith2015-12-021-1/+1
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Add Debian Jessie installer boot testStewart Smith2015-11-262-1/+71
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | hello_world: don't link with libgccStewart Smith2015-11-181-1/+1
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Support PowerNV Qemu for running testsStewart Smith2015-10-266-7/+118
|/ | | | | | | | | | | | | | | | | | We now run tests under both Mambo and QEMU PowerNV model. Also added are scripts in opal-ci/ for building powernv model qemu. Currently, this is not yet in upstream qemu, so we build from Ben's branch. You can start using qemu along with/instead of Mambo by: 1) (cd ./opal-ci; sudo ./install-deps-qemu-powernv.sh; ./build-qemu-powernv.sh) 2) Pointing QEMU_PATH and QEMU_BINARY environment variables to appropriate qemu binary with powernv model When building qemu ourselves, we build a *specific* known good tag from the open-power tree. This should ensure that into the future existing test scripts should continue to function. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* fix boot-coverage-report target for updated boot_test.shStewart Smith2015-08-131-4/+4
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test/hello_world: Remove include fileMichael Neuling2015-06-012-24/+1
| | | | | Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test/hello_world: Cleanup codeMichael Neuling2015-06-011-17/+15
| | | | | | | | | | | Document it a lot more. Remove magic numbers. Remove include file. Make it more flexible. ... and most importantly remove the horrendous bloat. From 17 instructions down to 10! Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test/hello_world: Add linker script to dependenciesMichael Neuling2015-06-011-1/+1
| | | | | Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test/hello_world: Fix cleaning dependencies fileMichael Neuling2015-06-011-1/+1
| | | | | Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Ensure skiboot is built before running boot testsStewart Smith2015-05-281-2/+2
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Simplify boot-tests makefileStewart Smith2015-05-281-12/+5
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Support doing physical machine boot tests with gcovStewart Smith2015-05-272-4/+11
| | | | | | | We can boot FSP machines and extract GCOV coverage report from them combining with Mambo reports Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Enable multiple boot tests based on op-build verisonsStewart Smith2015-05-264-13/+45
| | | | | | We also add a makefile to help people re-create the images. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add boot-coverage-report targetStewart Smith2015-05-255-3/+30
| | | | | | | | | | | This target will run the (two) current boot tests and produce lcov coverage of skiboot from running them in Mambo. Everything is pretty hard coded at this stage and should most certainly be improved upon, especially if we want input from real hardware or to have more boot tests. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Refactor mambo test runningStewart Smith2015-05-254-9/+27
| | | | | | | | we now properly control the simulation rather than just killing off Mambo. For boot test, we wait for petitboot and actually shut down the simulation properly with 'halt'. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add Makefile and shell to run a boot test if zImage.epapr is presentStewart Smith2015-01-272-0/+59
| | | | | | | | If you've built a zImage.epapr using op-build, you can now drop it in the top level skiboot source tree, run 'make check' and these test files will pick it up and run a boot test using it. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test/hello_world: Fix makefile ruleJoel Stanley2014-12-181-1/+1
| | | | | | | | | | | | | | | powerpc-linux-gnu-gcc -m64 -c -MMD -Itest/hello_world/hello_kernel/ -o test/hello_world/hello_kernel/hello_kernel.o test/hello_world/hello_kernel/hello_kernel.S test/hello_world/hello_kernel/asm-utils.h powerpc-linux-gnu-gcc: fatal error: cannot specify -o with -c, -S or -E with multiple files GCC barfed as we were passing the header and the c file while compiling with -c. Fix the rule to just build source file. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* test/hello_world: Fix some corner cases in test scriptJoel Stanley2014-12-181-1/+6
| | | | | | | | | | | | | The test for expect would always return true. This change makes it do the correct thing in the presence and absence of expect on my Ubuntu machine. Also, skip the test if the user has KERNEL set. With this set skiboot contains an embedded kernel, and will load that before falling back to our hello_world test kernel, causing all kinds of confusion. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud