]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Add a test for debuginfo generation
authorNeil Horman <nhorman@openssl.org>
Wed, 14 Aug 2024 15:18:04 +0000 (11:18 -0400)
committerTomas Mraz <tomas@openssl.org>
Wed, 21 Aug 2024 13:50:17 +0000 (15:50 +0200)
Add a check to ensure debug info generation works.

We piggyback on a test that already builds DWARF symbols (--debug)
The test
1) makes the debuginfo files
2) runs gdb, loading the libcrypto.so.3 file
3) Check to make sure that the output of gdb indicates that it loads the
   .debug file base on the reference in the loaded file

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25174)

.github/workflows/ci.yml

index ecd5c233387ec1954bc1f11a211a220c98da4eb9..2fa7964fc478dffc8c5549dbed40cffe10c6df94 100644 (file)
@@ -573,7 +573,7 @@ jobs:
     - name: package installs
       run: |
         sudo apt-get update
-        sudo apt-get -yq install bison gettext keyutils ldap-utils libldap2-dev libkeyutils-dev python3 python3-paste python3-pyrad slapd tcsh python3-virtualenv virtualenv python3-kdcproxy
+        sudo apt-get -yq install bison gettext keyutils ldap-utils libldap2-dev libkeyutils-dev python3 python3-paste python3-pyrad slapd tcsh python3-virtualenv virtualenv python3-kdcproxy gdb
     - name: install cpanm and Test2::V0 for gost_engine testing
       uses: perl-actions/install-with-cpanm@stable
       with:
@@ -596,6 +596,11 @@ jobs:
       run: make test TESTS="test_external_tlsfuzzer"
     - name: test external oqs-provider
       run: make test TESTS="test_external_oqsprovider"
+    - name: test ability to produce debuginfo files
+      run: |
+        make debuginfo
+        gdb < <(echo -e "file ./libcrypto.so.3\nquit") > ./results
+        grep -q "Reading symbols from.*libcrypto\.so\.3\.debug" results
 
   external-test-pyca:
     runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }}