test: Fix CLI_MAX_ARG_SIZE issues

This commit is contained in:
MarcoFalke committed 2025-08-26 13:20:19 +02:00
1 parent 73220fc0f9
commit facfde2cdc
2 files changed
+20 -4

No files matched your search

+7
View File
@@ -30,6 +30,13 @@ class RpcMiscTest(BitcoinTestFramework):
lambda: node.echo(arg9='trigger_internal_bug'),
)
self.log.info("test max arg size")
ARG_SZ_COMMON = 131071 # Common limit, used previously in the test framework, serves as a regression test
ARG_SZ_LARGE = 8 * 1024 * 1024 # A large size, which should be rare to hit in practice
for arg_sz in [0, 1, 100, ARG_SZ_COMMON, ARG_SZ_LARGE]:
arg_string = 'a' * arg_sz
assert_equal([arg_string, arg_string], node.echo(arg_string, arg_string))
self.log.info("test getmemoryinfo")
memory = node.getmemoryinfo()['locked']
assert_greater_than(memory['used'], 0)