mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-10-01 04:43:27 +00:00
poco: fix ptests
1. Add a patch to fix an incorrect and failing test 2. Add missing dependencies and test files 3. Enable network in run-ptest script by adding a nameserver 4. Start mongodb from run-ptest script, if it wouldn't be running. Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
This commit is contained in:
parent
491dd81581
commit
ea936b8f0e
@ -0,0 +1,26 @@
|
|||||||
|
From aa202b4eedfef259718b74a66cf0abfe7b49bb6f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matej Kenda <matejken@gmail.com>
|
||||||
|
Date: Wed, 3 Jan 2024 20:13:57 +0100
|
||||||
|
Subject: [PATCH] fix(test): Use 96-bit IV with aes-256-gcm to fix (#4347):
|
||||||
|
|
||||||
|
I/O error: error:1C800066:Provider routines::cipher operation failed
|
||||||
|
|
||||||
|
Upstream-Status: Backport [https://github.com/pocoproject/poco/commit/0f25b4c114f23c22681a981d8aed3464530fa6b1]
|
||||||
|
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
|
||||||
|
---
|
||||||
|
Crypto/testsuite/src/CryptoTest.cpp | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Crypto/testsuite/src/CryptoTest.cpp b/Crypto/testsuite/src/CryptoTest.cpp
|
||||||
|
index d60f1988e..fd798e72b 100644
|
||||||
|
--- a/Crypto/testsuite/src/CryptoTest.cpp
|
||||||
|
+++ b/Crypto/testsuite/src/CryptoTest.cpp
|
||||||
|
@@ -214,7 +214,7 @@ void CryptoTest::testEncryptDecryptGCM()
|
||||||
|
{
|
||||||
|
CipherKey key("aes-256-gcm");
|
||||||
|
|
||||||
|
- CipherKey::ByteVec iv(20, 213);
|
||||||
|
+ CipherKey::ByteVec iv(12, 213);
|
||||||
|
key.setIV(iv);
|
||||||
|
|
||||||
|
Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(key);
|
||||||
@ -1,8 +1,24 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
KILL_MONGODB=false
|
||||||
|
|
||||||
|
if ! pidof mongod; then
|
||||||
|
/usr/bin/mongod --config /etc/mongod.conf &
|
||||||
|
KILL_MONGODB=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! nslookup example.com; then
|
||||||
|
mv /etc/resolv.conf /etc/resolv.conf.bak
|
||||||
|
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||||
|
trap "mv /etc/resolv.conf.bak /etc/resolv.conf" INT EXIT
|
||||||
|
fi
|
||||||
|
|
||||||
while read runner; do
|
while read runner; do
|
||||||
oldpath=`pwd` >/dev/null
|
oldpath=`pwd` >/dev/null
|
||||||
cd bin
|
cd bin
|
||||||
echo Testing $runner
|
echo Testing $runner
|
||||||
./$runner -ignore $oldpath/cppignore.lnx -all
|
./$runner -ignore $oldpath/cppignore.lnx -all && echo PASS: $runner || echo FAIL: $runner
|
||||||
cd $oldpath >/dev/null
|
cd $oldpath >/dev/null
|
||||||
done < testrunners
|
done < testrunners
|
||||||
|
|
||||||
|
[ "$KILL_MONGODB" = "true" ] && killall mongod
|
||||||
|
|||||||
@ -8,11 +8,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=4267f48fc738f50380cbeeb76f95cebc"
|
|||||||
# These dependencies are required by Foundation
|
# These dependencies are required by Foundation
|
||||||
DEPENDS = "libpcre zlib"
|
DEPENDS = "libpcre zlib"
|
||||||
|
|
||||||
SRC_URI = " \
|
SRC_URI = "git://github.com/pocoproject/poco.git;branch=main;protocol=https \
|
||||||
git://github.com/pocoproject/poco.git;branch=main;protocol=https \
|
file://run-ptest \
|
||||||
file://run-ptest \
|
file://CVE-2025-6375.patch \
|
||||||
file://CVE-2025-6375.patch \
|
file://0001-fix-test-Use-96-bit-IV-with-aes-256-gcm-to-fix-4347.patch \
|
||||||
"
|
"
|
||||||
SRCREV = "9d1c428c861f2e5ccf09149bbe8d2149720c5896"
|
SRCREV = "9d1c428c861f2e5ccf09149bbe8d2149720c5896"
|
||||||
|
|
||||||
UPSTREAM_CHECK_GITTAGREGEX = "poco-(?P<pver>\d+(\.\d+)+)"
|
UPSTREAM_CHECK_GITTAGREGEX = "poco-(?P<pver>\d+(\.\d+)+)"
|
||||||
@ -79,13 +79,15 @@ python populate_packages:prepend () {
|
|||||||
do_install_ptest () {
|
do_install_ptest () {
|
||||||
cp -rf ${B}/bin/ ${D}${PTEST_PATH}
|
cp -rf ${B}/bin/ ${D}${PTEST_PATH}
|
||||||
cp -f ${B}/lib/libCppUnit.so* ${D}${libdir}
|
cp -f ${B}/lib/libCppUnit.so* ${D}${libdir}
|
||||||
cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/
|
cp -rf ${S}/*/testsuite/data ${D}${PTEST_PATH}/bin/
|
||||||
find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \;
|
find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \;
|
||||||
rm -f ${D}${PTEST_PATH}/testrunners
|
rm -f ${D}${PTEST_PATH}/testrunners
|
||||||
for f in ${D}${PTEST_PATH}/bin/*-testrunner; do
|
for f in ${D}${PTEST_PATH}/bin/*-testrunner; do
|
||||||
echo `basename $f` >> ${D}${PTEST_PATH}/testrunners
|
echo `basename $f` >> ${D}${PTEST_PATH}/testrunners
|
||||||
done
|
done
|
||||||
install -Dm 0644 ${S}/cppignore.lnx ${D}${PTEST_PATH}/cppignore.lnx
|
install -Dm 0644 ${S}/cppignore.lnx ${D}${PTEST_PATH}/cppignore.lnx
|
||||||
|
install ${B}/bin/TestLibrary.so ${D}${libdir}
|
||||||
|
install -D ${B}/bin/TestApp ${D}${bindir}/TestApp
|
||||||
}
|
}
|
||||||
|
|
||||||
PACKAGES_DYNAMIC = "poco-.*"
|
PACKAGES_DYNAMIC = "poco-.*"
|
||||||
@ -97,7 +99,8 @@ ALLOW_EMPTY:${PN} = "1"
|
|||||||
PACKAGES =+ "${PN}-cppunit"
|
PACKAGES =+ "${PN}-cppunit"
|
||||||
FILES:${PN}-cppunit += "${libdir}/libCppUnit.so*"
|
FILES:${PN}-cppunit += "${libdir}/libCppUnit.so*"
|
||||||
ALLOW_EMPTY:${PN}-cppunit = "1"
|
ALLOW_EMPTY:${PN}-cppunit = "1"
|
||||||
|
FILES:${PN}-ptest += "${bindir}/TestApp ${libdir}/TestLibrary.so"
|
||||||
|
|
||||||
RDEPENDS:${PN}-ptest += "${PN}-cppunit"
|
RDEPENDS:${PN}-ptest += "${PN}-cppunit redis mongodb"
|
||||||
|
|
||||||
BBCLASSEXTEND = "native"
|
BBCLASSEXTEND = "native"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user