Documentation
¶
Overview ¶
Package exectest helps tests that run fake programs (a fake nmap, apt, systemctl…) through core/exec.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteScript ¶
WriteScript writes an executable file for a test. It holds syscall.ForkLock while the file is open for writing: a process that a parallel test forks in that moment would otherwise inherit the write descriptor until it execs, and running the script right away would fail with ETXTBSY ("text file busy") on Linux (golang/go#22315). os/exec takes the read side of the same lock around fork.
Types ¶
This section is empty.