diff mbox series

rpm-sequoia: add ptest

Message ID 20250505101642.9255-2-ines.kchelfi@smile.fr
State Accepted, archived
Commit 16499cf903718e6bf022a13baa09df610cd43d62
Headers show
Series rpm-sequoia: add ptest | expand

Commit Message

Ines KCHELFI May 5, 2025, 10:16 a.m. UTC
From: Ines KCHELFI <ines.kchelfi@smile.fr>

In rpm-sequoia, some default paths in test code (OUT_DIR,
CARGO_MANIFEST_DIR) are invalid at runtime and cause test failures.

To fix this, patch the test code (symbols.rs) to support overriding these
paths via optional environment variables: FORCE_RUNTIME_PATH_LIB and
FORCE_RUNTIME_PATH_SRC.

Also patch the libray name to match what is installed.

Tests take less than a second so this is added to PTEST_FAST.

ptest result:
|root@qemux86-64:~# ptest-runner rpm-sequoia
|START: ptest-runner
|2025-05-02T15:57
|BEGIN: /usr/lib/rpm-sequoia/ptest
|
|running 1 test
|test symbols ... ok
|
|test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
|
|
|running 2 tests
|test tests::merge_certs_mismatch ... ok
|test tests::merge_certs ... ok
|
|test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
|
|DURATION: 0
|END: /usr/lib/rpm-sequoia/ptest
|2025-05-02T15:57
|STOP: ptest-runner
|TOTAL: 1 FAIL: 0

Signed-off-by: Ines KCHELFI <ines.kchelfi@smile.fr>
---
 .../distro/include/ptest-packagelists.inc     |  1 +
 ...-librpm_sequoia.so.1-instead-of-libr.patch | 29 +++++++++++++++
 ...-vars-to-force-runtime-paths-in-test.patch | 35 +++++++++++++++++++
 .../rpm-sequoia/rpm-sequoia_1.7.0.bb          | 23 ++++++++++--
 4 files changed, 86 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-devtools/rpm-sequoia/files/0001-Force-the-use-of-librpm_sequoia.so.1-instead-of-libr.patch
 create mode 100644 meta/recipes-devtools/rpm-sequoia/files/0001-Use-optional-env-vars-to-force-runtime-paths-in-test.patch

Comments

Alexander Kanavin May 5, 2025, 4:51 p.m. UTC | #1
On Mon, 5 May 2025 at 12:17, ines.kchelfi via lists.openembedded.org
<ines.kchelfi=smile.fr@lists.openembedded.org> wrote:
> Also patch the libray name to match what is installed.
> +Subject: [PATCH] Force the use of librpm_sequoia.so.1 instead of librpm_sequoia.so
> +-        lib.push("librpm_sequoia.so");
> ++        lib.push("librpm_sequoia.so.1");

Rather than do this, how about making -ptest package RDEPEND on -dev
package (which contains the unversioned symlink to the library)?

Alex
Mathieu Dubois-Briand May 6, 2025, 6:43 a.m. UTC | #2
On Mon May 5, 2025 at 12:16 PM CEST, ines.kchelfi via lists.openembedded.org wrote:
> From: Ines KCHELFI <ines.kchelfi@smile.fr>
>
> In rpm-sequoia, some default paths in test code (OUT_DIR,
> CARGO_MANIFEST_DIR) are invalid at runtime and cause test failures.
>
> To fix this, patch the test code (symbols.rs) to support overriding these
> paths via optional environment variables: FORCE_RUNTIME_PATH_LIB and
> FORCE_RUNTIME_PATH_SRC.
>
> Also patch the libray name to match what is installed.
>
> Tests take less than a second so this is added to PTEST_FAST.
>
> ptest result:
> |root@qemux86-64:~# ptest-runner rpm-sequoia
> |START: ptest-runner
> |2025-05-02T15:57
> |BEGIN: /usr/lib/rpm-sequoia/ptest
> |
> |running 1 test
> |test symbols ... ok
> |
> |test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
> |
> |
> |running 2 tests
> |test tests::merge_certs_mismatch ... ok
> |test tests::merge_certs ... ok
> |
> |test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
> |
> |DURATION: 0
> |END: /usr/lib/rpm-sequoia/ptest
> |2025-05-02T15:57
> |STOP: ptest-runner
> |TOTAL: 1 FAIL: 0
>
> Signed-off-by: Ines KCHELFI <ines.kchelfi@smile.fr>
> ---

Hi Ines,

Thanks for your patch.

It looks like some of these ptests are not running correctly on the autobuilder:

WARNING: core-image-ptest-rpm-sequoia-1.0-r0 do_testimage: There were failing ptests.
Traceback (most recent call last):
  File "/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f
    return func(*args, **kwargs)
  File "/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f
    return func(*args, **kwargs)
  File "/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f
    return func(*args, **kwargs)
  File "/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/runtime/cases/ptest.py", line 27, in test_ptestrunner_expectfail
    self.do_ptestrunner()
  File "/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/runtime/cases/ptest.py", line 120, in do_ptestrunner
    self.fail(failmsg)
AssertionError:
ptests which had no test results:
['rpm-sequoia']

https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/1434
https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/1437

Details about the ptests can be found in:

https://valkyrie.yocto.io/pub/non-release/20250505-91/testresults/qemuarm64-ptest/core-image-ptest-rpm-sequoia/
https://valkyrie.yocto.io/pub/non-release/20250505-91/testresults/qemux86-64-ptest/core-image-ptest-rpm-sequoia/

Can you have a look at the issue please?
Yoann Congal May 7, 2025, 10:05 p.m. UTC | #3
Le lun. 5 mai 2025 à 18:51, Alexander Kanavin via lists.openembedded.org
<alex.kanavin=gmail.com@lists.openembedded.org> a écrit :

> On Mon, 5 May 2025 at 12:17, ines.kchelfi via lists.openembedded.org
> <ines.kchelfi=smile.fr@lists.openembedded.org> wrote:
> > Also patch the libray name to match what is installed.
> > +Subject: [PATCH] Force the use of librpm_sequoia.so.1 instead of
> librpm_sequoia.so
> > +-        lib.push("librpm_sequoia.so");
> > ++        lib.push("librpm_sequoia.so.1");
>
> Rather than do this, how about making -ptest package RDEPEND on -dev
> package (which contains the unversioned symlink to the library)?
>

We tried that at some point but changed to this patch because it forces the
recipe to use:
  INSANE_SKIP:${PN}-ptest += "dev-deps"
That feels less "clean" but a lot more maintainable.
We will send a v2 with that.

Thanks!


> Alex
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#216016):
> https://lists.openembedded.org/g/openembedded-core/message/216016
> Mute This Topic: https://lists.openembedded.org/mt/112626601/4316185
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> yoann.congal@smile.fr]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Yoann Congal May 7, 2025, 10:14 p.m. UTC | #4
Le mar. 6 mai 2025 à 08:43, Mathieu Dubois-Briand via lists.openembedded.org
<mathieu.dubois-briand=bootlin.com@lists.openembedded.org> a écrit :

> On Mon May 5, 2025 at 12:16 PM CEST, ines.kchelfi via
> lists.openembedded.org wrote:
> > From: Ines KCHELFI <ines.kchelfi@smile.fr>
> >
> > In rpm-sequoia, some default paths in test code (OUT_DIR,
> > CARGO_MANIFEST_DIR) are invalid at runtime and cause test failures.
> >
> > To fix this, patch the test code (symbols.rs) to support overriding
> these
> > paths via optional environment variables: FORCE_RUNTIME_PATH_LIB and
> > FORCE_RUNTIME_PATH_SRC.
> >
> > Also patch the libray name to match what is installed.
> >
> > Tests take less than a second so this is added to PTEST_FAST.
> >
> > ptest result:
> > |root@qemux86-64:~# ptest-runner rpm-sequoia
> > |START: ptest-runner
> > |2025-05-02T15:57
> > |BEGIN: /usr/lib/rpm-sequoia/ptest
> > |
> > |running 1 test
> > |test symbols ... ok
> > |
> > |test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered
> out; finished in 0.00s
> > |
> > |
> > |running 2 tests
> > |test tests::merge_certs_mismatch ... ok
> > |test tests::merge_certs ... ok
> > |
> > |test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered
> out; finished in 0.01s
> > |
> > |DURATION: 0
> > |END: /usr/lib/rpm-sequoia/ptest
> > |2025-05-02T15:57
> > |STOP: ptest-runner
> > |TOTAL: 1 FAIL: 0
> >
> > Signed-off-by: Ines KCHELFI <ines.kchelfi@smile.fr>
> > ---
>
> Hi Ines,
>
> Thanks for your patch.
>
> It looks like some of these ptests are not running correctly on the
> autobuilder:
>
> WARNING: core-image-ptest-rpm-sequoia-1.0-r0 do_testimage: There were
> failing ptests.
> Traceback (most recent call last):
>   File
> "/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/core/decorator/__init__.py",
> line 35, in wrapped_f
>     return func(*args, **kwargs)
>   File
> "/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/core/decorator/__init__.py",
> line 35, in wrapped_f
>     return func(*args, **kwargs)
>   File
> "/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/core/decorator/__init__.py",
> line 35, in wrapped_f
>     return func(*args, **kwargs)
>   File
> "/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/runtime/cases/ptest.py",
> line 27, in test_ptestrunner_expectfail
>     self.do_ptestrunner()
>   File
> "/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/runtime/cases/ptest.py",
> line 120, in do_ptestrunner
>     self.fail(failmsg)
> AssertionError:
> ptests which had no test results:
> ['rpm-sequoia']
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/1434
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/1437
>
> Details about the ptests can be found in:
>
>
> https://valkyrie.yocto.io/pub/non-release/20250505-91/testresults/qemuarm64-ptest/core-image-ptest-rpm-sequoia/
>
> https://valkyrie.yocto.io/pub/non-release/20250505-91/testresults/qemux86-64-ptest/core-image-ptest-rpm-sequoia/
>
> Can you have a look at the issue please?
>

That looks related to the fact that the ptest-cargo run-ptest does not
print "PASS:", "FAIL:" lines.
I was not aware but rpm-sequoia will be the first ptest-cargo user running
under AB oeqa/testimage.

We will send a v2 series with a fix for ptest-cargo.

Thanks!
Ines KCHELFI May 12, 2025, 3 p.m. UTC | #5
Hi Mathieu,

Thanks again for reporting the bug. I was able to reproduce it, and I’ve
just submitted a second version of the patch to address it.
You can find it here:
https://lists.openembedded.org/g/openembedded-core/topic/patch_v2_2_2_ptest_cargo/113071573
With this patch applied, the issue should be resolved as confirmed by the
following test results:

Output from runqemu:
runqemu - INFO - Received signal: 15
runqemu - INFO - Cleaning up
runqemu - INFO - Host uptime: 624648.19

tput: No value for $TERM and no -T specified

RESULTS:
RESULTS - parselogs.ParseLogsTest.test_get_context: PASSED (0.00s)
RESULTS - parselogs.ParseLogsTest.test_parselogs: PASSED (2.69s)
RESULTS - ping.PingTest.test_ping: PASSED (0.02s)
RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectfail: PASSED (0.56s)
RESULTS - ssh.SSHTest.test_ssh: PASSED (0.59s)
RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectsuccess: SKIPPED
(0.00s)
SUMMARY:
core-image-ptest-rpm-sequoia () - Ran 6 tests in 3.870s
core-image-ptest-rpm-sequoia - OK - All required tests passed (successes=4,
skipped=1, failures=0, errors=0)
NOTE: Tasks Summary: Attempted 1442 tasks of which 1441 didn't need to be
rerun and all succeeded.

Best regards
Ines

On Tue, May 6, 2025 at 8:43 AM Mathieu Dubois-Briand <
mathieu.dubois-briand@bootlin.com> wrote:

> On Mon May 5, 2025 at 12:16 PM CEST, ines.kchelfi via
> lists.openembedded.org wrote:
> > From: Ines KCHELFI <ines.kchelfi@smile.fr>
> >
> > In rpm-sequoia, some default paths in test code (OUT_DIR,
> > CARGO_MANIFEST_DIR) are invalid at runtime and cause test failures.
> >
> > To fix this, patch the test code (symbols.rs) to support overriding
> these
> > paths via optional environment variables: FORCE_RUNTIME_PATH_LIB and
> > FORCE_RUNTIME_PATH_SRC.
> >
> > Also patch the libray name to match what is installed.
> >
> > Tests take less than a second so this is added to PTEST_FAST.
> >
> > ptest result:
> > |root@qemux86-64:~# ptest-runner rpm-sequoia
> > |START: ptest-runner
> > |2025-05-02T15:57
> > |BEGIN: /usr/lib/rpm-sequoia/ptest
> > |
> > |running 1 test
> > |test symbols ... ok
> > |
> > |test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered
> out; finished in 0.00s
> > |
> > |
> > |running 2 tests
> > |test tests::merge_certs_mismatch ... ok
> > |test tests::merge_certs ... ok
> > |
> > |test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered
> out; finished in 0.01s
> > |
> > |DURATION: 0
> > |END: /usr/lib/rpm-sequoia/ptest
> > |2025-05-02T15:57
> > |STOP: ptest-runner
> > |TOTAL: 1 FAIL: 0
> >
> > Signed-off-by: Ines KCHELFI <ines.kchelfi@smile.fr>
> > ---
>
> Hi Ines,
>
> Thanks for your patch.
>
> It looks like some of these ptests are not running correctly on the
> autobuilder:
>
> WARNING: core-image-ptest-rpm-sequoia-1.0-r0 do_testimage: There were
> failing ptests.
> Traceback (most recent call last):
>   File
> "/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/core/decorator/__init__.py",
> line 35, in wrapped_f
>     return func(*args, **kwargs)
>   File
> "/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/core/decorator/__init__.py",
> line 35, in wrapped_f
>     return func(*args, **kwargs)
>   File
> "/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/core/decorator/__init__.py",
> line 35, in wrapped_f
>     return func(*args, **kwargs)
>   File
> "/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/runtime/cases/ptest.py",
> line 27, in test_ptestrunner_expectfail
>     self.do_ptestrunner()
>   File
> "/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/runtime/cases/ptest.py",
> line 120, in do_ptestrunner
>     self.fail(failmsg)
> AssertionError:
> ptests which had no test results:
> ['rpm-sequoia']
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/1434
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/1437
>
> Details about the ptests can be found in:
>
>
> https://valkyrie.yocto.io/pub/non-release/20250505-91/testresults/qemuarm64-ptest/core-image-ptest-rpm-sequoia/
>
> https://valkyrie.yocto.io/pub/non-release/20250505-91/testresults/qemux86-64-ptest/core-image-ptest-rpm-sequoia/
>
> Can you have a look at the issue please?
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
>
diff mbox series

Patch

diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index f3fdededf6..7ae882400d 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -80,6 +80,7 @@  PTESTS_FAST = "\
     python3-webcolors \
     qemu \
     quilt \
+    rpm-sequoia \
     sed \
     slang \
     wayland \
diff --git a/meta/recipes-devtools/rpm-sequoia/files/0001-Force-the-use-of-librpm_sequoia.so.1-instead-of-libr.patch b/meta/recipes-devtools/rpm-sequoia/files/0001-Force-the-use-of-librpm_sequoia.so.1-instead-of-libr.patch
new file mode 100644
index 0000000000..bfe3860bfc
--- /dev/null
+++ b/meta/recipes-devtools/rpm-sequoia/files/0001-Force-the-use-of-librpm_sequoia.so.1-instead-of-libr.patch
@@ -0,0 +1,29 @@ 
+From 07c738e8731cb658a15c19e0afa023333da4b431 Mon Sep 17 00:00:00 2001
+From: Ines KCHELFI <ines.kchelfi@smile.fr>
+Date: Thu, 10 Apr 2025 16:03:24 +0200
+Subject: [PATCH] Force the use of librpm_sequoia.so.1 instead of librpm_sequoia.so
+
+Signed-off-by: Ines KCHELFI <ines.kchelfi@smile.fr>
+Upstream-Status: Inappropriate [configuration specific to Yocto]
+---
+ tests/symbols.rs | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/symbols.rs b/tests/symbols.rs
+index dc4a42c..9f7b89c 100644
+--- a/tests/symbols.rs
++++ b/tests/symbols.rs
+@@ -19,12 +19,12 @@ fn symbols() -> anyhow::Result<()> {
+     let mut build_dir = out_dir;
+     let lib = loop {
+         let mut lib = build_dir.clone();
+-        lib.push("librpm_sequoia.so");
++        lib.push("librpm_sequoia.so.1");
+         if lib.exists() {
+             break lib;
+         }
+         if ! build_dir.pop() {
+-            panic!("Failed to find librpm_sequoia.so");
++            panic!("Failed to find librpm_sequoia.so.1");
+         }
+     };
diff --git a/meta/recipes-devtools/rpm-sequoia/files/0001-Use-optional-env-vars-to-force-runtime-paths-in-test.patch b/meta/recipes-devtools/rpm-sequoia/files/0001-Use-optional-env-vars-to-force-runtime-paths-in-test.patch
new file mode 100644
index 0000000000..d0179fc53c
--- /dev/null
+++ b/meta/recipes-devtools/rpm-sequoia/files/0001-Use-optional-env-vars-to-force-runtime-paths-in-test.patch
@@ -0,0 +1,35 @@ 
+From 590937523deea4ad2a2ee0e1ae4412a8f59e0170 Mon Sep 17 00:00:00 2001
+From: Ines KCHELFI <ines.kchelfi@smile.fr>
+Date: Thu, 10 Apr 2025 15:14:11 +0200
+Subject: [PATCH] Use optional env vars to force runtime paths in tests
+
+Signed-off-by: Ines KCHELFI <ines.kchelfi@smile.fr>
+Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm-sequoia/pull/86]
+---
+ tests/symbols.rs | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/tests/symbols.rs b/tests/symbols.rs
+index c16dd9b..dc4a42c 100644
+--- a/tests/symbols.rs
++++ b/tests/symbols.rs
+@@ -14,7 +14,8 @@ fn symbols() -> anyhow::Result<()> {
+     // OUT_DIR gives us
+     // `/tmp/rpm-sequoia/debug/build/rpm-sequoia-HASH/out`.
+ 
+-    let out_dir = PathBuf::from(env!("OUT_DIR"));
++    let out_dir = PathBuf::from(option_env!("FORCE_RUNTIME_PATH_LIB")
++        .unwrap_or(env!("OUT_DIR")));
+     let mut build_dir = out_dir;
+     let lib = loop {
+         let mut lib = build_dir.clone();
+@@ -53,7 +54,8 @@ fn symbols() -> anyhow::Result<()> {
+     }
+ 
+     let mut expected_symbols_txt_fn
+-        = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
++    = PathBuf::from(option_env!("FORCE_RUNTIME_PATH_SRC")
++        .unwrap_or(env!("CARGO_MANIFEST_DIR")));
+     expected_symbols_txt_fn.push("src/symbols.txt");
+ 
+     let mut expected_symbols_txt = Vec::new();
diff --git a/meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.7.0.bb b/meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.7.0.bb
index 57062b100a..24d5f4b38f 100644
--- a/meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.7.0.bb
+++ b/meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.7.0.bb
@@ -10,9 +10,13 @@  LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f0ff5ff7747cf7d394079c6ae87f5f0c"
 
 DEPENDS = "openssl"
 
-inherit pkgconfig rust cargo cargo-update-recipe-crates
+inherit pkgconfig rust cargo cargo-update-recipe-crates ptest-cargo
+
+SRC_URI = "git://github.com/rpm-software-management/rpm-sequoia.git;protocol=https;branch=main \
+	file://0001-Use-optional-env-vars-to-force-runtime-paths-in-test.patch \
+	file://0001-Force-the-use-of-librpm_sequoia.so.1-instead-of-libr.patch \
+"
 
-SRC_URI = "git://github.com/rpm-software-management/rpm-sequoia.git;protocol=https;branch=main"
 
 SRCREV = "0667e04ae7fb8cf0490919978d69883d16400e41"
 
@@ -41,6 +45,13 @@  do_compile:prepend () {
 	export LIBDIR="${libdir}"
 }
 
+# By default, ptest binaries contain host build dir paths.
+# Use custom environment variables to force these paths to match the target instead.
+do_compile_ptest_cargo:prepend() {
+    os.environ["FORCE_RUNTIME_PATH_LIB"] = d.getVar("libdir")
+    os.environ["FORCE_RUNTIME_PATH_SRC"] = d.getVar("PTEST_PATH")
+}
+
 do_install:append () {
 	# Move the library to the correct location expected by rpm-sequoia.pc
 	mkdir -p ${D}${libdir}
@@ -54,6 +65,14 @@  do_install:append () {
 	install -m644 ${S}/target/release/rpm-sequoia.pc ${D}${libdir}/pkgconfig
 }
 
+do_install_ptest:append () {
+	install -d ${D}${PTEST_PATH}/src
+	install -m 644 ${S}/src/symbols.txt ${D}${PTEST_PATH}/src/symbols.txt
+}
+
+# Tests need objdump
+RDEPENDS:${PN}-ptest += "binutils"
+
 RDEPENDS:${PN} = "rpm-sequoia-crypto-policy"
 PACKAGE_WRITE_DEPS += "rpm-sequoia-crypto-policy-native"