• Jakob Unterwurzacher's avatar
    tests: fix TestReaddirTypeFixup leaking broken mounts · 672815b2
    Jakob Unterwurzacher authored
    After running the test suite, `df` used to report this:
    
      df: /tmp/TestReaddirTypeFixup090721515: Transport endpoint is not connected
    
    To catch problems like this earlier, testMount() now reports failures to umount
    cleanly, and catches the problem with TestReaddirTypeFixup:
    
      $ go test ./fs -run TestReaddirTypeFixup
      [...]
          mem_test.go:37: testMount: Unmount failed: /usr/bin/fusermount: failed to unmount /tmp/TestReaddirTypeFixup175482633: Device or resource busy
    
    TestReaddirTypeFixup was missing ds.Close(), which was also added,
    tests pass now and don't leave broken mounts behind.
    
    Change-Id: Ib5d96c8531b11080cf8da526b917446388537956
    672815b2
randomtype_test.go 2.11 KB