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
81a0bd26
Commit
81a0bd26
authored
Sep 09, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some test bugs.
parent
27a92177
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
samples/statfs/statfs_test.go
samples/statfs/statfs_test.go
+7
-2
No files found.
samples/statfs/statfs_test.go
View file @
81a0bd26
...
...
@@ -103,6 +103,11 @@ func df(dir string) (capacity, used, available uint64, err error) {
return
}
// Scale appropriately based on the BLOCKSIZE set above.
capacity
*=
1024
used
*=
1024
available
*=
1024
return
}
...
...
@@ -220,7 +225,7 @@ func (t *StatFSTest) CapacityAndFreeSpace() {
}
// Check that df agrees with us about a range of block sizes.
for
log2BlockSize
:=
uint
(
9
);
log2BlockSize
<
31
;
log2BlockSize
++
{
for
log2BlockSize
:=
uint
(
9
);
log2BlockSize
<
=
17
;
log2BlockSize
++
{
bs
:=
uint64
(
1
)
<<
log2BlockSize
desc
:=
fmt
.
Sprintf
(
"block size: %d (2^%d)"
,
bs
,
log2BlockSize
)
...
...
@@ -233,7 +238,7 @@ func (t *StatFSTest) CapacityAndFreeSpace() {
AssertEq
(
nil
,
err
)
ExpectEq
(
bs
*
canned
.
Blocks
,
capacity
,
"%s"
,
desc
)
ExpectEq
(
bs
*
(
canned
.
Blocks
-
canned
.
Blocks
Availabl
e
),
used
,
"%s"
,
desc
)
ExpectEq
(
bs
*
(
canned
.
Blocks
-
canned
.
Blocks
Fre
e
),
used
,
"%s"
,
desc
)
ExpectEq
(
bs
*
canned
.
BlocksAvailable
,
available
,
"%s"
,
desc
)
}
}
...
...
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