Skip to content

eatonphil/badio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

badio

ptrace layer for triggering bad IO behavior.

Example:

$ make
$ (cd test && go build main.go)
$ cat test/main.go
package main

import (
	"os"
)

func main() {
	f, err := os.OpenFile("test.txt", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755)
	if err != nil {
		panic(err)
	}

	text := "some great stuff"
	_, _ = f.Write([]byte(text))

	_ = f.Close()
}
$ ./main test/main
Got a write on 3: some great stu
$ cat test.txt
some great stu

Notes

On Go writes on Linux:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published