contrib: Add test for ELF symbol-check #20476

pull laanwj wants to merge 2 commits into bitcoin:master from laanwj:2020_11_test_symbol_check changing 3 files +129 −0
  1. laanwj commented at 12:20 pm on November 24, 2020: member

    Check both failure cases:

    • Use a glibc symbol from a version that is too new
    • Use a symbol from a library that is not in the allowlist

    And also check a conforming binary.

    Adding a similar check for Windows PE can be done in a separate PR.

  2. laanwj added the label Tests on Nov 24, 2020
  3. laanwj added the label Scripts and tools on Nov 24, 2020
  4. in contrib/devtools/test-symbol-check.py:31 in afc20c234f outdated
    26+        # there's no way to do this test for RISC-V at the moment; bionic's libc is 2.27
    27+        # and we allow all symbols from 2.27.
    28+        if 'riscv' in get_machine(cc):
    29+            self.skipTest("test not available for RISC-V")
    30+
    31+        # emfd_create was introduced in GLIBC 2.27, so is newer than the upper limit of
    


    fanquake commented at 9:50 am on November 30, 2020:
    s/emfd_create/memfd_create
  5. fanquake commented at 9:54 am on November 30, 2020: member
    Concept ACK - thanks for putting this together. Will actually test shortly.
  6. fanquake added the label Needs gitian build on Nov 30, 2020
  7. fanquake commented at 10:04 am on December 2, 2020: member
    I added a test for macOS if you wanted to pull that in as well: https://github.com/fanquake/bitcoin/commit/9e6e59b01e1e4e3325bab59cf97139b462b42651.
  8. DrahtBot commented at 1:28 pm on December 2, 2020: member

    Gitian builds

    File commit f17e8ba3a17b6516a1b1fb7f45d506a339e99f90(master) commit 58120ed529ce61f9e09bdfe52fcebad03950b874(master and this pull)
    bitcoin-core-linux-22-res.yml 6f0b719c784eefe4... 55a00a6e623803dc...
    bitcoin-core-osx-22-res.yml e4d32d3c0842638c... aa14c0ca3ce99331...
    bitcoin-core-win-22-res.yml 56db8c3b379f620c... 4b619f8a164f9262...
    *-aarch64-linux-gnu-debug.tar.gz 4c8388193af8a61e... 8c9337c0cdd2cc9f...
    *-aarch64-linux-gnu.tar.gz 1835e3b9ae2ec936... bf60e150e5709440...
    *-arm-linux-gnueabihf-debug.tar.gz fbc6bac8916983ea... eacb8039b37bc5e5...
    *-arm-linux-gnueabihf.tar.gz e7cfe2f2cdffaf3b... 1e0db55d171e6a30...
    *-osx-unsigned.dmg e781b8468665316d... f9304c7e594bf969...
    *-osx64.tar.gz 35c3793544745d8a... 1d5170d14bf24676...
    *-riscv64-linux-gnu-debug.tar.gz 941c0cea0da48faa... 4ee7bfca69772615...
    *-riscv64-linux-gnu.tar.gz 37c303be1611e51c... 5ae21c1c4998aadf...
    *-win64-debug.zip 66de372db25058b4... b54ed786ad75109b...
    *-win64-setup-unsigned.exe 4b6c333acd3f9cba... 2405901747f545b6...
    *-win64.zip 1173f4205ab9a460... e3f2e95699e8e89d...
    *-x86_64-linux-gnu-debug.tar.gz 816ba486d4fe35ab... a845822e431f9626...
    *-x86_64-linux-gnu.tar.gz b4ce0ce1137cc11f... 7570a844384fe303...
    *.tar.gz 161acebcdfc94552... 106717564a806f45...
    linux-build.log f43d56b96440d9eb... 58e03fbd38ecfa64...
    osx-build.log 2b6266bbc3875f3e... 2d9018917095b586...
    win-build.log 8d1eb99e0ca0cb32... e7e1c919de0a5c1b...
    bitcoin-core-linux-22-res.yml.diff 3cf2077e2009bce0...
    bitcoin-core-osx-22-res.yml.diff d54f1aad8f823e10...
    bitcoin-core-win-22-res.yml.diff 4fcda02450718fe2...
    linux-build.log.diff 8ced788bea660ef8...
    osx-build.log.diff b3e0bc4bcfb475dc...
    win-build.log.diff c240bd4de2f025e3...
  9. DrahtBot removed the label Needs gitian build on Dec 2, 2020
  10. contrib: Add test for ELF symbol-check
    Check both failure cases:
    - Use a glibc symbol from a version that is too new
    - Use a symbol from a library that is not in the allowlist
    
    And also check a conforming binary.
    
    Adding a similar check for Windows PE can be done in a separate PR.
    5bab08df17
  11. contrib: add MACHO tests to symbol-check tests ed1bbcefea
  12. laanwj force-pushed on Dec 3, 2020
  13. laanwj commented at 11:17 am on December 3, 2020: member

    I added a test for macOS if you wanted to pull that in as well: fanquake@9e6e59b.

    Thanks ! I didn’t mention macOS in the OP because I (mistakenly) thought we only had a symbol check for windows and linux. Good to have a test for that too.

    I’ve fixed the comment and cherry-picked that commit.

  14. laanwj closed this on Dec 3, 2020

  15. laanwj reopened this on Dec 3, 2020

  16. laanwj commented at 11:13 pm on December 3, 2020: member
    (close/ropen was to test the IRC bot)
  17. fanquake approved
  18. fanquake commented at 7:33 am on December 7, 2020: member
    ACK ed1bbcefeaafef460b6e5609de85e13c12e0d2a4
  19. fanquake merged this on Dec 7, 2020
  20. fanquake closed this on Dec 7, 2020

  21. sidhujag referenced this in commit 5c42906277 on Dec 7, 2020
  22. fanquake referenced this in commit 054710615c on Dec 10, 2020
  23. sidhujag referenced this in commit bb1ae294fc on Dec 10, 2020
  24. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 21:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me