blob: e820a34150acc1629a0dd7d2c7adc965329edcf2 [file] [log] [blame]
Tim Windelschmidt6d33a432025-02-04 14:34:25 +01001// Copyright The Monogon Project Authors.
2// SPDX-License-Identifier: Apache-2.0
3
Tim Windelschmidt18e9a3f2024-04-08 21:51:03 +02004package main
5
6import (
Tim Windelschmidtd0dd1f52025-01-09 04:42:19 +01007 "context"
8 "os"
9
Tim Windelschmidt18e9a3f2024-04-08 21:51:03 +020010 "source.monogon.dev/osbase/bringup"
11)
12
13func main() {
Tim Windelschmidtd0dd1f52025-01-09 04:42:19 +010014 bringup.Runnable(func(ctx context.Context) error {
15 // Disable the exception tracing of the kernel which captures unhandled
16 // signals as it races with our logging which makes the test flaky.
17 err := os.WriteFile("/proc/sys/debug/exception-trace", []byte("0"), 0755)
18 if err != nil {
19 return err
20 }
21
22 // Provoke a segfault, which produces a panic inside the root runnable
23 //nolint:nilness
24 _ = *(*string)(nil)
25 return nil
26 }).Run()
Tim Windelschmidt18e9a3f2024-04-08 21:51:03 +020027}