Commit c34eae0e authored by Jakob Unterwurzacher's avatar Jakob Unterwurzacher Committed by Han-Wen Nienhuys

tests: fs: TestOpenDirectIO: move to /var/tmp

This used to create a hidden folder in the user's home
directory to avoid /tmp, which is on tmpfs on modern
distros.

Use /var/tmp instead, which is also a real filesystem,
and avoid cluttering the home dir.

Change-Id: Ifa0a1dbdf7a2c4b08e53d20e28f287207ff8ef47
parent b4058856
......@@ -365,9 +365,9 @@ func TestPosix(t *testing.T) {
func TestOpenDirectIO(t *testing.T) {
// Apparently, tmpfs does not allow O_DIRECT, so try to create
// a test temp directory in the home directory.
ext4Dir := filepath.Join(os.Getenv("HOME"), ".go-fuse-test")
if err := os.MkdirAll(ext4Dir, 0755); err != nil {
// a test temp directory in /var/tmp.
ext4Dir, err := ioutil.TempDir("/var/tmp", "go-fuse.TestOpenDirectIO")
if err != nil {
t.Fatalf("MkdirAll: %v", err)
}
defer os.RemoveAll(ext4Dir)
......
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