Documentation
¶
Overview ¶
Package filesetup provides file-related utility functions for security tests.
All of the functions in this package panic on error. They are intended to be used to set up environments for testing, not to perform test assertions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDir ¶
CreateDir creates a directory at path owned by uid and with the supplied mode. Panics on error.
func CreateFile ¶
CreateFile creates a file at path containing data. The file will be owned by uid and will have the supplied mode. Panics on error.
func CreateSymlink ¶
CreateSymlink creates a new symbolic link at newname pointing at target oldname. The symbolic link will be owned by uid. Panics on error.
func ReadOnlyRootPartition ¶
ReadOnlyRootPartition returns true if the root partition is mounted read-only. This can be called by tests that inspect filesystem permissions: a false return value indicates that rootfs verification is disabled and that testing is likely to be unreliable.
Types ¶
This section is empty.