aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/host
diff options
context:
space:
mode:
authorm00nbsd <42475391+m00nbsd@users.noreply.github.com>2020-06-11 23:16:52 +0200
committerGitHub <noreply@github.com>2020-06-11 23:16:52 +0200
commit0f23e882fa8ef33d4f44a3fc0a5bba7a32889801 (patch)
tree8a419c6258329fe77cacf0d410cc87501fa9c387 /pkg/host
parent1ffa7b1e771dad7944976c721ed61a0762d7b65f (diff)
sys/netbsd: add support for fault injection (#1817)
Diffstat (limited to 'pkg/host')
-rw-r--r--pkg/host/host_netbsd.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/host/host_netbsd.go b/pkg/host/host_netbsd.go
index 160929194..dffdec5d7 100644
--- a/pkg/host/host_netbsd.go
+++ b/pkg/host/host_netbsd.go
@@ -23,6 +23,7 @@ func init() {
checkFeature[FeatureComparisons] = unconditionallyEnabled
checkFeature[FeatureUSBEmulation] = checkUSBEmulation
checkFeature[FeatureExtraCoverage] = checkUSBEmulation
+ checkFeature[FeatureFault] = checkFault
}
func checkUSBEmulation() string {
@@ -31,3 +32,10 @@ func checkUSBEmulation() string {
}
return ""
}
+
+func checkFault() string {
+ if err := osutil.IsAccessible("/dev/fault"); err != nil {
+ return err.Error()
+ }
+ return ""
+}