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
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
mariadb
Commits
dddda9d6
Commit
dddda9d6
authored
Jan 07, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#137 fix osx build problem
parent
f64edcc4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
src/tests/CMakeLists.txt
src/tests/CMakeLists.txt
+1
-0
src/tests/env_nproc.cc
src/tests/env_nproc.cc
+4
-8
No files found.
src/tests/CMakeLists.txt
View file @
dddda9d6
...
...
@@ -67,6 +67,7 @@ if(BUILD_TESTING OR BUILD_SRC_TESTS)
dump-env
env_loader_memory
env-put-multiple
env_nproc
env_startup
execute-updates
filesize
...
...
src/tests/env_nproc.cc
View file @
dddda9d6
...
...
@@ -93,8 +93,7 @@ PATENT RIGHTS GRANT:
#include <db.h>
#include <sys/resource.h>
static
int
env_open_close
(
void
)
{
int
result
=
0
;
static
void
env_open_close
(
void
)
{
int
r
;
DB_ENV
*
env
=
NULL
;
...
...
@@ -104,11 +103,9 @@ static int env_open_close(void) {
r
=
env
->
open
(
env
,
TOKU_TEST_FILENAME
,
DB_INIT_LOCK
+
DB_INIT_MPOOL
+
DB_INIT_TXN
+
DB_INIT_LOG
+
DB_CREATE
+
DB_PRIVATE
,
S_IRWXU
+
S_IRWXG
+
S_IRWXO
);
if
(
r
!=
0
)
{
fprintf
(
stderr
,
"%s:%u r=%d
\n
"
,
__FILE__
,
__LINE__
,
r
);
result
=
r
;
}
r
=
env
->
close
(
env
,
0
);
assert
(
r
==
0
);
return
result
;
}
int
test_main
(
int
argc
,
char
*
const
argv
[])
{
...
...
@@ -127,7 +124,7 @@ int test_main (int argc, char * const argv[]) {
}
limit
=
atoi
(
argv
[
i
]);
continue
;
}
}
toku_os_recursive_delete
(
TOKU_TEST_FILENAME
);
r
=
toku_os_mkdir
(
TOKU_TEST_FILENAME
,
S_IRWXU
+
S_IRWXG
+
S_IRWXO
);
...
...
@@ -135,13 +132,12 @@ int test_main (int argc, char * const argv[]) {
struct
rlimit
nproc_rlimit
;
r
=
getrlimit
(
RLIMIT_NPROC
,
&
nproc_rlimit
);
assert
(
r
==
0
);
nproc_rlimit
.
rlim_cur
=
limit
;
r
=
setrlimit
(
RLIMIT_NPROC
,
&
nproc_rlimit
);
assert
(
r
==
0
);
printf
(
"nproc %lu
\n
"
,
nproc_rlimit
.
rlim_cur
);
(
void
)
env_open_close
();
env_open_close
();
return
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