Commit 528f3d1d authored by Aaron Jacobs's avatar Aaron Jacobs

Fix debug logging for subprocess tests.

parent c42ea099
......@@ -40,6 +40,7 @@ var fFlushError = flag.Int("flushfs.flush_error", 0, "")
var fFsyncError = flag.Int("flushfs.fsync_error", 0, "")
var fReadOnly = flag.Bool("read_only", false, "Mount in read-only mode.")
var fDebug = flag.Bool("debug", false, "Enable debug logging.")
func makeFlushFS() (server fuse.Server, err error) {
// Check the flags.
......@@ -140,6 +141,10 @@ func main() {
ReadOnly: *fReadOnly,
}
if *fDebug {
cfg.DebugLogger = log.New(os.Stderr, "fuse: ", 0)
}
mfs, err := fuse.Mount(*fMountPoint, server, cfg)
if err != nil {
log.Fatalf("Mount: %v", err)
......
......@@ -276,7 +276,7 @@ func (t *SubprocessTest) initialize(ctx context.Context) (err error) {
// Handle debug mode.
if *fDebug {
mountCmd.Stderr = os.Stderr
mountCmd.Args = append(mountCmd.Args, "--fuse.debug")
mountCmd.Args = append(mountCmd.Args, "--debug")
}
// Start the command.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment