blob: 739f16e196fddc9784b509c138e42b464424740b [file] [log] [blame]
Tim Windelschmidt18e9a3f2024-04-08 21:51:03 +02001package main
2
3import (
Tim Windelschmidtd0dd1f52025-01-09 04:42:19 +01004 "context"
5 "os"
6
Tim Windelschmidt18e9a3f2024-04-08 21:51:03 +02007 "source.monogon.dev/osbase/bringup"
8)
9
10func main() {
Tim Windelschmidtd0dd1f52025-01-09 04:42:19 +010011 bringup.Runnable(func(ctx context.Context) error {
12 // Disable the exception tracing of the kernel which captures unhandled
13 // signals as it races with our logging which makes the test flaky.
14 err := os.WriteFile("/proc/sys/debug/exception-trace", []byte("0"), 0755)
15 if err != nil {
16 return err
17 }
18
19 // Provoke a segfault, which produces a panic inside the root runnable
20 //nolint:nilness
21 _ = *(*string)(nil)
22 return nil
23 }).Run()
Tim Windelschmidt18e9a3f2024-04-08 21:51:03 +020024}