diff --git a/meta/recipes-support/libsoup/libsoup_3.8.1.bb b/meta/recipes-support/libsoup/libsoup_3.8.1.bb
index c2af4d6632..d8dff58d87 100644
--- a/meta/recipes-support/libsoup/libsoup_3.8.1.bb
+++ b/meta/recipes-support/libsoup/libsoup_3.8.1.bb
@@ -46,28 +46,22 @@ GIDOCGEN_MESON_OPTION = 'docs'
 GIDOCGEN_MESON_ENABLE_FLAG = 'enabled'
 GIDOCGEN_MESON_DISABLE_FLAG = 'disabled'
 
-# These tests abort under ptest and leave the binaries in place:
-# - header-parsing-test: the /header-parsing/param-list subtest aborts as
-#   soup_header_parse_semi_param_list() returns one parameter instead of
-#   three for a header with invalid-UTF-8 extended (*=) parameters:
-#   https://gitlab.gnome.org/GNOME/libsoup/-/work_items/560
-# - logger-test (long-invalid-body-length) and http2-body-stream-test
-#   (large_data) exercise multi-GiB allocations and are killed by the OOM
-#   killer on the memory-constrained ptest machines.
-PTEST_SKIP_TESTS = "header-parsing-test logger-test http2-body-stream-test"
+PTEST_SKIP_DIR = "${libexecdir}/installed-tests/libsoup-3.0"
+
+# The /header-parsing/param-list subtest aborts as
+# soup_header_parse_semi_param_list() returns one parameter instead of three
+# for a header with invalid-UTF-8 extended (*=) parameters:
+# https://gitlab.gnome.org/GNOME/libsoup/-/work_items/560
+PTEST_SKIP[header-parsing-test] = "Aborts on invalid-UTF-8 extended parameters"
+# long-invalid-body-length and large_data exercise multi-GiB allocations
+PTEST_SKIP[logger-test] = "Killed by the OOM killer on memory-constrained ptest machines"
+PTEST_SKIP[http2-body-stream-test] = "Killed by the OOM killer on memory-constrained ptest machines"
 
 # These tests intermittently abort (SIGABRT) during teardown under the slower
-# emulated targets, so skip them there:
-# - http2-test on qemuriscv64.
-# - multithread-test on qemuarm64 (glibc and musl).
-PTEST_SKIP_TESTS:append:riscv64 = " http2-test"
-PTEST_SKIP_TESTS:append:aarch64 = " multithread-test"
-
-do_install_ptest:append() {
-    for t in ${PTEST_SKIP_TESTS}; do
-        rm -f ${D}${datadir}/installed-tests/libsoup-3.0/$t.test
-    done
-}
+# emulated targets (http2-test on qemuriscv64, multithread-test on qemuarm64
+# with glibc and musl)
+PTEST_SKIP[http2-test] = "${@ptest_skip_if('riscv64', 'Aborts intermittently during teardown on riscv64', d)}"
+PTEST_SKIP[multithread-test] = "${@ptest_skip_if('aarch64', 'Aborts intermittently during teardown on aarch64', d)}"
 
 # When built without gnome support, libsoup will contain only one shared lib
 # and will therefore become subject to renaming by debian.bbclass. Prevent
