From patchwork Tue Jan 20 07:37:57 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shaik Moin X-Patchwork-Id: 79129 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBF10D2ECF7 for ; Tue, 20 Jan 2026 07:46:52 +0000 (UTC) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.1821.1768895121930818607 for ; Mon, 19 Jan 2026 23:45:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LPV31mlw; spf=pass (domain: gmail.com, ip: 209.85.222.179, mailfrom: careers.myinfo@gmail.com) Received: by mail-qk1-f179.google.com with SMTP id af79cd13be357-8c532d8be8cso481916885a.2 for ; Mon, 19 Jan 2026 23:45:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768895120; x=1769499920; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7RINxvXUOkA6zCn8uI0y0AgjKcGE+1r5lEfk2eE8thU=; b=LPV31mlwyh4o+HlZ1+AcoEjBe6MwmkiCSXNo2Fkngyh/pk4TYg1vijdC9bevMJNz5C FMItRL9STPDqTA5Q9ihG4qvElL+Vaz4kR12DswHX6NCK8YRgK+lqQUazId9FknIadqgp 2umTo2/frR10wbZCpkQeNLngSaeP3tQX4RNtuQgzMvMJWGPlbBgJfmkRXSd/OB78zMKh FN4kZTrzvDc99Ae71M5mSeIkBOqZdl8XBcX3aGQEw82FufJ25+xbQWm31Yj/wdWBUksE 4JFDScYzcA0c9Qbwo57/YUqLbSMPMFNmxbVOi/+V7tJpTtJG6r1Y13XiXz81mA2ecRt3 Or/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768895120; x=1769499920; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7RINxvXUOkA6zCn8uI0y0AgjKcGE+1r5lEfk2eE8thU=; b=nFm0o+foq2m0WRyMMv9mR3sNBUG+AJdI/durEOqyReJjo+/5USJBzl+dyMUjWNjljq bRcKoXYwSJol25Erf//5EYIPI4quR9MTw2bONZKAL8b432DMVefO9jZuEkhfl6kUg9rU 0enO10S52z2kuwMVYyJFEYbnTDtv1FfoA67pAoXEHIaOx9f/PAGyANdXlG11xbU3yc3U MrdZsBc2wCXuTLcpjwvENeWKR+WqFzJzZLJ3dRgYu8QrtGxGhAymyngyAtuIUfwRpnSs lWvMlXVQFrC/ygsPHaNDsZLpvssh0Zo+KWHmTus98tws8hxO2/DuRBsSjiNxCoYJPOeu T7Ng== X-Gm-Message-State: AOJu0YyV3wiGI6V36Awjz0UHLOcaVISPwTopwwxlSGz/HqRrP/Tr0+4b WIoHvtZrovhoMODuzhXY7AaLgkWBYzXxyiidqVHIr38G3LiGXdtvHaFy9iVH0w== X-Gm-Gg: AY/fxX5oc5OcUc0bG/xhoCIg1aEx44jL6lJUW5F3hC9sicCEG2iXjoGgO6nLTEVoOMr bGcWCl0bHEwJr+5GuiNowIvbNZilU8YHIywH1zTGhucNI4lvjvtxoy1C5zYzEZWjwZYkisVTejE uWlOYHoxiqZFN4WOf6NJSdM7ZNUTuNeT+icgNbz7BBjzgbIhqWgfUSg/RcD0YRbqDiNQllzlKsC t5cwl2VGTk42qEC4BccKfAVZmmYtYCvf9NddkqGRXbC4HztwZnKAgjr72GRisLP1bBN3RQqz6Jh Ds0S+no7/EcywXMvFnhaxn7lBTle5A6g5kRYwfnpsDflxpFVJtYiLtN3HghBMu66NT5/lBsMJW3 zHYfmPXzFAmX0aZJVZE3cmAjpnM8rizg5DezovHWUHyi/ccp9o15Cx7peKut6SxipcRpVL5iCgC RA6/y9WVXOEQ== X-Received: by 2002:a17:902:d503:b0:267:a5df:9b07 with SMTP id d9443c01a7336-2a7175189a1mr109585455ad.12.1768894717992; Mon, 19 Jan 2026 23:38:37 -0800 (PST) Received: from L-15597L.kpit.com ([36.255.86.176]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a7193fb998sm116018645ad.69.2026.01.19.23.38.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jan 2026 23:38:37 -0800 (PST) From: Shaik Moin X-Google-Original-From: Shaik Moin To: openembedded-core@lists.openembedded.org Cc: careers.myinfo@gmail.com Subject: [OE-core][kirkstone][PATCH 1/2] libpcre2: Enabling Ptest Support Date: Tue, 20 Jan 2026 13:07:57 +0530 Message-Id: <20260120073758.508608-1-moins@kpit.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 20 Jan 2026 07:46:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/229648 Install libpcre2 test suite and run it as ptest. Add tests for POSIX wrapper (pcre2posix_test), core PCRE2 engine (RunTest), and grep utility (RunGrepTest). pcre2posix_test: Verifies the POSIX wrapper API RunTest: Executes the core PCRE2 test suite through pcre2test RunGrepTest: Checks pcre2grep to ensure its grep‑style matching works as expected with various patterns and input files. Signed-off-by: Shaik Moin --- .../distro/include/ptest-packagelists.inc | 1 + .../libpcre/libpcre2/run-ptest | 45 +++++++++++++++++++ .../recipes-support/libpcre/libpcre2_10.40.bb | 18 +++++++- 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/libpcre/libpcre2/run-ptest diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 53c023bb81..3df4c5db10 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -29,6 +29,7 @@ PTESTS_FAST = "\ libnl-ptest \ libmodule-build-perl-ptest \ libpcre-ptest \ + libpcre2-ptest \ libssh2-ptest \ libtimedate-perl-ptest \ libtest-needs-perl-ptest \ diff --git a/meta/recipes-support/libpcre/libpcre2/run-ptest b/meta/recipes-support/libpcre/libpcre2/run-ptest new file mode 100644 index 0000000000..a227cdec29 --- /dev/null +++ b/meta/recipes-support/libpcre/libpcre2/run-ptest @@ -0,0 +1,45 @@ +#!/bin/sh + +echo "START: ptest-runner" +date +"%Y-%m-%dT%H:%M" +echo "BEGIN: $(pwd)" + +# Space-separated list of test binaries +TESTS="RunGrepTest RunTest" + +total=0 +pass=0 +fail=0 +results="" + +for T in $TESTS; do + echo "Running $T" + total=$((total + 1)) + if ./"$T"; then + echo "PASS: $T" + pass=$((pass + 1)) + results="${results}\nPASS: ${T}" + else + echo "FAIL: $T" + fail=$((fail + 1)) + results="${results}\nFAIL: ${T}" + fi +done +echo "============================================================================" +echo "Testsuite summary for PCRE" +echo "============================================================================" + +if [ -n "$results" ]; then + printf "%b\n" "$results" +fi + +# Summary with per-test details +echo "============================================================================" +echo "# TOTAL: $total" +echo "# PASS: $pass" +echo "# FAIL: $fail" +echo "============================================================================" + +# Exit code based on failures +[ "$fail" -eq 0 ] && exit 0 || exit 1 + diff --git a/meta/recipes-support/libpcre/libpcre2_10.40.bb b/meta/recipes-support/libpcre/libpcre2_10.40.bb index ba5f8cff32..8aec420d4a 100644 --- a/meta/recipes-support/libpcre/libpcre2_10.40.bb +++ b/meta/recipes-support/libpcre/libpcre2_10.40.bb @@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=41bfb977e4933c506588724ce69bf5d2" SRC_URI = "https://github.com/PhilipHazel/pcre2/releases/download/pcre2-${PV}/pcre2-${PV}.tar.bz2 \ file://CVE-2022-41409.patch \ + file://run-ptest \ " UPSTREAM_CHECK_URI = "https://github.com/PhilipHazel/pcre2/releases" @@ -30,7 +31,7 @@ DEPENDS += "bzip2 zlib" BINCONFIG = "${bindir}/pcre2-config" -inherit autotools binconfig-disabled +inherit autotools binconfig-disabled ptest EXTRA_OECONF = "\ --enable-newline-is-lf \ @@ -57,3 +58,18 @@ FILES:pcre2test = "${bindir}/pcre2test" FILES:pcre2test-doc = "${mandir}/man1/pcre2test.1" BBCLASSEXTEND = "native nativesdk" + +do_install_ptest() { + t=${D}${PTEST_PATH} + cp -r ${S}/testdata $t + for i in pcre2grep pcre2test; \ + do cp ${B}/.libs/$i $t; \ + done + for i in RunTest RunGrepTest test-driver; \ + do cp ${S}/$i $t; \ + done + # Skip the fr_FR locale test. If the locale fr_FR is found, it is tested. + # If not found, the test is skipped. The test program assumes fr_FR is non-UTF-8 + # locale so the test fails if fr_FR is UTF-8 locale. + sed -i -e 's:do3=yes:do3=no:g' ${D}${PTEST_PATH}/RunTest +} From patchwork Tue Jan 20 07:37:58 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shaik Moin X-Patchwork-Id: 79130 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBF79D2ECF7 for ; Tue, 20 Jan 2026 07:47:02 +0000 (UTC) Received: from mail-vk1-f169.google.com (mail-vk1-f169.google.com [209.85.221.169]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.1802.1768895167219647970 for ; Mon, 19 Jan 2026 23:46:07 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IBaBADvZ; spf=pass (domain: gmail.com, ip: 209.85.221.169, mailfrom: careers.myinfo@gmail.com) Received: by mail-vk1-f169.google.com with SMTP id 71dfb90a1353d-56376c3e866so3873460e0c.3 for ; Mon, 19 Jan 2026 23:46:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768895166; x=1769499966; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mrrMTtb60SP0xBTCvJL8nJfkI/A1zaXtpG+M96zSEDk=; b=IBaBADvZ8//uGn6LHNFchI+shekRS9FhEoqio2yvbtjIVPzLXr4clrTVOv4nyWtI4d sZ7DFDCMIcuyU7YHO21Fy/jb88sG85babJ9neIqo3q1VvHhY+ZI1wXel37fhOqTiT/fC XyRQq3KQ/vHMq7XpDijjpi09UpM8IX+y+J4hKUdxQlU5E18JN2mS5cQik/dOnvT759mk mAp9nZ50TFsfwa9Hg+NuoKuKerjsoiuHbWpl1vtljloUiw2MfokIGBQegV4nzRAVZSST MN6SW5bCrXfHEVMpp4Bh3fLCeRkCsBlaq3tqzJzWKiJ3XEbShC9R/T7/2WZ5WY2CLhSC a/UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768895166; x=1769499966; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=mrrMTtb60SP0xBTCvJL8nJfkI/A1zaXtpG+M96zSEDk=; b=f11AD/BaNlUA8PXgJpktBqvr6EEDHj2M/muG9fLmW2ENZLLkBkYt5LpLJQ/C3sB2oB cCsu0VuFLv6JZ8Kf/icT3a4gEiNJgTq/1GpAmS2/efQvHJojuVYV9jzimHyRuS6KTNc0 UsjEefY+TmnEAlRTCTElruTqlCn0+UUJA463O0lr0GGMbLHNkhtmmsX0Lje/vHjNV/wP eRhM95Fs4clYxIujroCqz/BYLntXNeijIs6JJnmQXYhoK0EoGIUa7quAwtDOhBEmH+JY GgKHEKXJXtZeIr+lSoM3VBSdY9FjC1fLay7tozDdpXjlRWNUtsj3zjYYssbcSIlruLaM 7lbw== X-Gm-Message-State: AOJu0Yy4tc5JNSZnt6JBcKLJtREIqOMNhxvKXcZk7CFwBN6TXgc4pogO nEU018HJTAm0rtelmGFzV2T4auuAxv75u7Q6hty5H/A5m/gX8FGxlENID8Q8og== X-Gm-Gg: AZuq6aIY74lGqYh9OAJAAAnZBrq2uEEEdW/HcS7mgL2Oj5Ix6gUpbUA6Rt9cJIG7KHL 7k0PsVFMGB3HVpVWVMoGMzNXUVqq2g/9x59hbvanEfNs2Ow+ZjMAd9F05/bnMkFLbkizb027eYP NsdABEMzs8DokJWqMYKcjorXfPA41I4KtsMMx7cd6BgJ12lhmab48ZlBHAeqXA5HaLRLuyVwXZK D3i65Yb2ERlcMwD3QztNA9X+O1Owrpf6qdG5V+ok/4Ellv13ScyA2iOEDvgdCJYKNgji0CdSFYt lPiWktNFH4beS6QfDxs1W9EwLoGUlnttftbogJ6w2rHvrQhoSK9Xl7kB8ICLHEZAg8Qd0FobMHU NWGuZhaLufWFQ08huEq/AkQl82vKl9SRFGlyZSic6hn4MQp+6RMjUKL8LabaPvSof80j4iyspYZ qhEJ6ooRx32Q== X-Received: by 2002:a17:902:da88:b0:2a1:4c31:333 with SMTP id d9443c01a7336-2a7692410e1mr10235925ad.19.1768894721262; Mon, 19 Jan 2026 23:38:41 -0800 (PST) Received: from L-15597L.kpit.com ([36.255.86.176]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a7193fb998sm116018645ad.69.2026.01.19.23.38.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jan 2026 23:38:40 -0800 (PST) From: Shaik Moin X-Google-Original-From: Shaik Moin To: openembedded-core@lists.openembedded.org Cc: careers.myinfo@gmail.com Subject: [OE-core][kirkstone][PATCH 2/2] libpcre2: fix RunGrepTest Failure on Busybox systems Date: Tue, 20 Jan 2026 13:07:58 +0530 Message-Id: <20260120073758.508608-2-moins@kpit.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260120073758.508608-1-moins@kpit.com> References: <20260120073758.508608-1-moins@kpit.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 20 Jan 2026 07:47:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/229649 The PCRE2 RunGrepTest script uses the Gnu Coreutils form: head -1 Busybox does not support this shorthand option and reports: head: invalid option --'1' which cause the grep tests fail when running ptest on yocto. Replace head -1 with head -n 1 . This makes RunGrepTest work correctly. Signed-off-by: Shaik Moin --- .../0001-test-Fix-head-1-Busybox.patch | 38 +++++++++++++++++++ .../recipes-support/libpcre/libpcre2_10.40.bb | 1 + 2 files changed, 39 insertions(+) create mode 100644 meta/recipes-support/libpcre/libpcre2/0001-test-Fix-head-1-Busybox.patch diff --git a/meta/recipes-support/libpcre/libpcre2/0001-test-Fix-head-1-Busybox.patch b/meta/recipes-support/libpcre/libpcre2/0001-test-Fix-head-1-Busybox.patch new file mode 100644 index 0000000000..9f98f55380 --- /dev/null +++ b/meta/recipes-support/libpcre/libpcre2/0001-test-Fix-head-1-Busybox.patch @@ -0,0 +1,38 @@ +From 1b2c3d4e5f6a7b8c9d0 Mon Sep 17 00:00:00 2001 +From: Shaik Moin +Date: Tue, 18 Nov 2025 10:30:00 +0530 +Subject: [PATCH] tests: Fix head options for BusyBox compatibility + +BusyBox does not accept the GNU coreutils shorthand forms: + head -1 + +It requires: + head -n 1 + +This causes RunGrepTest and the grepoutput test data to fail on +Yocto-based systems that use BusyBox. + +Replace all occurrences of `head -1` → `head -n 1` + +This aligns the scripts with POSIX syntax and fixes failing +grep tests in RunGrepTest (including testtrygrep). + +Upstream-Status: Inappropriate [oe-specific] +Signed-off-by: Shaik Moin +--- + +diff --git a/RunGrepTest b/RunGrepTest +index 1c7bbd2..ab4f310 100755 +--- a/RunGrepTest ++++ b/RunGrepTest +@@ -728,7 +728,7 @@ echo "---------------------------- Test + echo "RC=$?" >>testtrygrep + + echo "---------------------------- Test 132 -----------------------------" >>testtrygrep +-(cd $srcdir; exec 3>testtrygrep 2>&1 ++(cd $srcdir; exec 3>testtrygrep 2>&1 + echo "RC=$?" >>testtrygrep + + echo "---------------------------- Test 133 -----------------------------" >>testtrygrep +-- +2.34.1 diff --git a/meta/recipes-support/libpcre/libpcre2_10.40.bb b/meta/recipes-support/libpcre/libpcre2_10.40.bb index 8aec420d4a..0d7786b81c 100644 --- a/meta/recipes-support/libpcre/libpcre2_10.40.bb +++ b/meta/recipes-support/libpcre/libpcre2_10.40.bb @@ -13,6 +13,7 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=41bfb977e4933c506588724ce69bf5d2" SRC_URI = "https://github.com/PhilipHazel/pcre2/releases/download/pcre2-${PV}/pcre2-${PV}.tar.bz2 \ file://CVE-2022-41409.patch \ file://run-ptest \ + file://0001-test-Fix-head-1-Busybox.patch \ " UPSTREAM_CHECK_URI = "https://github.com/PhilipHazel/pcre2/releases"