diff options
author | Ava Chow <github@achow101.com> | 2024-12-17 13:06:08 -0500 |
---|---|---|
committer | Ava Chow <github@achow101.com> | 2024-12-17 13:06:08 -0500 |
commit | 6db725662d9edff275abfac6ef3827ebec882f66 (patch) | |
tree | bee7b09350bfb9c77079e0a2e449093ef00eb944 /test/functional/interface_usdt_net.py | |
parent | d6b225f1652526cb053ec32c8ff09160d5a759c5 (diff) | |
parent | 5576618152aff0358aeb1c5189422882b419de2d (diff) |
Merge bitcoin/bitcoin#31469: [28.x] 28.1rc2 backportsv28.1rc2
5576618152aff0358aeb1c5189422882b419de2d doc: update release notes for 28.1rc2 (Ava Chow)
01fe07a2cea07b6e72a33a5d230ec16118b9a26b examples: Generate example bitcoin.conf (Ava Chow)
7ddfcf32da7a0bfb40bc3b4f5d28ac078fd1c5d7 doc: Generate manpages (Ava Chow)
e0b27b234cb31f53ddd51a923d8f5d0a30f92375 build: Bump to 28.1rc2 (Ava Chow)
bdc6b3e531a107c52d73f72ddf788114381e241c Add release note for #31223 (Martin Zumsande)
a0585b6087ac2f3e54efa50795cba83caeac5ab0 test: add functional test for -port behavior (Martin Zumsande)
bbde830b97000b8bbfbaefc54504f659a34f651c net, init: derive default onion port if a user specified a -port (Martin Zumsande)
227642d5afeb9918269192500d1a41bcb64b51c5 test: fix MIN macro-redefinition (0xb10c)
b8112cf4226265a5b43e2b556ce9fa97caf3c28a util: use explicit cast in MultiIntBitSet::Fill() (Vasil Dimov)
2835158be0410fe82a56752d9ffe60e2a77dc0cd fuzz: add cstdlib to FuzzedDataProvider (fanquake)
Pull request description:
Backports:
* #31223
* #31448
* #31431
* #31419
ACKs for top commit:
hodlinator:
re-ACK 5576618152aff0358aeb1c5189422882b419de2d
Tree-SHA512: f99f3c5960f18f6894832c5f9a827f97fd3c6e086670341760ce1b77c304d53136492371c59148f3b4bbcfe2d5428c835fe632c61b229b40f1f6f6cf2b72cdca
Diffstat (limited to 'test/functional/interface_usdt_net.py')
-rwxr-xr-x | test/functional/interface_usdt_net.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/interface_usdt_net.py b/test/functional/interface_usdt_net.py index 7b55259b63..5468ddf858 100755 --- a/test/functional/interface_usdt_net.py +++ b/test/functional/interface_usdt_net.py @@ -40,7 +40,8 @@ net_tracepoints_program = """ MAX_MSG_TYPE_LENGTH, MAX_MSG_DATA_LENGTH ) + """ -#define MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; }) +// A min() macro. Prefixed with _TRACEPOINT_TEST to avoid collision with other MIN macros. +#define _TRACEPOINT_TEST_MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; }) struct p2p_message { @@ -60,7 +61,7 @@ int trace_inbound_message(struct pt_regs *ctx) { bpf_usdt_readarg_p(3, ctx, &msg.peer_conn_type, MAX_PEER_CONN_TYPE_LENGTH); bpf_usdt_readarg_p(4, ctx, &msg.msg_type, MAX_MSG_TYPE_LENGTH); bpf_usdt_readarg(5, ctx, &msg.msg_size); - bpf_usdt_readarg_p(6, ctx, &msg.msg, MIN(msg.msg_size, MAX_MSG_DATA_LENGTH)); + bpf_usdt_readarg_p(6, ctx, &msg.msg, _TRACEPOINT_TEST_MIN(msg.msg_size, MAX_MSG_DATA_LENGTH)); inbound_messages.perf_submit(ctx, &msg, sizeof(msg)); return 0; } @@ -73,7 +74,7 @@ int trace_outbound_message(struct pt_regs *ctx) { bpf_usdt_readarg_p(3, ctx, &msg.peer_conn_type, MAX_PEER_CONN_TYPE_LENGTH); bpf_usdt_readarg_p(4, ctx, &msg.msg_type, MAX_MSG_TYPE_LENGTH); bpf_usdt_readarg(5, ctx, &msg.msg_size); - bpf_usdt_readarg_p(6, ctx, &msg.msg, MIN(msg.msg_size, MAX_MSG_DATA_LENGTH)); + bpf_usdt_readarg_p(6, ctx, &msg.msg, _TRACEPOINT_TEST_MIN(msg.msg_size, MAX_MSG_DATA_LENGTH)); outbound_messages.perf_submit(ctx, &msg, sizeof(msg)); return 0; }; |