Skip to content

Commit ff69725

Browse files
committed
test: disable reboot-on-panic in tests
Fixes #26 Signed-off-by: Samuel Karp <[email protected]>
1 parent 55061aa commit ff69725

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

machine_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,12 @@ func testMachineConfigApplication(ctx context.Context, t *testing.T, m *Machine,
192192
}
193193

194194
func testCreateBootSource(ctx context.Context, t *testing.T, m *Machine) {
195-
err := m.createBootSource(ctx, filepath.Join(testDataPath, "./vmlinux"), "ro console=ttyS0 noapic reboot=k panic=1 pci=off nomodules")
195+
// panic=0: This option disables reboot-on-panic behavior for the kernel. We
196+
// use this option as we might run the tests without a real root
197+
// filesystem available to the guest.
198+
// Kernel command-line options can be found in the kernel source tree at
199+
// Documentation/admin-guide/kernel-parameters.txt.
200+
err := m.createBootSource(ctx, filepath.Join(testDataPath, "./vmlinux"), "ro console=ttyS0 noapic reboot=k panic=0 pci=off nomodules")
196201
if err != nil {
197202
t.Errorf("failed to create boot source: %s", err)
198203
}

0 commit comments

Comments
 (0)