From 15075eb7517f45872739785569522a5fa960e0af Mon Sep 17 00:00:00 2001 From: Keenan Gugeler Date: Sun, 2 Jun 2024 17:44:17 -0400 Subject: [PATCH] testsuite/check_memory_limit: increase memory usage FreeBSD memory accounting is not very accurate - increasing the memory usage should make this test more robust. --- testsuite/check_memory_limit/checker.py | 2 +- testsuite/check_memory_limit/tests/c_blank/test.yml | 2 +- .../check_memory_limit/tests/cpp_too_much_memory/bloat.cpp | 2 +- testsuite/check_memory_limit/tests/cpp_too_much_memory/test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/testsuite/check_memory_limit/checker.py b/testsuite/check_memory_limit/checker.py index 83617d52b..36bcc37e8 100644 --- a/testsuite/check_memory_limit/checker.py +++ b/testsuite/check_memory_limit/checker.py @@ -3,7 +3,7 @@ def check(process_output: bytes, judge_output: bytes, *, result: Result, **kwargs) -> bool: - if result.max_memory > 16384: + if result.max_memory > 65536: return False return standard.check(process_output, judge_output, result=result, **kwargs) diff --git a/testsuite/check_memory_limit/tests/c_blank/test.yml b/testsuite/check_memory_limit/tests/c_blank/test.yml index 8d9dba7cc..3bed97cb6 100644 --- a/testsuite/check_memory_limit/tests/c_blank/test.yml +++ b/testsuite/check_memory_limit/tests/c_blank/test.yml @@ -1,5 +1,5 @@ language: C time: 2 -memory: 65536 +memory: 262144 source: empty.c expect: AC diff --git a/testsuite/check_memory_limit/tests/cpp_too_much_memory/bloat.cpp b/testsuite/check_memory_limit/tests/cpp_too_much_memory/bloat.cpp index 1819ea583..c5eed5de5 100644 --- a/testsuite/check_memory_limit/tests/cpp_too_much_memory/bloat.cpp +++ b/testsuite/check_memory_limit/tests/cpp_too_much_memory/bloat.cpp @@ -1,6 +1,6 @@ #pragma GCC optimize "O0" -const int MN = 25 * 1024 * 1024; +const int MN = 100 * 1024 * 1024; char arr[MN]; int main() { diff --git a/testsuite/check_memory_limit/tests/cpp_too_much_memory/test.yml b/testsuite/check_memory_limit/tests/cpp_too_much_memory/test.yml index 65d4c9f51..8db427201 100644 --- a/testsuite/check_memory_limit/tests/cpp_too_much_memory/test.yml +++ b/testsuite/check_memory_limit/tests/cpp_too_much_memory/test.yml @@ -1,5 +1,5 @@ language: CPP11 time: 2 -memory: 65536 +memory: 262144 source: bloat.cpp expect: WA