public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH V1] coreutils: Add gcc parameter for ptest
@ 2023-04-14  8:53 qiutt
  2023-04-14  9:41 ` [OE-core] " Luca Ceresoli
  2023-04-14 10:06 ` Richard Purdie
  0 siblings, 2 replies; 10+ messages in thread
From: qiutt @ 2023-04-14  8:53 UTC (permalink / raw)
  To: openembedded-core; +Cc: fnstml-fujitsuten, Qiu Tingting

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:
  In these cases, k.c file is created and compiled by gcc before run.
  There is a stdio.h file in /usr/include/ directory,
  but gcc parameter is not set it.

solution:
  Add "-l /usr/include/" in gcc parameter.

other:
  If gcc is not installed in image, these cases will be skipped.

Signed-off-by: Qiu Tingting <qiutt@fujitsu.com>
---
 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..fe785b673d 100644
--- a/meta/recipes-core/coreutils/coreutils_9.1.bb
+++ b/meta/recipes-core/coreutils/coreutils_9.1.bb
@@ -184,6 +184,7 @@ do_install_ptest () {
     install ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
     cp ${B}/Makefile ${D}${PTEST_PATH}/
     cp ${S}/init.cfg ${D}${PTEST_PATH}/
+    sed -i 's/CC -Wall -shared/CC -Wall -shared -l \/usr\/include\//g' ${D}${PTEST_PATH}/init.cfg
     cp -r ${B}/src ${D}${PTEST_PATH}/
     cp -r ${S}/src/*.c ${D}${PTEST_PATH}/src
     sed -i '/^VPATH/s/= .*$/= ./g' ${D}${PTEST_PATH}/Makefile
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-04-18  5:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-14  8:53 [PATCH V1] coreutils: Add gcc parameter for ptest qiutt
2023-04-14  9:41 ` [OE-core] " Luca Ceresoli
2023-04-18  1:00   ` Tingting Qiu (Fujitsu)
2023-04-14 10:06 ` Richard Purdie
2023-04-14 16:11   ` Khem Raj
2023-04-18  1:05     ` Tingting Qiu (Fujitsu)
2023-04-18  1:13       ` Khem Raj
2023-04-18  3:27         ` Tingting Qiu (Fujitsu)
2023-04-18  3:42         ` qiutt
2023-04-18  5:22           ` [OE-core] " Khem Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox