Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Levin Zimmermann
go-fuse
Commits
3a2e2a0c
Commit
3a2e2a0c
authored
Nov 22, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test races TestFSetAttr.
parent
5f26900d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
fuse/fsetattr_test.go
fuse/fsetattr_test.go
+4
-1
No files found.
fuse/fsetattr_test.go
View file @
3a2e2a0c
...
...
@@ -186,23 +186,26 @@ func TestFSetAttr(t *testing.T) {
_
,
err
=
f
.
WriteString
(
"hello"
)
CheckSuccess
(
err
)
sync
()
code
:=
syscall
.
Ftruncate
(
int
(
f
.
Fd
()),
3
)
if
code
!=
nil
{
t
.
Error
(
"truncate retval"
,
os
.
NewSyscallError
(
"Ftruncate"
,
code
))
}
sync
()
if
len
(
fs
.
file
.
data
)
!=
3
{
t
.
Error
(
"truncate"
)
}
err
=
f
.
Chmod
(
024
)
CheckSuccess
(
err
)
sync
()
if
fs
.
file
.
Attr
.
Mode
&
07777
!=
024
{
t
.
Error
(
"chmod"
)
}
err
=
os
.
Chtimes
(
fn
,
time
.
Unix
(
0
,
100e3
),
time
.
Unix
(
0
,
101e3
))
CheckSuccess
(
err
)
sync
()
if
fs
.
file
.
Attr
.
Atimensec
!=
100e3
||
fs
.
file
.
Attr
.
Mtimensec
!=
101e3
{
t
.
Errorf
(
"Utimens: atime %d != 100e3 mtime %d != 101e3"
,
fs
.
file
.
Attr
.
Atimensec
,
fs
.
file
.
Attr
.
Mtimensec
)
...
...
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