Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relax eosvmoc_limits_test's generated_code_size_limit pass/fail criteria; reenable test in exhaustive LLVM workflow #902

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/llvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
cmake -S src -B build -DCMAKE_BUILD_TYPE=Release -GNinja
cmake --build build
- name: Test spring
run: ctest --test-dir build -j $(nproc) --output-on-failure -LE "(nonparallelizable_tests|long_running_tests)" -E eosvmoc_limits_unit_test_eos-vm-oc --timeout 480
run: ctest --test-dir build -j $(nproc) --output-on-failure -LE "(nonparallelizable_tests|long_running_tests)" --timeout 480
11 changes: 6 additions & 5 deletions unittests/eosvmoc_limits_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,14 @@ BOOST_AUTO_TEST_CASE( stack_limit ) { try {
BOOST_AUTO_TEST_CASE( generated_code_size_limit ) { try {
eosvmoc::config eosvmoc_config = make_eosvmoc_config_without_limits();

// The generated code size of the compiled WASM in the test is 36856.
// Set generated_code_size_limit to the actual generated code size
eosvmoc_config.generated_code_size_limit = 36856;
// Generated code size can vary based on the version of LLVM in use. Since this test
// isn't intended to detect minute differences or regressions, give the range a wide
// berth to work on. As a single data point, LLVM11 used in reproducible builds during
// Spring 1.0 timeframe was 36856
eosvmoc_config.generated_code_size_limit = 20*1024;
limit_violated_test(eosvmoc_config);

// Set generated_code_size_limit to one above the actual generated code size
eosvmoc_config.generated_code_size_limit = 36857;
eosvmoc_config.generated_code_size_limit = 40*1024;
limit_not_violated_test(eosvmoc_config);
} FC_LOG_AND_RETHROW() }

Expand Down