mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 05:33:06 +00:00
Only replace the dump file opening function in test
This commit is contained in:
@@ -6,11 +6,11 @@
|
||||
#define BT_COUNT_CHECK_INTERVAL 5
|
||||
|
||||
static int
|
||||
prof_dump_open_intercept(bool propagate_err, const char *filename) {
|
||||
prof_dump_open_file_intercept(const char *filename, int mode) {
|
||||
int fd;
|
||||
|
||||
fd = open("/dev/null", O_WRONLY);
|
||||
expect_d_ne(fd, -1, "Unexpected open() failure");
|
||||
assert_d_ne(fd, -1, "Unexpected open() failure");
|
||||
|
||||
return fd;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ TEST_BEGIN(test_idump) {
|
||||
sizeof(active)), 0,
|
||||
"Unexpected mallctl failure while activating profiling");
|
||||
|
||||
prof_dump_open = prof_dump_open_intercept;
|
||||
prof_dump_open_file = prof_dump_open_file_intercept;
|
||||
|
||||
for (i = 0; i < NTHREADS; i++) {
|
||||
thd_args[i] = i;
|
||||
|
||||
Reference in New Issue
Block a user