aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-04-13 16:17:49 -0400
committerRuss Cox <rsc@golang.org>2011-04-13 16:17:49 -0400
commitda8c5e7239d7c1e7238605c2b7f9a954dd8a2997 (patch)
treed8d920120f296d29a1b4815b9e569dd1ee3f0f13
parent6392fc75cf5d51f69f9e353da81c84e488dbf629 (diff)
downloadgo-da8c5e7239d7c1e7238605c2b7f9a954dd8a2997.tar.gz
go-da8c5e7239d7c1e7238605c2b7f9a954dd8a2997.zip
os/inotify: use _test for test files, not _obj
R=golang-dev, r, iant2 CC=golang-dev https://golang.org/cl/4408043
-rw-r--r--src/pkg/os/inotify/inotify_linux.go2
-rw-r--r--src/pkg/os/inotify/inotify_linux_test.go8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/os/inotify/inotify_linux.go b/src/pkg/os/inotify/inotify_linux.go
index 96c229e7b7..8b5c30e0dc 100644
--- a/src/pkg/os/inotify/inotify_linux.go
+++ b/src/pkg/os/inotify/inotify_linux.go
@@ -109,7 +109,7 @@ func (w *Watcher) AddWatch(path string, flags uint32) os.Error {
}
wd, errno := syscall.InotifyAddWatch(w.fd, path, flags)
if wd == -1 {
- return os.NewSyscallError("inotify_add_watch", errno)
+ return &os.PathError{"inotify_add_watch", path, os.Errno(errno)}
}
if !found {
diff --git a/src/pkg/os/inotify/inotify_linux_test.go b/src/pkg/os/inotify/inotify_linux_test.go
index f5d1f8384d..e29a46d6c2 100644
--- a/src/pkg/os/inotify/inotify_linux_test.go
+++ b/src/pkg/os/inotify/inotify_linux_test.go
@@ -17,8 +17,8 @@ func TestInotifyEvents(t *testing.T) {
t.Fatalf("NewWatcher() failed: %s", err)
}
- // Add a watch for "_obj"
- err = watcher.Watch("_obj")
+ // Add a watch for "_test"
+ err = watcher.Watch("_test")
if err != nil {
t.Fatalf("Watcher.Watch() failed: %s", err)
}
@@ -30,7 +30,7 @@ func TestInotifyEvents(t *testing.T) {
}
}()
- const testFile string = "_obj/TestInotifyEvents.testfile"
+ const testFile string = "_test/TestInotifyEvents.testfile"
// Receive events on the event channel on a separate goroutine
eventstream := watcher.Event
@@ -90,7 +90,7 @@ func TestInotifyClose(t *testing.T) {
t.Fatal("double Close() test failed: second Close() call didn't return")
}
- err := watcher.Watch("_obj")
+ err := watcher.Watch("_test")
if err == nil {
t.Fatal("expected error on Watch() after Close(), got nil")
}