Bug 15635 - Automake patch "Set relative to top_builddir path in Makefile to access" breaks "make check"
Summary: Automake patch "Set relative to top_builddir path in Makefile to access" brea...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 5.1
Hardware: x86 Multiple
: Medium normal
Target Milestone: 5.2
Assignee: Ola Nilsson
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2024-10-28 15:23 UTC by Ola Nilsson
Modified: 2024-11-14 16:21 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments
[PATCH] automake: Fix bad path to test-driver (2.55 KB, patch)
2024-10-28 15:23 UTC, Ola Nilsson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ola Nilsson 2024-10-28 15:23:14 UTC
Created attachment 5078 [details]
[PATCH] automake: Fix bad path to test-driver

The automake patch "Set relative to top_builddir path in Makefile to access" sets the default path of `test-driver` to `$(top_builddir)/$(config_aux_dir)` instead of the normal `$(top_srcdir)/$(config_aux_dir)`.  

This breaks `check test` for Automake projects in generated images.

To reproduce, use core-image-kernel-dev with git added. 

git clone https://git.kernel.org/pub/scm/linux/kernel/git/kay/libabc.git
(cd libabc && ./autogen.sh)
mkdir build 
cd build
../libabc/configure CFLAGS='-g -O0' --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
make check

/bin/sh: ./build-aux/test-driver: No such file or directory

Removing the patch makes the checks complete successfully.

The patch should be removed to ensure proper automake behaviour, but that will break some ptests.

For instance ptests for attr fail with 

BEGIN: /usr/lib/attr/ptest
/bin/bash: ../attr-2.5.2/build-aux/test-driver: No such file or directory
make: *** [Makefile:1502: test/attr.log] Error 127

The attached patch makes automake work in both scenarios, but the proper solution is still to fix the tests and remove the patch.
Comment 1 Ola Nilsson 2024-10-29 14:33:19 UTC
Turns out ptest only broke for these recipes in oe-core when the patch was removed:

* acl
* attr
* parted
* sed
* strace

They were all easy to fix.
Comment 2 Randy MacLeod 2024-10-31 14:38:32 UTC
Clearly we want to keep ptests working.
Can you send patches for automake as well as the list of broken ptests? 
Did you also test meta-oe?
Comment 3 Ola Nilsson 2024-11-04 14:29:27 UTC
If we agree that the automake patch should be removed, I can provide patches for the recipes I had to fix ptest for.
I have not looked at PTEST_PROBLEMATIC in oe-core yet.
I intend to look at the ptests in meta-openembedded, haven't gotten very far yet.
Comment 4 Randy MacLeod 2024-11-07 16:00:40 UTC
Ola,

The triage team discussed and we think the discussion needs to happen on the email list. Can you get the ball rolling with an RFC patch and/or join the YP tech call on Tuesday perhaps.
Comment 5 Ola Nilsson 2024-11-07 16:24:10 UTC
Sure, I'll send what I have so far.