diff mbox series

[v5] libxslt: add ptest support

Message ID 20251025132107.9296-1-pratik.farkase@est.tech
State New
Headers show
Series [v5] libxslt: add ptest support | expand

Commit Message

Pratik Farkase Oct. 25, 2025, 1:21 p.m. UTC
Add ptest support for libxslt 1.1.43 including:
- do_compile_ptest and do_install_ptest
- test data installation
- cleanup of buildpath references
- added run-ptest installation

Enable --with-plugins only when ptest is enabled, per review feedback.

v3:
- Remove unconditional --with-plugins (leftover from v2)

v4:
- adapt run-ptest to emit PASS: or FAIL: lines for each test
- run-ptest installation with proper permissions

v5:
- Added FILESEXTRAPATHS using ${BPN} for multilib-safe lookup of run-ptest
- Guarded run-ptest install in do_install_ptest() to avoid autobuilder failures.

Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
 .../distro/include/ptest-packagelists.inc     |  1 +
 meta/recipes-support/libxslt/files/run-ptest  | 38 +++++++++++++++
 .../recipes-support/libxslt/libxslt_1.1.43.bb | 46 +++++++++++++++++--
 3 files changed, 82 insertions(+), 3 deletions(-)
 create mode 100755 meta/recipes-support/libxslt/files/run-ptest

Comments

Mathieu Dubois-Briand Oct. 27, 2025, 5:56 a.m. UTC | #1
On Sat Oct 25, 2025 at 3:21 PM CEST, Pratik Farkase wrote:
> Add ptest support for libxslt 1.1.43 including:
> - do_compile_ptest and do_install_ptest
> - test data installation
> - cleanup of buildpath references
> - added run-ptest installation
>
> Enable --with-plugins only when ptest is enabled, per review feedback.
>
> v3:
> - Remove unconditional --with-plugins (leftover from v2)
>
> v4:
> - adapt run-ptest to emit PASS: or FAIL: lines for each test
> - run-ptest installation with proper permissions
>
> v5:
> - Added FILESEXTRAPATHS using ${BPN} for multilib-safe lookup of run-ptest
> - Guarded run-ptest install in do_install_ptest() to avoid autobuilder failures.
>
> Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
> ---

Hi Pratik,

Thanks for the new version, but we still have some ptest related errors:

AssertionError:
Failed ptests:
{'libxslt': ['runtest_returned_1', 'some_libxslt_tests_failed']}

https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/2496
https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/2535

Ptest logs can be found here:

https://valkyrie.yocto.io/pub/non-release/20251026-107/testresults/qemuarm64-ptest/core-image-ptest-libxslt/
https://valkyrie.yocto.io/pub/non-release/20251026-107/testresults/qemux86-64-ptest/core-image-ptest-libxslt/

Thanks,
Mathieu
Pratik Farkase Oct. 28, 2025, 9:05 p.m. UTC | #2
Hi Mathieu,

I looked at both the Ptest logs you sent and seems like more tests are failing in the autobuilder than in my local QEMU test setup. The failures appear to be byte-level differences (e.g., “230 bytes vs 275 bytes” for bug-147) rather than functional errors.

https://valkyrie.yocto.io/pub/non-release/20251026-107/testresults/qemux86-64-ptest/core-image-ptest-libxslt/

For both qemuarm64 and qemux86-64 machines my local ptest-runner has the following output :

For x86-64 :
root@qemux86-64:~# ptest-runner libxslt
START: ptest-runner
2025-10-28T20:44
BEGIN: /usr/lib/libxslt/ptest
=== Running libxslt ptests ===
FAIL: ./bug-146.xsl (result mismatch)
failed to stat ./bug-146.err
FAIL: ./bug-146.xsl (error mismatch)
## Running REC2 tests
## Running REC tests
## Running REC tests (standalone)
## Running REC tests without dictionaries
## Running REC tests without dictionaries (standalone)
## Running general tests
## Running general tests without dictionaries
## Running encoding tests
## Running documents tests
## Running numbers tests
## Running keys tests
## Running namespaces tests
## Running extensions tests
## Running reports tests
## Running exslt common tests
## Running exslt date tests
## Running exslt dynamic tests
## Running exslt functions tests
## Running exslt math tests
## Running exslt saxon tests
## Running exslt sets tests
## Running exslt strings tests
Total 746 tests, 1 errors
=== Finished libxslt ptests ===
DURATION: 10
END: /usr/lib/libxslt/ptest
2025-10-28T20:44
STOP: ptest-runner
TOTAL: 1 FAIL: 0

For arm64:
root@qemuarm64:~# ptest-runner libxslt
START: ptest-runner
2025-10-28T20:54
BEGIN: /usr/lib/libxslt/ptest
=== Running libxslt ptests ===
Running .libs/runtest
file ./bug-146.out is 217 bytes, result is 0 bytes
Result for ./bug-146.xsl failed
failed to stat ./bug-146.err
Error for ./bug-146.xsl failed
File ./bug-146.xsl generated an error
## Running REC2 tests
## Running REC tests
## Running REC tests (standalone)
## Running REC tests without dictionaries
## Running REC tests without dictionaries (standalone)
## Running general tests
## Running general tests without dictionaries
## Running encoding tests
## Running documents tests
## Running numbers tests
## Running keys tests
## Running namespaces tests
## Running extensions tests
## Running reports tests
## Running exslt common tests
## Running exslt date tests
## Running exslt dynamic tests
## Running exslt functions tests
## Running exslt math tests
## Running exslt saxon tests
## Running exslt sets tests
## Running exslt strings tests
Total 746 tests, 1 errors
FAIL: runtest returned 1
FAIL: some libxslt tests failed
Finished libxslt ptests

ERROR: Exit status is 1
DURATION: 9
END: /usr/lib/libxslt/ptest
2025-10-28T20:54
STOP: ptest-runner
TOTAL: 1 FAIL: 1
Any suggestions on how to proceed or debug further would be appreciated!
Best Regards,
Pratik
Gyorgy Sarvari Oct. 29, 2025, 9:23 a.m. UTC | #3
On 10/28/25 22:05, Pratik Farkase via lists.openembedded.org wrote:
> Hi Mathieu,
>
> I looked at both the Ptest logs you sent and seems like more tests are
> failing in the autobuilder than in my local QEMU test setup. The
> failures appear to be byte-level differences (e.g., “230 bytes vs 275
> bytes” for bug-147) rather than functional errors.
>
> https://valkyrie.yocto.io/pub/non-release/20251026-107/testresults/qemux86-64-ptest/core-image-ptest-libxslt/
> <https://valkyrie.yocto.io/pub/non-release/20251026-107/testresults/qemux86-64-ptest/core-image-ptest-libxslt/>
>
> For both qemuarm64 and qemux86-64 machines my local ptest-runner has
> the following output :
>
> For x86-64 : 
> root@qemux86-64:~# ptest-runner libxslt
> START: ptest-runner
> 2025-10-28T20:44
> BEGIN: /usr/lib/libxslt/ptest
> === Running libxslt ptests ===
> FAIL: ./bug-146.xsl (result mismatch)
> failed to stat ./bug-146.err
> FAIL: ./bug-146.xsl (error mismatch)
> ## Running REC2 tests
> ## Running REC tests
> ## Running REC tests (standalone)
> ## Running REC tests without dictionaries
> ## Running REC tests without dictionaries (standalone)
> ## Running general tests
> ## Running general tests without dictionaries
> ## Running encoding tests
> ## Running documents tests
> ## Running numbers tests
> ## Running keys tests
> ## Running namespaces tests
> ## Running extensions tests
> ## Running reports tests
> ## Running exslt common tests
> ## Running exslt date tests
> ## Running exslt dynamic tests
> ## Running exslt functions tests
> ## Running exslt math tests
> ## Running exslt saxon tests
> ## Running exslt sets tests
> ## Running exslt strings tests
> Total 746 tests, 1 errors
> === Finished libxslt ptests ===
> DURATION: 10
> END: /usr/lib/libxslt/ptest
> 2025-10-28T20:44
> STOP: ptest-runner
> TOTAL: 1 FAIL: 0
>
> For arm64: 
> root@qemuarm64:~# ptest-runner libxslt
> START: ptest-runner
> 2025-10-28T20:54
> BEGIN: /usr/lib/libxslt/ptest
> === Running libxslt ptests ===
> Running .libs/runtest
> file ./bug-146.out is 217 bytes, result is 0 bytes
> Result for ./bug-146.xsl failed
> failed to stat ./bug-146.err
> Error for ./bug-146.xsl failed
> File ./bug-146.xsl generated an error
> ## Running REC2 tests
> ## Running REC tests
> ## Running REC tests (standalone)
> ## Running REC tests without dictionaries
> ## Running REC tests without dictionaries (standalone)
> ## Running general tests
> ## Running general tests without dictionaries
> ## Running encoding tests
> ## Running documents tests
> ## Running numbers tests
> ## Running keys tests
> ## Running namespaces tests
> ## Running extensions tests
> ## Running reports tests
> ## Running exslt common tests
> ## Running exslt date tests
> ## Running exslt dynamic tests
> ## Running exslt functions tests
> ## Running exslt math tests
> ## Running exslt saxon tests
> ## Running exslt sets tests
> ## Running exslt strings tests
> Total 746 tests, 1 errors
> FAIL: runtest returned 1
> FAIL: some libxslt tests failed
> Finished libxslt ptests
>
> ERROR: Exit status is 1
> DURATION: 9
> END: /usr/lib/libxslt/ptest
> 2025-10-28T20:54
> STOP: ptest-runner
> TOTAL: 1 FAIL: 1
> Any suggestions on how to proceed or debug further would be appreciated!

It can be reproduced with Mathieu's staging branch (apply your patch on
https://git.openembedded.org/openembedded-core-contrib repo's
mathieu/master-next branch). Not sure if it's due to the new kernel or
something else, haven't looked further.

As a somewhat offtopic, but still related thing:

I noticed the following construct in the run-ptest script:
RT_RET=${PIPESTATUS[0]:-0} || RT_RET=$?

In case the first statement fails, then RT_RET will be always 1. What's
the intention here? If the second part should be a fallback value from
the test execution, then you should store $? before this line, and
assign the stored value to RT_RET.
Mathieu Dubois-Briand Oct. 29, 2025, 11:49 a.m. UTC | #4
On Tue Oct 28, 2025 at 10:05 PM CET, Pratik Farkase wrote:
> Hi Mathieu,
>
> I looked at both the Ptest logs you sent and seems like more tests are failing in the autobuilder than in my local QEMU test setup. The failures appear to be byte-level differences (e.g., “230 bytes vs 275 bytes” for bug-147) rather than functional errors.
>
> https://valkyrie.yocto.io/pub/non-release/20251026-107/testresults/qemux86-64-ptest/core-image-ptest-libxslt/
>
> For both qemuarm64 and qemux86-64 machines my local ptest-runner has the following output :
>

Yes, it looks like a bit intermittent. I launched another run both locally
and on the autobuilder, and the result is different: it is closer to
yours.

https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/2550
https://valkyrie.yocto.io/pub/non-release/20251029-63/testresults/qemux86-64-ptest/core-image-ptest-libxslt/
Pratik Farkase Nov. 3, 2025, 9:29 a.m. UTC | #5
Hi Gyorgy,

The intent was to capture the exit status of the first command in the tee pipeline (runtest),
but the || RT_RET=$? part doesn’t achieve that — $? there just refers to the assignment failure,
so it would indeed always result in 1. I can simply put it as RT_RET=${PIPESTATUS[0]:-0}
and remove the || RT_RET=$? part. 

I’ll drop the unnecessary fallback and update the run-ptest accordingly in the next revision.

Thanks for catching that!

Best Regards,
Pratik
Pratik Farkase Nov. 3, 2025, 9:41 a.m. UTC | #6
Hi Mathieu,

bug-146 test failure as seen on my local ptest-runner output seems to be fixed and will be incorporated in libxslt master :

https://gitlab.gnome.org/GNOME/libxslt/-/issues/159

I am not sure why we get different outputs of ptest-runner on Autobuilder and local QEMU test setup. It needs to be investigated further.

Best Regards,
Pratik
Pratik Farkase Nov. 4, 2025, 2:05 p.m. UTC | #7
Hi Gyorgy,

Thanks for your support.

I’m now seeing more test failures (as seen in the Autobuilder) when using the `libxml2_2.15.0.bb` recipe from the mathieu/master-next branch, compared to the default `libxml2_2.12.10.bb` recipe from Scarthgap.

The ptest implementation for libxslt is identical in both cases, but the number of failing tests increases when we bump the libxml2 version to the one in master. I’m not entirely sure if this is solely due to the version change or if other updates in the newer libxml2 are contributing to the issue.

Would you prefer that we wait for the libxslt maintainers to fix these tests upstream, or should I disable the failing tests and roll out a new patch with the existing passing tests in the meantime?

Best Regards,
Pratik
Gyorgy Sarvari Nov. 4, 2025, 2:29 p.m. UTC | #8
On 11/4/25 15:05, Pratik Farkase wrote:
> Hi Gyorgy,
>
> Thanks for your support.
>
> I’m now seeing more test failures (as seen in the Autobuilder) when using the `libxml2_2.15.0.bb` recipe from the mathieu/master-next branch, compared to the default `libxml2_2.12.10.bb` recipe from Scarthgap.
>
> The ptest implementation for libxslt is identical in both cases, but the number of failing tests increases when we bump the libxml2 version to the one in master. I’m not entirely sure if this is solely due to the version change or if other updates in the newer libxml2 are contributing to the issue.
>
> Would you prefer that we wait for the libxslt maintainers to fix these tests upstream, or should I disable the failing tests and roll out a new patch with the existing passing tests in the meantime?

In the libxslt repo there are 1-2 recent commits that say suspicious
things like "update test outputs for new libxml2" - if that could be
checked if they[1][2] fix the problem with new libxml, that would be
good to know. (I haven't gone further than looking at the recent commit log)

If they are relevant and they fix the issue, then I would remove libxml
update until it is fixed (it seems there are some other issues with it),
and accept your update in a way that passes all tests with the
non-updated libxml. And then, once libxml update works, the test-fixing
patches can be added to libxslt, and everything supposed to work(TM) again.

But on this ML I'm just a random commenter, my personal opinion might
not be the same as what the project wants :) You might want to wait for
a second opinion also.

[1]:
https://gitlab.gnome.org/GNOME/libxslt/-/commit/a7287acdf1dd95e32bde828c10e07949a16b68f3
[2]:
https://gitlab.gnome.org/GNOME/libxslt/-/commit/33cd5e56328ab29ef1fd939c4632915e834bb7af


> Best Regards,
> Pratik
>
> ________________________________________
> From: Pratik Farkase <pratik.farkase@est.tech>
> Sent: 03 November 2025 10:41 AM
> To: Mathieu Dubois-Briand; Gyorgy Sarvari; openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH v5] libxslt: add ptest support
>
> Hi Mathieu,
>
> bug-146 test failure as seen on my local ptest-runner output seems to be fixed and will be incorporated in libxslt master :
>
> https://gitlab.gnome.org/GNOME/libxslt/-/issues/159
>
> I am not sure why we get different outputs of ptest-runner on Autobuilder and local QEMU test setup. It needs to be investigated further.
>
> Best Regards,
> Pratik
>
> ________________________________________
> From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
> Sent: 29 October 2025 12:49 PM
> To: Pratik Farkase; openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH v5] libxslt: add ptest support
>
> On Tue Oct 28, 2025 at 10:05 PM CET, Pratik Farkase wrote:
>> Hi Mathieu,
>>
>> I looked at both the Ptest logs you sent and seems like more tests are failing in the autobuilder than in my local QEMU test setup. The failures appear to be byte-level differences (e.g., “230 bytes vs 275 bytes” for bug-147) rather than functional errors.
>>
>> https://valkyrie.yocto.io/pub/non-release/20251026-107/testresults/qemux86-64-ptest/core-image-ptest-libxslt/
>>
>> For both qemuarm64 and qemux86-64 machines my local ptest-runner has the following output :
>>
> Yes, it looks like a bit intermittent. I launched another run both locally
> and on the autobuilder, and the result is different: it is closer to
> yours.
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/2550
> https://valkyrie.yocto.io/pub/non-release/20251029-63/testresults/qemux86-64-ptest/core-image-ptest-libxslt/
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
Gyorgy Sarvari Nov. 4, 2025, 2:43 p.m. UTC | #9
On 11/4/25 15:29, Gyorgy Sarvari via lists.openembedded.org wrote:
> On 11/4/25 15:05, Pratik Farkase wrote:
>> Hi Gyorgy,
>>
>> Thanks for your support.
>>
>> I’m now seeing more test failures (as seen in the Autobuilder) when using the `libxml2_2.15.0.bb` recipe from the mathieu/master-next branch, compared to the default `libxml2_2.12.10.bb` recipe from Scarthgap.
>>
>> The ptest implementation for libxslt is identical in both cases, but the number of failing tests increases when we bump the libxml2 version to the one in master. I’m not entirely sure if this is solely due to the version change or if other updates in the newer libxml2 are contributing to the issue.
>>
>> Would you prefer that we wait for the libxslt maintainers to fix these tests upstream, or should I disable the failing tests and roll out a new patch with the existing passing tests in the meantime?
> In the libxslt repo there are 1-2 recent commits that say suspicious
> things like "update test outputs for new libxml2" - if that could be
> checked if they[1][2] fix the problem with new libxml, that would be
> good to know. (I haven't gone further than looking at the recent commit log)
>
> If they are relevant and they fix the issue, then I would remove libxml
> update until it is fixed (it seems there are some other issues with it),

I have to correct myself about the "other issues" statement: I missed
that the problem was present with v2 version of the libxml update, not
with v3. In this case the libxslt tests should pass with the current
libxml (though don't know if it will reach master branch before
Whinlatter release).

> and accept your update in a way that passes all tests with the
> non-updated libxml. And then, once libxml update works, the test-fixing
> patches can be added to libxslt, and everything supposed to work(TM) again.
>
> But on this ML I'm just a random commenter, my personal opinion might
> not be the same as what the project wants :) You might want to wait for
> a second opinion also.
>
> [1]:
> https://gitlab.gnome.org/GNOME/libxslt/-/commit/a7287acdf1dd95e32bde828c10e07949a16b68f3
> [2]:
> https://gitlab.gnome.org/GNOME/libxslt/-/commit/33cd5e56328ab29ef1fd939c4632915e834bb7af
>
>
>> Best Regards,
>> Pratik
>>
>> ________________________________________
>> From: Pratik Farkase <pratik.farkase@est.tech>
>> Sent: 03 November 2025 10:41 AM
>> To: Mathieu Dubois-Briand; Gyorgy Sarvari; openembedded-core@lists.openembedded.org
>> Subject: Re: [OE-core] [PATCH v5] libxslt: add ptest support
>>
>> Hi Mathieu,
>>
>> bug-146 test failure as seen on my local ptest-runner output seems to be fixed and will be incorporated in libxslt master :
>>
>> https://gitlab.gnome.org/GNOME/libxslt/-/issues/159
>>
>> I am not sure why we get different outputs of ptest-runner on Autobuilder and local QEMU test setup. It needs to be investigated further.
>>
>> Best Regards,
>> Pratik
>>
>> ________________________________________
>> From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
>> Sent: 29 October 2025 12:49 PM
>> To: Pratik Farkase; openembedded-core@lists.openembedded.org
>> Subject: Re: [OE-core] [PATCH v5] libxslt: add ptest support
>>
>> On Tue Oct 28, 2025 at 10:05 PM CET, Pratik Farkase wrote:
>>> Hi Mathieu,
>>>
>>> I looked at both the Ptest logs you sent and seems like more tests are failing in the autobuilder than in my local QEMU test setup. The failures appear to be byte-level differences (e.g., “230 bytes vs 275 bytes” for bug-147) rather than functional errors.
>>>
>>> https://valkyrie.yocto.io/pub/non-release/20251026-107/testresults/qemux86-64-ptest/core-image-ptest-libxslt/
>>>
>>> For both qemuarm64 and qemux86-64 machines my local ptest-runner has the following output :
>>>
>> Yes, it looks like a bit intermittent. I launched another run both locally
>> and on the autobuilder, and the result is different: it is closer to
>> yours.
>>
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/2550
>> https://valkyrie.yocto.io/pub/non-release/20251029-63/testresults/qemux86-64-ptest/core-image-ptest-libxslt/
>>
>> --
>> Mathieu Dubois-Briand, Bootlin
>> Embedded Linux and Kernel engineering
>> https://bootlin.com
>>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#225724): https://lists.openembedded.org/g/openembedded-core/message/225724
> Mute This Topic: https://lists.openembedded.org/mt/115943432/6084445
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [skandigraun@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Pratik Farkase Nov. 10, 2025, 4:48 p.m. UTC | #10
Hi Gyorgy,

I finished testing libxslt 1.1.43 ptest with both libxml2 2.12.10 and 2.15.0.

Results:

- libxml2 2.12.10 + unpatched libxslt → only one remaining failure (bug-146.xsl)
- libxml2 2.12.10 + patches [1][2] → 34 test failures.
- libxml2 2.15.0 + unpatched libxslt → 34 test failures.
- libxml2 2.15.0 + patches [1][2] → only one remaining failure (bug-146.xsl).

This confirms that the two upstream commits fix the new-libxml2 (2.15.0) behavior
but are not compatible with the current libxml2 2.12.10.
So, as you suggested, I’ll keep libxslt 1.1.43 unpatched with libxml2 2.12.10
for now and revisit these patches when libxml2 2.15.0 is updated.

Upstream has also acknowledged the remaining bug-146 issue and is preparing
a release with the fix (see [3]), but it is not yet merged in master. We wait for the next upstream libxslt release before updating libxml2 and including the test-fixing patches when there are no failures in autobuilder.

Thanks for pointing me to the relevant commits — they solve the issue almost entirely.

[1] https://gitlab.gnome.org/GNOME/libxslt/-/commit/a7287acdf1dd95e32bde828c10e07949a16b68f3  
[2] https://gitlab.gnome.org/GNOME/libxslt/-/commit/33cd5e56328ab29ef1fd939c4632915e834bb7af  
[3] https://gitlab.gnome.org/GNOME/libxslt/-/issues/159

Best Regards,
Pratik
Pratik Farkase Nov. 10, 2025, 4:51 p.m. UTC | #11
Here is the output of ptest-runner with patched[1][2] libxslt 1.1.43 and libxml 2.15.0

root@qemux86-64:~# ptest-runner libxslt
START: ptest-runner
2025-11-10T16:15
BEGIN: /usr/lib/libxslt/ptest
=== Running libxslt ptests ===
Running .libs/runtest
file ./bug-146.out is 217 bytes, result is 0 bytes
Result for ./bug-146.xsl failed
failed to stat ./bug-146.err
Error for ./bug-146.xsl failed
File ./bug-146.xsl generated an error
## Running REC2 tests
## Running REC tests
## Running REC tests (standalone)
## Running REC tests without dictionaries
## Running REC tests without dictionaries (standalone)
## Running general tests
## Running general tests without dictionaries
## Running encoding tests
## Running documents tests
## Running numbers tests
## Running keys tests
## Running namespaces tests
## Running extensions tests
## Running reports tests
## Running exslt common tests
## Running exslt date tests
## Running exslt dynamic tests
## Running exslt functions tests
## Running exslt math tests
## Running exslt saxon tests
## Running exslt sets tests
## Running exslt strings tests
Total 746 tests, 1 errors
FAIL: runtest returned 1
FAIL: some libxslt tests failed
Finished libxslt ptests

ERROR: Exit status is 1
DURATION: 8
END: /usr/lib/libxslt/ptest
2025-11-10T16:15
STOP: ptest-runner
TOTAL: 1 FAIL: 1
root@qemux86-64:~# xsltproc --version
Using libxml 21500, libxslt 10143 and libexslt 824
xsltproc was compiled against libxml 21500, libxslt 10143 and libexslt 824
libxslt 10143 was compiled against libxml 21500
libexslt 824 was compiled against libxml 21500

Best Regards,
Pratik

________________________________________
From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> on behalf of Pratik Farkase via lists.openembedded.org <pratik.farkase=est.tech@lists.openembedded.org>
Sent: 10 November 2025 5:48 PM
To: Gyorgy Sarvari; Mathieu Dubois-Briand; openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v5] libxslt: add ptest support

Hi Gyorgy,

I finished testing libxslt 1.1.43 ptest with both libxml2 2.12.10 and 2.15.0.

Results:

- libxml2 2.12.10 + unpatched libxslt → only one remaining failure (bug-146.xsl)
- libxml2 2.12.10 + patches [1][2] → 34 test failures.
- libxml2 2.15.0 + unpatched libxslt → 34 test failures.
- libxml2 2.15.0 + patches [1][2] → only one remaining failure (bug-146.xsl).

This confirms that the two upstream commits fix the new-libxml2 (2.15.0) behavior
but are not compatible with the current libxml2 2.12.10.
So, as you suggested, I’ll keep libxslt 1.1.43 unpatched with libxml2 2.12.10
for now and revisit these patches when libxml2 2.15.0 is updated.

Upstream has also acknowledged the remaining bug-146 issue and is preparing
a release with the fix (see [3]), but it is not yet merged in master. We wait for the next upstream libxslt release before updating libxml2 and including the test-fixing patches when there are no failures in autobuilder.

Thanks for pointing me to the relevant commits — they solve the issue almost entirely.

[1] https://gitlab.gnome.org/GNOME/libxslt/-/commit/a7287acdf1dd95e32bde828c10e07949a16b68f3
[2] https://gitlab.gnome.org/GNOME/libxslt/-/commit/33cd5e56328ab29ef1fd939c4632915e834bb7af
[3] https://gitlab.gnome.org/GNOME/libxslt/-/issues/159

Best Regards,
Pratik


________________________________________
From: Gyorgy Sarvari <skandigraun@gmail.com>
Sent: 04 November 2025 3:43 PM
To: Pratik Farkase; Mathieu Dubois-Briand; openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v5] libxslt: add ptest support

On 11/4/25 15:29, Gyorgy Sarvari via lists.openembedded.org wrote:
> On 11/4/25 15:05, Pratik Farkase wrote:
>> Hi Gyorgy,
>>
>> Thanks for your support.
>>
>> I’m now seeing more test failures (as seen in the Autobuilder) when using the `libxml2_2.15.0.bb` recipe from the mathieu/master-next branch, compared to the default `libxml2_2.12.10.bb` recipe from Scarthgap.
>>
>> The ptest implementation for libxslt is identical in both cases, but the number of failing tests increases when we bump the libxml2 version to the one in master. I’m not entirely sure if this is solely due to the version change or if other updates in the newer libxml2 are contributing to the issue.
>>
>> Would you prefer that we wait for the libxslt maintainers to fix these tests upstream, or should I disable the failing tests and roll out a new patch with the existing passing tests in the meantime?
> In the libxslt repo there are 1-2 recent commits that say suspicious
> things like "update test outputs for new libxml2" - if that could be
> checked if they[1][2] fix the problem with new libxml, that would be
> good to know. (I haven't gone further than looking at the recent commit log)
>
> If they are relevant and they fix the issue, then I would remove libxml
> update until it is fixed (it seems there are some other issues with it),

I have to correct myself about the "other issues" statement: I missed
that the problem was present with v2 version of the libxml update, not
with v3. In this case the libxslt tests should pass with the current
libxml (though don't know if it will reach master branch before
Whinlatter release).

> and accept your update in a way that passes all tests with the
> non-updated libxml. And then, once libxml update works, the test-fixing
> patches can be added to libxslt, and everything supposed to work(TM) again.
>
> But on this ML I'm just a random commenter, my personal opinion might
> not be the same as what the project wants :) You might want to wait for
> a second opinion also.
>
> [1]:
> https://gitlab.gnome.org/GNOME/libxslt/-/commit/a7287acdf1dd95e32bde828c10e07949a16b68f3
> [2]:
> https://gitlab.gnome.org/GNOME/libxslt/-/commit/33cd5e56328ab29ef1fd939c4632915e834bb7af
>
>
>> Best Regards,
>> Pratik
>>
>> ________________________________________
>> From: Pratik Farkase <pratik.farkase@est.tech>
>> Sent: 03 November 2025 10:41 AM
>> To: Mathieu Dubois-Briand; Gyorgy Sarvari; openembedded-core@lists.openembedded.org
>> Subject: Re: [OE-core] [PATCH v5] libxslt: add ptest support
>>
>> Hi Mathieu,
>>
>> bug-146 test failure as seen on my local ptest-runner output seems to be fixed and will be incorporated in libxslt master :
>>
>> https://gitlab.gnome.org/GNOME/libxslt/-/issues/159
>>
>> I am not sure why we get different outputs of ptest-runner on Autobuilder and local QEMU test setup. It needs to be investigated further.
>>
>> Best Regards,
>> Pratik
>>
>> ________________________________________
>> From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
>> Sent: 29 October 2025 12:49 PM
>> To: Pratik Farkase; openembedded-core@lists.openembedded.org
>> Subject: Re: [OE-core] [PATCH v5] libxslt: add ptest support
>>
>> On Tue Oct 28, 2025 at 10:05 PM CET, Pratik Farkase wrote:
>>> Hi Mathieu,
>>>
>>> I looked at both the Ptest logs you sent and seems like more tests are failing in the autobuilder than in my local QEMU test setup. The failures appear to be byte-level differences (e.g., “230 bytes vs 275 bytes” for bug-147) rather than functional errors.
>>>
>>> https://valkyrie.yocto.io/pub/non-release/20251026-107/testresults/qemux86-64-ptest/core-image-ptest-libxslt/
>>>
>>> For both qemuarm64 and qemux86-64 machines my local ptest-runner has the following output :
>>>
>> Yes, it looks like a bit intermittent. I launched another run both locally
>> and on the autobuilder, and the result is different: it is closer to
>> yours.
>>
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/2550
>> https://valkyrie.yocto.io/pub/non-release/20251029-63/testresults/qemux86-64-ptest/core-image-ptest-libxslt/
>>
>> --
>> 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 9950e46776..b295e0049f 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -47,6 +47,7 @@  PTESTS_FAST = "\
     libxml-simple-perl \
     libxml2 \
     libxmlb \
+    libxslt \
     logrotate \
     lua \
     lzo \
diff --git a/meta/recipes-support/libxslt/files/run-ptest b/meta/recipes-support/libxslt/files/run-ptest
new file mode 100755
index 0000000000..1673f933e5
--- /dev/null
+++ b/meta/recipes-support/libxslt/files/run-ptest
@@ -0,0 +1,38 @@ 
+#!/bin/sh
+set -eu
+
+PT_DIR="$(dirname "$0")"
+cd "$PT_DIR/tests"
+
+echo "=== Running libxslt ptests ==="
+
+RESULT=0
+
+if [ -x .libs/runtest ]; then
+    echo "Running .libs/runtest"
+    ./.libs/runtest --verbose --timing 2>&1 | tee runtest.log
+    RT_RET=${PIPESTATUS[0]:-0} || RT_RET=$?
+elif [ -x ./runtest ]; then
+    echo "Running runtest"
+    ./runtest --verbose --timing 2>&1 | tee runtest.log
+    RT_RET=${PIPESTATUS[0]:-0} || RT_RET=$?
+else
+    echo "FAIL: runtest binary not found"
+    exit 1
+fi
+
+if [ "$RT_RET" -ne 0 ]; then
+    echo "FAIL: runtest returned $RT_RET"
+    RESULT=1
+else
+    echo "PASS: runtest"
+fi
+
+if [ "$RESULT" -eq 0 ]; then
+    echo "PASS: all libxslt tests passed"
+else
+    echo "FAIL: some libxslt tests failed"
+fi
+
+echo "Finished libxslt ptests"
+exit "$RESULT"
diff --git a/meta/recipes-support/libxslt/libxslt_1.1.43.bb b/meta/recipes-support/libxslt/libxslt_1.1.43.bb
index e08e92085d..e82db99f83 100644
--- a/meta/recipes-support/libxslt/libxslt_1.1.43.bb
+++ b/meta/recipes-support/libxslt/libxslt_1.1.43.bb
@@ -11,10 +11,11 @@  LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://Copyright;md5=0cd9a07afbeb24026c9b03aecfeba458"
 
 SECTION = "libs"
-DEPENDS = "libxml2"
+DEPENDS = "libxml2 libxslt-native"
 
 SRC_URI = "https://download.gnome.org/sources/libxslt/1.1/libxslt-${PV}.tar.xz \
-           file://gnome-libxslt-bug-139-apple-fix.diff"
+           file://gnome-libxslt-bug-139-apple-fix.diff \
+	    file://run-ptest"
 
 SRC_URI[sha256sum] = "5a3d6b383ca5afc235b171118e90f5ff6aa27e9fea3303065231a6d403f0183a"
 
@@ -26,7 +27,45 @@  S = "${WORKDIR}/libxslt-${PV}"
 
 BINCONFIG = "${bindir}/xslt-config"
 
-inherit autotools pkgconfig binconfig-disabled lib_package multilib_header
+inherit autotools pkgconfig binconfig-disabled lib_package multilib_header ptest
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
+
+RDEPENDS:${PN}-ptest += "${PN}-bin make libxslt-utils libxml2-utils xmlto coreutils sed grep diffutils bash libxml2-utils perl"
+
+do_compile_ptest() {
+    cp -r ${S}/tests ${B}/
+    oe_runmake -C ${B}/tests runtest || true
+    if grep -q "run-threads" ${B}/tests/Makefile; then
+        oe_runmake -C ${B}/tests run-threads || true
+    fi
+}
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+
+    if [ -d ${B}/tests/.libs ]; then
+        cp -a ${B}/tests/.libs ${D}${PTEST_PATH}/tests/
+    fi
+
+    for f in runtest run-threads; do
+        if [ -f ${B}/tests/$f ]; then
+            install -m 0755 ${B}/tests/$f ${D}${PTEST_PATH}/tests/
+            sed -i -e "s#${TMPDIR}##g" \
+                   -e "s#${B}##g" \
+                   -e "s#${S}##g" \
+                   ${D}${PTEST_PATH}/tests/$f || true
+        fi
+    done
+
+    cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/ || true
+    find ${D}${PTEST_PATH}/tests -name 'Makefile*' -delete || true
+    find ${D}${PTEST_PATH}/tests -name '.deps' -type d -exec rm -rf {} + || true
+
+    if [ -f ${WORKDIR}/run-ptest ]; then
+        install -m 0755 ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/
+    fi
+}
 
 do_configure:prepend () {
 	# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header.
@@ -39,6 +78,7 @@  do_configure:prepend () {
 }
 
 EXTRA_OECONF = "--without-python --without-debug --without-crypto"
+EXTRA_OECONF:append:ptest = " --with-plugins"
 # older versions of this recipe had ${PN}-utils
 RPROVIDES:${PN}-bin += "${PN}-utils"
 RCONFLICTS:${PN}-bin += "${PN}-utils"