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
0bc289ec
Commit
0bc289ec
authored
Aug 11, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some more mtime assertions.
parent
d6e247cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
samples/memfs/memfs_test.go
samples/memfs/memfs_test.go
+5
-5
No files found.
samples/memfs/memfs_test.go
View file @
0bc289ec
...
@@ -142,7 +142,7 @@ func (t *MemFSTest) Mkdir_OneLevel() {
...
@@ -142,7 +142,7 @@ func (t *MemFSTest) Mkdir_OneLevel() {
fi
,
err
=
os
.
Stat
(
t
.
Dir
)
fi
,
err
=
os
.
Stat
(
t
.
Dir
)
AssertEq
(
nil
,
err
)
AssertEq
(
nil
,
err
)
Expect
Eq
(
0
,
fi
.
ModTime
()
.
Sub
(
createTime
))
Expect
That
(
fi
,
fusetesting
.
MtimeIsWithin
(
createTime
,
timeSlop
))
// Read the directory.
// Read the directory.
entries
,
err
=
fusetesting
.
ReadDirPicky
(
dirName
)
entries
,
err
=
fusetesting
.
ReadDirPicky
(
dirName
)
...
@@ -197,7 +197,7 @@ func (t *MemFSTest) Mkdir_TwoLevels() {
...
@@ -197,7 +197,7 @@ func (t *MemFSTest) Mkdir_TwoLevels() {
// Check the parent's mtime.
// Check the parent's mtime.
fi
,
err
=
os
.
Stat
(
path
.
Join
(
t
.
Dir
,
"parent"
))
fi
,
err
=
os
.
Stat
(
path
.
Join
(
t
.
Dir
,
"parent"
))
AssertEq
(
nil
,
err
)
AssertEq
(
nil
,
err
)
Expect
Eq
(
0
,
fi
.
ModTime
()
.
Sub
(
createTime
))
Expect
That
(
fi
,
fusetesting
.
MtimeIsWithin
(
createTime
,
timeSlop
))
// Read the directory.
// Read the directory.
entries
,
err
=
fusetesting
.
ReadDirPicky
(
path
.
Join
(
t
.
Dir
,
"parent/dir"
))
entries
,
err
=
fusetesting
.
ReadDirPicky
(
path
.
Join
(
t
.
Dir
,
"parent/dir"
))
...
@@ -561,7 +561,7 @@ func (t *MemFSTest) Rmdir_Empty() {
...
@@ -561,7 +561,7 @@ func (t *MemFSTest) Rmdir_Empty() {
// Check the parent's mtime.
// Check the parent's mtime.
fi
,
err
:=
os
.
Stat
(
path
.
Join
(
t
.
Dir
,
"foo"
))
fi
,
err
:=
os
.
Stat
(
path
.
Join
(
t
.
Dir
,
"foo"
))
AssertEq
(
nil
,
err
)
AssertEq
(
nil
,
err
)
Expect
Eq
(
0
,
fi
.
ModTime
()
.
Sub
(
rmTime
))
Expect
That
(
fi
,
fusetesting
.
MtimeIsWithin
(
rmTime
,
timeSlop
))
// Remove the parent.
// Remove the parent.
err
=
os
.
Remove
(
path
.
Join
(
t
.
Dir
,
"foo"
))
err
=
os
.
Remove
(
path
.
Join
(
t
.
Dir
,
"foo"
))
...
@@ -619,7 +619,7 @@ func (t *MemFSTest) Rmdir_OpenedForReading() {
...
@@ -619,7 +619,7 @@ func (t *MemFSTest) Rmdir_OpenedForReading() {
fi
,
err
:=
f
.
Stat
()
fi
,
err
:=
f
.
Stat
()
ExpectEq
(
"dir"
,
fi
.
Name
())
ExpectEq
(
"dir"
,
fi
.
Name
())
Expect
Eq
(
0
,
fi
.
ModTime
()
.
Sub
(
createTime
))
Expect
That
(
fi
,
fusetesting
.
MtimeIsWithin
(
createTime
,
timeSlop
))
ExpectEq
(
0
,
fi
.
Sys
()
.
(
*
syscall
.
Stat_t
)
.
Nlink
)
ExpectEq
(
0
,
fi
.
Sys
()
.
(
*
syscall
.
Stat_t
)
.
Nlink
)
// Attempt to read from the directory. This shouldn't see any junk from the
// Attempt to read from the directory. This shouldn't see any junk from the
...
@@ -1018,7 +1018,7 @@ func (t *MemFSTest) Chtimes() {
...
@@ -1018,7 +1018,7 @@ func (t *MemFSTest) Chtimes() {
// Stat it.
// Stat it.
fi
,
err
:=
os
.
Stat
(
fileName
)
fi
,
err
:=
os
.
Stat
(
fileName
)
AssertEq
(
nil
,
err
)
AssertEq
(
nil
,
err
)
Expect
Eq
(
0
,
fi
.
ModTime
()
.
Sub
(
expectedMtime
))
Expect
That
(
fi
,
fusetesting
.
MtimeIsWithin
(
expectedMtime
,
timeSlop
))
}
}
func
(
t
*
MemFSTest
)
ReadDirWhileModifying
()
{
func
(
t
*
MemFSTest
)
ReadDirWhileModifying
()
{
...
...
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