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
995b283b
Commit
995b283b
authored
Mar 09, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nodefs: use syscall in TestNlinkZero
parent
6fad53e3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
nodefs/simple_test.go
nodefs/simple_test.go
+4
-4
No files found.
nodefs/simple_test.go
View file @
995b283b
...
...
@@ -395,14 +395,14 @@ func TestNlinkZero(t *testing.T) {
t
.
Fatalf
(
"WriteFile: %v"
,
err
)
}
f
,
err
:=
os
.
Open
(
dst
)
f
,
err
:=
syscall
.
Open
(
dst
,
0
,
0
)
if
err
!=
nil
{
t
.
Fatalf
(
"Open: %v"
,
err
)
}
defer
f
.
Close
(
)
defer
syscall
.
Close
(
f
)
var
st
syscall
.
Stat_t
if
err
:=
syscall
.
Fstat
(
int
(
f
.
Fd
())
,
&
st
);
err
!=
nil
{
if
err
:=
syscall
.
Fstat
(
f
,
&
st
);
err
!=
nil
{
t
.
Errorf
(
"Fstat before: %v"
,
err
)
}
else
if
st
.
Nlink
!=
1
{
t
.
Errorf
(
"Nlink of file: got %d, want 1"
,
st
.
Nlink
)
...
...
@@ -412,7 +412,7 @@ func TestNlinkZero(t *testing.T) {
t
.
Fatalf
(
"Rename: %v"
,
err
)
}
if
err
:=
syscall
.
Fstat
(
int
(
f
.
Fd
())
,
&
st
);
err
!=
nil
{
if
err
:=
syscall
.
Fstat
(
f
,
&
st
);
err
!=
nil
{
t
.
Errorf
(
"Fstat after: %v"
,
err
)
}
else
if
st
.
Nlink
!=
0
{
t
.
Errorf
(
"Nlink of overwritten file: got %d, want 0"
,
st
.
Nlink
)
...
...
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