diff options
Diffstat (limited to 'integrationtests/cmd/ioworkload')
| -rw-r--r-- | integrationtests/cmd/ioworkload/scenarios.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/integrationtests/cmd/ioworkload/scenarios.go b/integrationtests/cmd/ioworkload/scenarios.go index 06e202d..1ca7328 100644 --- a/integrationtests/cmd/ioworkload/scenarios.go +++ b/integrationtests/cmd/ioworkload/scenarios.go @@ -11,6 +11,7 @@ import ( // scenarios maps scenario names to their execution functions. var scenarios = map[string]func() error{ + "crash": crash, "open-basic": openBasic, "open-creat": openCreat, "open-by-handle-at": openByHandleAt, @@ -1576,3 +1577,9 @@ func ioUringSetupRing(entries uint32) (int, error) { } return int(fd), nil } + +// crash simulates a workload that fails with a non-zero exit code. +// Used to verify the test harness handles workload failures gracefully. +func crash() error { + return fmt.Errorf("intentional crash for testing") +} |
