Commit bd47fe9b authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

fuse/pathfs: use TempDir in TestSysUtimensat

Change-Id: Ifec1f504e014c3af9fe79943660831be0598a6d2
parent 954bbbc5
...@@ -9,14 +9,16 @@ package pathfs ...@@ -9,14 +9,16 @@ package pathfs
import ( import (
"os" "os"
"path/filepath"
"reflect" "reflect"
"syscall" "syscall"
"testing" "testing"
) )
func TestSysUtimensat(t *testing.T) { func TestSysUtimensat(t *testing.T) {
symlink := "/tmp/TestSysUtimensat" dir := t.TempDir()
os.Remove(symlink)
symlink := filepath.Join(dir, "symlink")
err := os.Symlink("/nonexisting/file", symlink) err := os.Symlink("/nonexisting/file", symlink)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
......
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