* [PATCH V2] coreutils: delete gcc parameter for ptest
@ 2023-04-19 1:27 qiutt
0 siblings, 0 replies; only message in thread
From: qiutt @ 2023-04-19 1:27 UTC (permalink / raw)
To: qiutt, openembedded-core; +Cc: fnstml-fujitsuten
From: Qiu Tingting <qiutt@fujitsu.com>
If gcc is installed in image, ptest result has 4 ERROR.
ERROR: tests/rm/r-root.sh
ERROR: tests/rm/rm-readdir-fail.sh
ERROR: tests/cp/nfs-removal-race.sh
ERROR: tests/ls/getxattr-speedup.sh
r-root.log as an example:
--------------------------
k.c:1:10: fatal error: stdio.h: No such file or directory
1 | #include <stdio.h>
| ^~~~~~~~~
compilation terminated.
r-root.sh: set-up failure: failed to build shared library
ERROR tests/rm/r-root.sh (exit status: 99)
--------------------------
reason:
The run-ptest calls make cmd to run test cases.
In these cases, k.c file is created and compiled by gcc before run.
There is a stdio.h file in /usr/include/ directory.
Normally, gcc has /usr/include as part of its default search path.
But in Makefile, it has the "--sysroot=recipe-sysroot" parameter
which makes it does not work.
solution:
Delete "--sysroot=recipe-sysroot" from Makefile.
other:
If gcc is not installed in image, these cases will be skipped.
---
meta/recipes-core/coreutils/coreutils_9.1.bb | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-core/coreutils/coreutils_9.1.bb b/meta/recipes-core/coreutils/coreutils_9.1.bb
index 4807eefd04..e12a6d6797 100644
--- a/meta/recipes-core/coreutils/coreutils_9.1.bb
+++ b/meta/recipes-core/coreutils/coreutils_9.1.bb
@@ -193,6 +193,7 @@ do_install_ptest () {
sed -i '/^abs_top_builddir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile
sed -i '/^abs_top_srcdir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile
sed -i '/^built_programs/s/ginstall/install/g' ${D}${PTEST_PATH}/Makefile
+ sed -i '/^CC =/s/ --sysroot=.*recipe-sysroot/ /g' ${D}${PTEST_PATH}/Makefile
chmod -R 777 ${D}${PTEST_PATH}
# Disable subcase stty-pairs.sh, it will cause test framework hang
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-19 1:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-19 1:27 [PATCH V2] coreutils: delete gcc parameter for ptest qiutt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox