Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Create Release Build Test #7882

Merged
merged 25 commits into from
Sep 12, 2019
Merged

Create Release Build Test #7882

merged 25 commits into from
Sep 12, 2019

Conversation

kj4ezj
Copy link
Contributor

@kj4ezj kj4ezj commented Sep 10, 2019

Change Description

We have no good way of knowing whether a binary was built with compiler optimizations enabled or not. To address this, I created an integration test which fails when the debug flag is set in nodeos.

While the debug flag does not necessarily indicate whether compiler optimizations were used, this flag does correlate for common build types (debug, release, etc).

Notes

  • This variant of the test runs nodeos for ten seconds, then checks the shared_memory.bin file it creates to determine if the debug byte is set or not.
    • This is different from how the same test on eos:develop works.
  • Though I can write the test to only fail in a CI environment like Buildkite, it currently fails for local debugging builds as well. I know a lot of members of our community build and install EOSIO for production systems from source, and I wanted this test to be able to catch build-type errors for those users despite any inconvenience to our own developers. This test behavior is open to persuasion from any stakeholders.
  • The test provides useful error messages when test prerequisites are not met, and when the test fails.
  • Base-Image changes:
    • The vim-common package is now installed because it includes xxd, which is required for hex dumps.
    • The jq package is now installed (from epel-release on CentOS) to parse JSON output from nodeos.
      • Though this is not required for this variant of this test (it is required for the other variant), it is useful to have in the base-images for manual debugging or for future tests.
  • This test is not being added to release/1.7.x because there is no easy, programmatic way to check for debug symbols prior to release/1.8.x.

See Also

Consensus Changes

  • Consensus Changes
    None.

API Changes

  • API Changes
    None.

Documentation Additions

  • Documentation Additions
    None.

@kj4ezj kj4ezj mentioned this pull request Sep 10, 2019
3 tasks
@kj4ezj kj4ezj marked this pull request as ready for review September 10, 2019 18:13
@swatanabe-b1
Copy link
Contributor

This is not checking for debug symbols. It's checking whether nodeos was built with -DNDEBUG. For performance, the thing that matters most is whether nodeos was built with optimization enabled. The three are usually correlated (Debug = -g vs Release = -DNDEBUG -O3), but they can be set independently.

@kj4ezj
Copy link
Contributor Author

kj4ezj commented Sep 11, 2019

This is not checking for debug symbols. It's checking whether nodeos was built with -DNDEBUG.

Thank you, I have updated the test purpose, description, and messages to accurately reflect what it is doing.

tests/release-build.sh Outdated Show resolved Hide resolved
tests/release-build.sh Outdated Show resolved Hide resolved
tests/release-build.sh Show resolved Hide resolved
@kj4ezj kj4ezj merged commit 57bd078 into release/1.8.x Sep 12, 2019
@kj4ezj kj4ezj deleted the zach-1.8-release-build-test branch September 12, 2019 15:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants