Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-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
jacobsa-fuse
Commits
fbd48a37
Commit
fbd48a37
authored
Sep 16, 2019
by
Michael Stapelberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix/skip tests for Go 1.13
See
https://golang.org/doc/go1.13#os
for the corresponding change.
parent
90d93355
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
samples/memfs/memfs_test.go
samples/memfs/memfs_test.go
+2
-7
samples/memfs/posix_test.go
samples/memfs/posix_test.go
+3
-0
No files found.
samples/memfs/memfs_test.go
View file @
fbd48a37
...
...
@@ -775,7 +775,7 @@ func (t *MemFSTest) WriteAtDoesntChangeOffset_AppendMode() {
// Create a file in append mode.
f
,
err
:=
os
.
OpenFile
(
path
.
Join
(
t
.
Dir
,
"foo"
),
os
.
O_RDWR
|
os
.
O_
APPEND
|
os
.
O_
CREATE
,
os
.
O_RDWR
|
os
.
O_CREATE
,
0600
)
t
.
ToClose
=
append
(
t
.
ToClose
,
f
)
...
...
@@ -851,11 +851,6 @@ func (t *MemFSTest) AppendMode() {
AssertEq
(
nil
,
err
)
ExpectEq
(
13
,
off
)
// A random write should still work, without updating the offset.
n
,
err
=
f
.
WriteAt
([]
byte
(
"H"
),
0
)
AssertEq
(
nil
,
err
)
AssertEq
(
1
,
n
)
off
,
err
=
getFileOffset
(
f
)
AssertEq
(
nil
,
err
)
ExpectEq
(
13
,
off
)
...
...
@@ -873,7 +868,7 @@ func (t *MemFSTest) AppendMode() {
// So we allow either the POSIX result or the Linux result.
n
,
err
=
f
.
ReadAt
(
buf
,
0
)
AssertEq
(
io
.
EOF
,
err
)
ExpectThat
(
string
(
buf
[
:
n
]),
AnyOf
(
"
H
ello, world!"
,
"Jello, world!H"
))
ExpectThat
(
string
(
buf
[
:
n
]),
AnyOf
(
"
J
ello, world!"
,
"Jello, world!H"
))
}
func
(
t
*
MemFSTest
)
ReadsPastEndOfFile
()
{
...
...
samples/memfs/posix_test.go
View file @
fbd48a37
...
...
@@ -167,6 +167,7 @@ func (t *PosixTest) WriteStartsPastEndOfFile() {
}
func
(
t
*
PosixTest
)
WriteStartsPastEndOfFile_AppendMode
()
{
return
// WriteAt on O_APPEND files returns an error starting with Go 1.13
var
err
error
var
n
int
...
...
@@ -237,6 +238,7 @@ func (t *PosixTest) WriteAtDoesntChangeOffset_NotAppendMode() {
}
func
(
t
*
PosixTest
)
WriteAtDoesntChangeOffset_AppendMode
()
{
return
// WriteAt on O_APPEND files returns an error starting with Go 1.13
var
err
error
var
n
int
...
...
@@ -269,6 +271,7 @@ func (t *PosixTest) WriteAtDoesntChangeOffset_AppendMode() {
}
func
(
t
*
PosixTest
)
AppendMode
()
{
return
// WriteAt on O_APPEND files returns an error starting with Go 1.13
var
err
error
var
n
int
var
off
int64
...
...
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