Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
da8c5e72
Commit
da8c5e72
authored
Apr 13, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os/inotify: use _test for test files, not _obj
R=golang-dev, r, iant2 CC=golang-dev
https://golang.org/cl/4408043
parent
6392fc75
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
inotify_linux.go
src/pkg/os/inotify/inotify_linux.go
+1
-1
inotify_linux_test.go
src/pkg/os/inotify/inotify_linux_test.go
+4
-4
No files found.
src/pkg/os/inotify/inotify_linux.go
View file @
da8c5e72
...
...
@@ -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
{
...
...
src/pkg/os/inotify/inotify_linux_test.go
View file @
da8c5e72
...
...
@@ -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"
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment