Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions configs/test.fragment.E10
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# The test fragment for era E10, merged into every graded configuration, the reference's and rucc's alike.
#
# It only turns things on. The first block is what tinyconfig lacks to reach userspace at all, the
# rest is the boot rig and the test suites, as in docs/plan/11-boot-and-tests.md. rk build merges it
# after the configuration target, runs olddefconfig, and records every request that did not take.
# It turns things on, except for the KUnit fault test. The first block is what tinyconfig lacks to
# reach userspace at all, the rest is the boot rig and the test suites, as in
# docs/plan/11-boot-and-tests.md. rk build merges it after the configuration target, runs
# olddefconfig, and records every request that did not take.

# enough of a kernel to run init from an initramfs
CONFIG_PRINTK=y
Expand Down Expand Up @@ -39,6 +40,8 @@ CONFIG_9P_FS=y
# test infrastructure
CONFIG_KUNIT=y
CONFIG_KUNIT_ALL_TESTS=m
# kunit_fault oopses on purpose, and with oops=panic that stops the run before the later suites
# CONFIG_KUNIT_FAULT_TEST is not set
CONFIG_DEBUG_STACK_USAGE=y
CONFIG_PRINTK_TIME=y
CONFIG_PANIC_ON_OOPS=y
Expand Down
9 changes: 6 additions & 3 deletions configs/test.fragment.E11
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# The test fragment for era E11, merged into every graded configuration, the reference's and rucc's alike.
#
# It only turns things on. The first block is what tinyconfig lacks to reach userspace at all, the
# rest is the boot rig and the test suites, as in docs/plan/11-boot-and-tests.md. rk build merges it
# after the configuration target, runs olddefconfig, and records every request that did not take.
# It turns things on, except for the KUnit fault test. The first block is what tinyconfig lacks to
# reach userspace at all, the rest is the boot rig and the test suites, as in
# docs/plan/11-boot-and-tests.md. rk build merges it after the configuration target, runs
# olddefconfig, and records every request that did not take.

# enough of a kernel to run init from an initramfs
CONFIG_PRINTK=y
Expand Down Expand Up @@ -39,6 +40,8 @@ CONFIG_9P_FS=y
# test infrastructure
CONFIG_KUNIT=y
CONFIG_KUNIT_ALL_TESTS=m
# kunit_fault oopses on purpose, and with oops=panic that stops the run before the later suites
# CONFIG_KUNIT_FAULT_TEST is not set
CONFIG_DEBUG_STACK_USAGE=y
CONFIG_PRINTK_TIME=y
CONFIG_PANIC_ON_OOPS=y
Expand Down
9 changes: 6 additions & 3 deletions configs/test.fragment.E8
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# The test fragment for era E8, merged into every graded configuration, the reference's and rucc's alike.
#
# It only turns things on. The first block is what tinyconfig lacks to reach userspace at all, the
# rest is the boot rig and the test suites, as in docs/plan/11-boot-and-tests.md. rk build merges it
# after the configuration target, runs olddefconfig, and records every request that did not take.
# It turns things on, except for the KUnit fault test. The first block is what tinyconfig lacks to
# reach userspace at all, the rest is the boot rig and the test suites, as in
# docs/plan/11-boot-and-tests.md. rk build merges it after the configuration target, runs
# olddefconfig, and records every request that did not take.

# enough of a kernel to run init from an initramfs
CONFIG_PRINTK=y
Expand Down Expand Up @@ -39,6 +40,8 @@ CONFIG_9P_FS=y
# test infrastructure
CONFIG_KUNIT=y
CONFIG_KUNIT_ALL_TESTS=m
# kunit_fault oopses on purpose, and with oops=panic that stops the run before the later suites
# CONFIG_KUNIT_FAULT_TEST is not set
CONFIG_DEBUG_STACK_USAGE=y
CONFIG_PRINTK_TIME=y
CONFIG_PANIC_ON_OOPS=y
Expand Down
9 changes: 6 additions & 3 deletions configs/test.fragment.E9
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# The test fragment for era E9, merged into every graded configuration, the reference's and rucc's alike.
#
# It only turns things on. The first block is what tinyconfig lacks to reach userspace at all, the
# rest is the boot rig and the test suites, as in docs/plan/11-boot-and-tests.md. rk build merges it
# after the configuration target, runs olddefconfig, and records every request that did not take.
# It turns things on, except for the KUnit fault test. The first block is what tinyconfig lacks to
# reach userspace at all, the rest is the boot rig and the test suites, as in
# docs/plan/11-boot-and-tests.md. rk build merges it after the configuration target, runs
# olddefconfig, and records every request that did not take.

# enough of a kernel to run init from an initramfs
CONFIG_PRINTK=y
Expand Down Expand Up @@ -39,6 +40,8 @@ CONFIG_9P_FS=y
# test infrastructure
CONFIG_KUNIT=y
CONFIG_KUNIT_ALL_TESTS=m
# kunit_fault oopses on purpose, and with oops=panic that stops the run before the later suites
# CONFIG_KUNIT_FAULT_TEST is not set
CONFIG_DEBUG_STACK_USAGE=y
CONFIG_PRINTK_TIME=y
CONFIG_PANIC_ON_OOPS=y
Expand Down
4 changes: 4 additions & 0 deletions crates/rk/src/kconfig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,10 @@ CONFIG_GCC_VERSION=140200
);
let text = std::fs::read_to_string(&path).unwrap();
assert!(parse_fragment(&text).len() > 20, "{path}");
assert!(
parse_fragment(&text).contains(&("KUNIT_FAULT_TEST".to_string(), "n".to_string())),
"{path}"
);
}
}

Expand Down
4 changes: 3 additions & 1 deletion docs/plan/11-boot-and-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A kernel build that links proves little. This document defines the boot rig, the

## 11.1 The test fragment

`rucc-kernel/configs/test.fragment` is merged into every graded configuration. It only turns things on (02.1), and its contents are fixed per era. The fragment for E10 and E11:
`rucc-kernel/configs/test.fragment` is merged into every graded configuration. It only turns things on (02.1), with one exception given below, and its contents are fixed per era. The fragment for E10 and E11:

```
# console and init
Expand Down Expand Up @@ -32,6 +32,7 @@ CONFIG_9P_FS=y
# test infrastructure
CONFIG_KUNIT=y
CONFIG_KUNIT_ALL_TESTS=m # built as modules, loaded by rk-init
# CONFIG_KUNIT_FAULT_TEST is not set # oopses on purpose
CONFIG_DEBUG_STACK_USAGE=y # 02.5 stack high water mark
CONFIG_PRINTK_TIME=y
CONFIG_PANIC_ON_OOPS=y
Expand All @@ -44,6 +45,7 @@ CONFIG_PARAVIRT=y
Notes:
- **`KUNIT_ALL_TESTS=m` builds every KUnit suite the configuration allows.** It is legal because it only turns things on, and it is the largest single source of tests. It also means `defconfig` plus the fragment compiles a few hundred more units than `defconfig`, which we want.
- **`PANIC_ON_OOPS` makes an oops end the run** with a clear marker rather than a hang.
- **`KUNIT_FAULT_TEST` is off.** Its `kunit_fault` suite dereferences NULL on purpose to show that KUnit survives a fault. With `PANIC_ON_OOPS` that oops ends the run, and every suite after it does not run. Some kernels, such as 6.12, turn it on by default. It is off for both builds, so it is fair.
- **`CONFIG_PVH` and `HYPERVISOR_GUEST`** are for 09.6's direct boot. They are on for both builds, so they are fair.
- **Older eras' fragments** drop what does not exist:
- KUnit before 5.5;
Expand Down
Loading