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
Kirill Smelkov
go-fuse
Commits
97aecbbf
Commit
97aecbbf
authored
Dec 07, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
posixtest: fix some lint errors
Change-Id: I15d31de59b4c34caff132bdc7d09ad520d0e68cb
parent
29c89791
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
posixtest/listfds.go
posixtest/listfds.go
+0
-1
posixtest/test.go
posixtest/test.go
+13
-7
No files found.
posixtest/listfds.go
View file @
97aecbbf
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package posixtest file systems for generic posix conformance.
package
posixtest
import
(
...
...
posixtest/test.go
View file @
97aecbbf
...
...
@@ -12,13 +12,13 @@ import (
"os"
"path/filepath"
"runtime"
"sync"
"syscall"
"testing"
"github.com/hanwen/go-fuse/v2/fuse"
)
// All holds a map of all test functions
var
All
=
map
[
string
]
func
(
*
testing
.
T
,
string
){
"AppendWrite"
:
AppendWrite
,
"SymlinkReadlink"
:
SymlinkReadlink
,
...
...
@@ -261,24 +261,30 @@ func ParallelFileOpen(t *testing.T, mnt string) {
t
.
Fatalf
(
"WriteFile: %v"
,
err
)
}
var
wg
sync
.
WaitGroup
N
:=
10
errs
:=
make
(
chan
error
,
N
)
one
:=
func
(
b
byte
)
{
f
,
err
:=
os
.
OpenFile
(
fn
,
os
.
O_RDWR
,
0644
)
if
err
!=
nil
{
t
.
Fatalf
(
"OpenFile: %v"
,
err
)
errs
<-
err
return
}
var
buf
[
10
]
byte
f
.
Read
(
buf
[
:
])
buf
[
0
]
=
b
f
.
WriteAt
(
buf
[
0
:
1
],
2
)
f
.
Close
()
wg
.
Done
()
errs
<-
nil
}
for
i
:=
0
;
i
<
10
;
i
++
{
wg
.
Add
(
1
)
for
i
:=
0
;
i
<
N
;
i
++
{
go
one
(
byte
(
i
))
}
wg
.
Wait
()
for
i
:=
0
;
i
<
N
;
i
++
{
if
e
:=
<-
errs
;
e
!=
nil
{
t
.
Error
(
e
)
}
}
}
func
Link
(
t
*
testing
.
T
,
mnt
string
)
{
...
...
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