Skip to content

Commit fa0c1ba

Browse files
author
MarcoFalke
committed
test: Add imports for util bpf_cflags
This is required for the next commit.
1 parent 82d1e94 commit fa0c1ba

File tree

6 files changed

+30
-10
lines changed

6 files changed

+30
-10
lines changed

test/functional/interface_usdt_coinselection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2022 The Bitcoin Core developers
2+
# Copyright (c) 2022-present The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

@@ -17,6 +17,7 @@
1717
assert_equal,
1818
assert_greater_than,
1919
assert_raises_rpc_error,
20+
bpf_cflags,
2021
)
2122

2223
coinselection_tracepoints_program = """

test/functional/interface_usdt_mempool.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2022 The Bitcoin Core developers
2+
# Copyright (c) 2022-present The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

@@ -20,7 +20,10 @@
2020
from test_framework.messages import COIN, DEFAULT_MEMPOOL_EXPIRY_HOURS
2121
from test_framework.p2p import P2PDataStore
2222
from test_framework.test_framework import BitcoinTestFramework
23-
from test_framework.util import assert_equal
23+
from test_framework.util import (
24+
assert_equal,
25+
bpf_cflags,
26+
)
2427
from test_framework.wallet import MiniWallet
2528

2629
MEMPOOL_TRACEPOINTS_PROGRAM = """

test/functional/interface_usdt_net.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2022 The Bitcoin Core developers
2+
# Copyright (c) 2022-present The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

@@ -17,7 +17,11 @@
1717
from test_framework.messages import CBlockHeader, MAX_HEADERS_RESULTS, msg_headers, msg_version
1818
from test_framework.p2p import P2PInterface
1919
from test_framework.test_framework import BitcoinTestFramework
20-
from test_framework.util import assert_equal, assert_greater_than
20+
from test_framework.util import (
21+
assert_equal,
22+
assert_greater_than,
23+
bpf_cflags,
24+
)
2125

2226
# Tor v3 addresses are 62 chars + 6 chars for the port (':12345').
2327
MAX_PEER_ADDR_LENGTH = 68

test/functional/interface_usdt_utxocache.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2022 The Bitcoin Core developers
2+
# Copyright (c) 2022-present The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

@@ -15,7 +15,10 @@
1515
pass
1616
from test_framework.messages import COIN
1717
from test_framework.test_framework import BitcoinTestFramework
18-
from test_framework.util import assert_equal
18+
from test_framework.util import (
19+
assert_equal,
20+
bpf_cflags,
21+
)
1922
from test_framework.wallet import MiniWallet
2023

2124
utxocache_changes_program = """

test/functional/interface_usdt_validation.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2022 The Bitcoin Core developers
2+
# Copyright (c) 2022-present The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

@@ -18,8 +18,10 @@
1818

1919
from test_framework.address import ADDRESS_BCRT1_UNSPENDABLE
2020
from test_framework.test_framework import BitcoinTestFramework
21-
from test_framework.util import assert_equal
22-
21+
from test_framework.util import (
22+
assert_equal,
23+
bpf_cflags,
24+
)
2325

2426
validation_blockconnected_program = """
2527
#include <uapi/linux/ptrace.h>

test/functional/test_framework/util.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,13 @@ def wait_until_helper_internal(predicate, *, timeout=60, lock=None, timeout_fact
321321
raise AssertionError("Predicate {} not true after {} seconds".format(predicate_source, timeout))
322322

323323

324+
def bpf_cflags():
325+
return [
326+
"-Wno-error=implicit-function-declaration",
327+
"-Wno-duplicate-decl-specifier", # https://github.com/bitcoin/bitcoin/issues/32322
328+
]
329+
330+
324331
def sha256sum_file(filename):
325332
h = hashlib.sha256()
326333
with open(filename, 'rb') as f:

0 commit comments

Comments
 (0)