forked from rr-debugger/rr
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Disable netlink mmap feature since it creates nondeterminism
- Loading branch information
1 parent
01dd3e7
commit e62c972
Showing
4 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* -*- Mode: C; tab-width: 8; c-basic-offset: 2; indent-tabs-mode: nil; -*- */ | ||
|
||
#include "util.h" | ||
|
||
int main(void) { | ||
int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); | ||
int ret; | ||
unsigned int block_size = 16 * getpagesize(); | ||
struct nl_mmap_req req = { | ||
.nm_block_size = block_size, | ||
.nm_block_nr = 64, | ||
.nm_frame_size = 16384, | ||
.nm_frame_nr = 64 * block_size / 16384, | ||
}; | ||
|
||
if (sock < 0) { | ||
atomic_puts("Can't create netlink socket"); | ||
atomic_puts("EXIT-SUCCESS"); | ||
return 0; | ||
} | ||
|
||
ret = setsockopt(sock, SOL_NETLINK, NETLINK_RX_RING, &req, sizeof(req)); | ||
test_assert(ret < 0 && errno == ENOPROTOOPT); | ||
ret = setsockopt(sock, SOL_NETLINK, NETLINK_TX_RING, &req, sizeof(req)); | ||
test_assert(ret < 0 && errno == ENOPROTOOPT); | ||
|
||
atomic_puts("EXIT-SUCCESS"); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters