diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 6c8ff85fd0..9fe1ca062d 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -147,6 +147,7 @@ PTESTS_SLOW = "\
     libpcap \
     libpng \
     libsoup \
+    libxcrypt \
     ${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'libseccomp', '',d)} \
     lttng-tools \
     lz4 \
diff --git a/meta/recipes-core/images/core-image-ptest.bb b/meta/recipes-core/images/core-image-ptest.bb
index 9b8af9b93a..852ea036c7 100644
--- a/meta/recipes-core/images/core-image-ptest.bb
+++ b/meta/recipes-core/images/core-image-ptest.bb
@@ -12,6 +12,7 @@ PTESTS = "${PTESTS_SLOW} ${PTESTS_FAST}"
 PTEST_RUNNER_TIMEOUT:virtclass-mcextend-python3-cffi = "600"
 PTEST_RUNNER_TIMEOUT:virtclass-mcextend-go = "4800"
 PTEST_RUNNER_TIMEOUT:virtclass-mcextend-icu = "2400"
+PTEST_RUNNER_TIMEOUT:virtclass-mcextend-libxcrypt = "900"
 
 IMAGE_INSTALL:append = " ${MCNAME}-ptest openssh"
 
diff --git a/meta/recipes-core/libxcrypt/files/run-ptest b/meta/recipes-core/libxcrypt/files/run-ptest
new file mode 100644
index 0000000000..24c056ba90
--- /dev/null
+++ b/meta/recipes-core/libxcrypt/files/run-ptest
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+cd "$(dirname "$0")/test" || exit 1
+
+for t in *; do
+    out=$(./"$t" 2>&1)
+    case $? in
+        0) echo "PASS: $t" ;;
+        77) echo "SKIP: $t" ;;
+        *) echo "FAIL: $t"; echo "$out" | sed 's/^/    /' ;;
+    esac
+done
diff --git a/meta/recipes-core/libxcrypt/libxcrypt_4.5.2.bb b/meta/recipes-core/libxcrypt/libxcrypt_4.5.2.bb
index 79dba2f6dc..3178e1674b 100644
--- a/meta/recipes-core/libxcrypt/libxcrypt_4.5.2.bb
+++ b/meta/recipes-core/libxcrypt/libxcrypt_4.5.2.bb
@@ -1,2 +1,22 @@
 require libxcrypt.inc
 
+inherit ptest
+
+SRC_URI += "file://run-ptest"
+
+do_compile_ptest() {
+    oe_runmake check TESTS=
+}
+
+LIBXCRYPT_PTEST_SKIP = "test/alg-yescrypt"
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/test
+    for t in $(makefile-getvar ${B}/Makefile TESTS); do
+        case " ${LIBXCRYPT_PTEST_SKIP} " in
+        *" $t "*) continue ;;
+        esac
+        ${B}/libtool --mode=install install -m 0755 ${B}/$t ${D}${PTEST_PATH}/test/
+    done
+}
+
