Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d0fd3042
Commit
d0fd3042
authored
Dec 29, 2007
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addresses #223
git-svn-id:
file:///svn/tokudb@1421
c7de825b-a66e-492c-adef-691d508d4ae1
parent
6ea4819e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
src/tests/test_cachesize.c
src/tests/test_cachesize.c
+8
-2
No files found.
src/tests/test_cachesize.c
View file @
d0fd3042
...
...
@@ -6,12 +6,18 @@
#include <assert.h>
#include <unistd.h>
#include <string.h>
#include <inttypes.h>
#include <arpa/inet.h>
#include <sys/stat.h>
#include <db.h>
#include "test.h"
void
expect_eq
(
u_int64_t
a
,
u_int64_t
b
)
{
if
(
a
!=
b
)
printf
(
"WARNING: expect %"
PRId64
" got %"
PRId64
"
\n
"
,
a
,
b
);
}
u_int64_t
size_from
(
u_int32_t
gbytes
,
u_int32_t
bytes
)
{
return
((
u_int64_t
)
gbytes
<<
30
)
+
bytes
;
}
...
...
@@ -42,9 +48,9 @@ void test_cachesize() {
r
=
env
->
get_cachesize
(
env
,
&
gbytes
,
&
bytes
,
&
ncache
);
assert
(
r
==
0
);
assert
(
ncache
==
1
);
if
(
s
<=
minsize
)
assert
(
minsize
==
size_from
(
gbytes
,
bytes
));
expect_eq
(
minsize
,
size_from
(
gbytes
,
bytes
));
else
assert
(
s
==
size_from
(
gbytes
,
bytes
));
expect_eq
(
s
,
size_from
(
gbytes
,
bytes
));
s
*=
2
;
size_to
(
s
,
&
gbytes
,
&
bytes
);
}
r
=
env
->
close
(
env
,
0
);
assert
(
r
==
0
);
...
...
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