aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2023-01-19opal-ci: Update qemu command line to test booting upFrederic Barrat1-2/+1
Starting with qemu 7.2, there's no longer any PCI root port configured when the '-nodefaults' option is used. Since that option is used and we include some PCI devices when we test booting with qemu, qemu 7.2 is throwing an error as it doesn't have a bus to attach the devices to. It's currently breaking the CI on Fedora rawhide, where qemu has been updated to version 7.2. Support for powernv in qemu has improved since the qemu-boot-check test was introduced and there's no good reason to run with '-nodefaults' any more. So this patch removes it. Which allows to also remove a few extra devices from the command line since the defaults are sane. And we can still attach PCI devices. Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
2021-11-10test/qemu: Add PCI devicesCédric Le Goater1-2/+20
This defines a PCI layout close to an OpenPOWER system and adds an optional disk to boot from. Fix verbose runs while we are at it. Signed-off-by: Cédric Le Goater <clg@kaod.org>
2021-11-10CI: Update runs with P10 mamboCédric Le Goater1-1/+1
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2021-11-05test/qemu: Fix testFrederic Barrat1-1/+2
Fix a syntax error in the expect script. Add -nographic when starting qemu to avoid problems on systems where gtk is installed. Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
2021-08-27hello_world: Add p10 mambo testsVasant Hegde2-0/+80
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
2020-10-02test: Skip qemu tests if skiboot.lid is too largeOliver O'Halloran2-0/+14
With the addition of the secvar patches the GCOV enabled builds now produce a skiboot.lid that greater than 4MB. This is larger than the historical max firmware image size supported by the PowerNV Qemu model so we need to skip the Qemu boot tests in that case. Non-GCOV builds are still well under the limit (2.3MB or so) and mambo tests are not affected, so this shouldn't be a big deal. If the Qemu happens to support a larger image size this should continue to work without issues. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2020-06-17test: Print proper mambo command pathVasant Hegde1-1/+1
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2020-06-17test/qemu: Update command line argumentsOliver O'Halloran2-2/+4
Modern qemu builds will barf if you specify the BMC / ipmi device on the command line without -nodefaults. So add that in and put in an explicit serial device. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2020-03-12Re-license IBM written files as Apache 2.0 OR GPLv2+Stewart Smith3-3/+3
SPDX makes it a simpler diff. I have audited the commit history of each file to ensure that they are exclusively authored by IBM and thus we have the right to relicense. The motivation behind this is twofold: 1) We want to enable experiments with coreboot, which is GPLv2 licensed 2) An upcoming firmware component wants to incorporate code from skiboot and code from the Linux kernel, which is GPLv2 licensed. I have gone through the IBM internal way of gaining approval for this. The following files are not exclusively authored by IBM, so are *not* included in this update (I will be seeking approval from contributors): core/direct-controls.c core/flash.c core/pcie-slot.c external/common/arch_flash_unknown.c external/common/rules.mk external/gard/Makefile external/gard/rules.mk external/opal-prd/Makefile external/pflash/Makefile external/xscom-utils/Makefile hdata/vpd.c hw/dts.c hw/ipmi/ipmi-watchdog.c hw/phb4.c include/cpu.h include/phb4.h include/platform.h libflash/libffs.c libstb/mbedtls/sha512.c libstb/mbedtls/sha512.h platforms/astbmc/barreleye.c platforms/astbmc/garrison.c platforms/astbmc/mihawk.c platforms/astbmc/nicole.c platforms/astbmc/p8dnu.c platforms/astbmc/p8dtu.c platforms/astbmc/p9dsu.c platforms/astbmc/vesnin.c platforms/rhesus/ec/config.h platforms/rhesus/ec/gpio.h platforms/rhesus/gpio.c platforms/rhesus/rhesus.c platforms/astbmc/talos.c platforms/astbmc/romulus.c Signed-off-by: Stewart Smith <stewart@linux.ibm.com> [oliver: fixed up the drift] Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-12-04boottests: Print the simulator output if V=1 is setOliver O'Halloran7-0/+7
Currently we only print it on failures, but sometimes it's nice to see the output in the successful cases too. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-11-27mambo: enable use of real Container Verification CodeStewart Smith2-0/+2
Make skiboot.tcl able to load and use a CVC blob from a real system. This code comes from the src/securerom/ code in Hostboot. we now use this in the sreset_world and hello_world test cases when we do a secure boot run of them Signed-off-by: Stewart Smith <stewart@linux.ibm.com> [oliver: folded cvc.bin into this patch, misc fixes] Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-11-14test/mambo: Skip restoring the old ulimitOliver O'Halloran5-15/+0
Reducing the core size limit is always permitted, but increasing it may not. To work around problems with some versions of mambo segfaulting we set the ulimit to zero when running the tests and try to restore the old ulimit afterwards. On systems where this isn't permitted (fedora?) this results in a pile of of spurious errors from ulimit while running "make check. e.g. ulimit: core file size: cannot modify limit: Operation not permitted The ulimit reduction only applies to the currently running shell (i.e the one running the script) which is probably not going to crash outside of mambo. Remove the ulimit restoration to squash the errors so the output of make check is cleaner. Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-07-26SPDX-ify all skiboot codeStewart Smith3-54/+13
Use Software Package Data Exchange (SPDX) to indicate license for each file that is unique to skiboot. At the same time, ensure the (C) who and years are correct. See https://spdx.org/ Signed-off-by: Stewart Smith <stewart@linux.ibm.com> [oliver: Added a few missing files] Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-07-19gcov: Fix skiboot size to dump out from simulatorsStewart Smith3-3/+3
We can be up to 5MB now, and have been for a while. Fixes: 7c9b3eb3c149843a27b9674e66b0227cf289a29a Signed-off-by: Stewart Smith <stewart@linux.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-03-28ci: qemu boot tests should use built skibootStewart Smith2-2/+2
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-03-28ci: Remove debian-jessie boot test.Stewart Smith2-76/+1
Debian (in its infinite "wisdom") has decided to erase most evidence of there ever being a ppc64el installer for Debian Jessie. So, screw them. Backwards compatibility testing was for losers anyway. There is snapshot.debian.org, but it's *really* slow pulling things from there, so it's not really an option unless we want to add multiple minutes to test duration. Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-12-13test: Update qemu arguments to use bmc simulatorJoel Stanley3-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>
2018-09-13Use $() rather than backticks in all shellStewart Smith9-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>
2018-06-27test/qemu: start building qemu again, and use our built qemu for testsStewart Smith3-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>
2018-05-29test/qemu: skip qemu test if 'old' qemu without PCRStewart Smith2-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>
2018-05-09test: Simplify build process for hello and sreset testsJoel Stanley4-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>
2018-05-09qemu-debian-test: Remove unusable hda optionJoel Stanley1-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>
2018-05-06test: qemu-debian-jessie boot: fix qemu-imgStewart Smith1-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>
2018-05-04sreset_world: re-enable the non-stb buildJoel Stanley1-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>
2018-05-02tests: Specfiy Qemu with a single environment variableJoel Stanley3-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>
2017-12-20Mambo: run hello_world and sreset_world tests with Secure and Trusted BootStewart Smith6-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>
2017-12-04sreset_kernel: only run SMT tests due to not supporting re-entryStewart Smith2-9/+2
Fixes: 0d84ea6bda03a00a1765dd7240a9e5231a537e96 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-08-24test kernels: link with -NStewart Smith2-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>
2017-07-12test/qemu-jessie: bail out fast on kernel panicStewart Smith1-0/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-07-12test/qemu-jessie: dump boot log on failureStewart Smith1-0/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-06-19test/hello_world: Properly report P9MAMBO pathMichael Ellerman1-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>
2017-03-31Mambo/Qemu boot tests: expect (and fail) on checkstopStewart Smith8-0/+12
This allows us to fail a lot faster if we checkstop Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-07test/sreset_world: Kind of like Hello World, but from the SRESET vector.Stewart Smith6-0/+327
A regression test for the mambo implementation of OPAL_SIGNAL_SYSTEM_RESET. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-02-22test/hello_world: use P9MAMBO_ to differentiate from P8Stewart Smith1-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>
2017-02-16hdata_to_dt: Only output dtbStewart Smith1-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>
2016-12-22hello_world: print out full path of missing MAMBO_BINARYStewart Smith2-2/+2
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-22hello_world: run p9 mambo testsStewart Smith2-0/+70
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-26test/qemu: bump qemu version used in CI, adds IPMI supportStewart Smith2-2/+2
Now based on Cédric's branch. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-22test/hello_world: always use shutdown type zeroOliver O'Halloran1-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>
2016-07-18Use mktemp rather than the deprecated tempfileStewart Smith3-3/+3
Fixes: 2ceb8b8c0ac53a9014e83d12e1c758d5f9e07fe6 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-18make check: Use mktemp instead of tempfileVasant Hegde1-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>
2016-07-12Remove empty 'echo' from boot test scriptsStewart Smith4-4/+0
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-12make remaining noisy tests quietStewart Smith2-10/+10
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-12make check: make test runs less noisyStewart Smith4-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>
2016-05-10test/hello_world: Call OPAL_CEC_POWER_DOWN at endMichael Neuling2-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>
2016-03-07test: add multithreaded mambo testsOliver O'Halloran2-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>
2016-01-21Merge branch 'stable'Stewart Smith1-0/+70
Merge device tree sorting
2016-01-21DT sorting testOliver O'Halloran1-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>
2015-12-02hello_world: don't link with libgccStewart Smith1-1/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-26Add Debian Jessie installer boot testStewart Smith2-1/+71
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>