summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2022-07-20lib/common.sh: Use pipefailKent Overstreet
++ for catching more errors Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-20Fix exit handlerKent Overstreet
Our exit handler was returning failure, and causing the whole script to return failure, when we didn't have a temp dir. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-11Delete our perf wrapperKent Overstreet
Debian is doing the sane thing now Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-10supervisor: Catch and forward signalsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-10Rename qemu-wrapper to supervisorKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-10Move logic for retrying subtests to the CIKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-10export ktest_out, ktest_failfastKent Overstreet
These are needed by tests/prelude.sh run_tests Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-08qemu-wrapper: make sure status file gets a newlineKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-08Disable ktest_crashdump, fix error handlingKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-08More fixesKent Overstreet
- hook functionality doesn't work anymore since we're not directly sourcing tests, replace it with something simpler - fix ktest_storage_bus Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-08Fix multiple includes of prelude.shKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-08fixup! get-test-job: Query for subtests, and write per-subtest lockfilesKent Overstreet
2022-07-08fixup! get-test-job: Query for subtests, and write per-subtest lockfilesKent Overstreet
2022-07-08fixup! get-test-job: Query for subtests, and write per-subtest lockfilesKent Overstreet
2022-07-08fixup! Rework ktest -> test interfaceKent Overstreet
2022-07-08fixup! get-test-job: Query for subtests, and write per-subtest lockfilesKent Overstreet
2022-07-07get-test-job: Query for subtests, and write per-subtest lockfilesKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com
2022-07-07qemu-wrapper: Default timeout now applies per-subtestKent Overstreet
Previously, a default timeout would apply to _all_ subtests. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-07Rework ktest -> test interfaceKent Overstreet
This is the start of making .ktest tests programs that are executed directly, instead of having them sourced and invoked by ktest. - Kill require-lib - list_tests, run_test, run_tests are now normal library functions, instead of using code injection Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-07Restart VM if necessary until tests are completeKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-07qemu-wrapper is now responsible for writing test statusKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-07Always pass -t option to mountKent Overstreet
Mount occasionally returns and error while actually succeeding if we don't specify the filesystem type. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-07Ignore errors from pkillKent Overstreet
If we have no child processes an error is expected Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-07qemu-wrapper now records test durationKent Overstreet
This will be more reliable than relying on tests running inside the VM. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-07qemu-wrapper: Print out test name correctly on test timeoutKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-07Print error when tests die because command erroredKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-04config-timeout no longer requiredKent Overstreet
Instead, if it's not specified there's a default 10 minute timeout - now that we can specify per-test timeouts the global timeout isn't as important. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-04Create subdirectories for individual test artifactsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-01get-test-jobKent Overstreet
New tool for getting a test job and creating a lockfile. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-01qemu-wrapper: Print timeout on test timeoutKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-01Tests can now specify architecture with config-archKent Overstreet
This will overide -a, if also specified on the command line. This also updates bcachefs/32bit.ktest, which can now boot with the correct root image. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-07-01Ensure tests are marked as not runKent Overstreet
If we fail to run tests for any reason, we want to mark them as not run: this patch creates per-test logfiles immediately after parsing the test and marks them as not run, ensuring they're marked correctly no matter what kind of error we get. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-06-30qemu-wrapper: include newline in timeout messageKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-06-30qemu-wrapper: Handle tests with / in their nameKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-06-29Run depmod in build-test-kernelKent Overstreet
Running depmod is one of the slower parts of launching a VM - moving it to build-test-kernel will help with that. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-06-27qemu-wrapper: Print test name when failing due to timeoutKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-06-26Minor improvementsKent Overstreet
- kernel config updates - build with make -k, for better error messages - use nproc command for nr of cpus - add require-qemu-append Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-06-26Set per-test watchdog for some bcachefs testsKent Overstreet
This will help stuck tests timeout quicker Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-06-26qemu-wrapper: Don't use SA_RESTARTKent Overstreet
SA_RESTART + SIGALRM is janky Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-06-26Improve timeout/watchdog functionalityKent Overstreet
This reworks watchdogs in the qemu-wrapper, so that now we correctly print TEST FAILED in each logfile when a test times out. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-06-26qemu-wrapper: popen_with_pid()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-06-23Test automation improvementsKent Overstreet
Log files are now based on the name of the test being run, and individual tests in a .ktest file now have their own log files Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-04-11Fix some typosKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-04-10Fix pathnamesKent Overstreet
We changed the paths to the sockets for connecting to qemu, not all uses got updated. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-04-10Kill $LOGDIRKent Overstreet
It was just a duplicate of $ktest_out Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-04-09fixup! Improve root image not found error messageKent Overstreet
2022-04-09Fix -o option (output directory)Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-04-09Improve root image not found error messageKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-04-09Switch to #!/usr/bin/env bashKent Overstreet
This is for nixos, and works everywhere. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-04-09Consolidate various paths and directoriesKent Overstreet
Now, everything that ktest produces goes under ktest-out, and we have only one input path and one output path to (potentially) specify on the commandline - the kernel source tree, and the ktest-out directory. The kernel build directory and kernel binary directory now go under ktest-out. Also deleted a bunch of old unused options. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>