From 0fdbcf4c3ca5fe91f735f9a4cb2c630af76781c4 Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Wed, 14 Aug 2024 11:18:04 -0400 Subject: [PATCH] Add a test for debuginfo generation 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 Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/25174) --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ecd5c233387..2fa7964fc47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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' }} -- 2.47.2