flag.StringVar(&fsTypePath,"fs_type","","Path to print the fs type for")
flag.StringVar(&fileModePath,"file_mode","","Path to print the mode bits of")
flag.StringVar(&filePermPath,"file_perm","","Path to print the perms of")
flag.StringVar(&fileOwnerPath,"file_owner","","Path to print the owning UID and GID of")
flag.StringVar(&newFilePath0644,"new_file_0644","","Path to write to and read from with perm 0644")
flag.StringVar(&newFilePath0666,"new_file_0666","","Path to write to and read from with perm 0666")
flag.StringVar(&newFilePath0660,"new_file_0660","","Path to write to and read from with perm 0660")
flag.StringVar(&newFilePath0777,"new_file_0777","","Path to write to and read from with perm 0777")
flag.StringVar(&readFileContentPath,"file_content","","Path to read the file content from")
flag.StringVar(&readFileContentInLoopPath,"file_content_in_loop","","Path to read the file content in loop from")
flag.IntVar(&retryDuration,"retry_time",180,"Retry time during the loop")
flag.BoolVar(&breakOnExpectedContent,"break_on_expected_content",true,"Break out of loop on expected content, (use with --file_content_in_loop flag only)")
}
// This program performs some tests on the filesystem as dictated by the
// flags passed by the user.
funcmain(){
flag.Parse()
var(
errerror
errs=[]error{}
)
// Clear the umask so we can set any mode bits we want.
syscall.Umask(0000)
// NOTE: the ordering of execution of the various command line
// flags is intentional and allows a single command to:
//
// 1. Check the fstype of a path
// 2. Write a new file within that path
// 3. Check that the file's content can be read
//
// Changing the ordering of the following code will break tests.