public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: <qiutt@fujitsu.com>
To: <openembedded-core@lists.openembedded.org>
Cc: <fnstml-fujitsuten@fujitsu.com>, Qiu Tingting <qiutt@fujitsu.com>
Subject: [PATCH V1] coreutils: Add gcc parameter for ptest
Date: Fri, 14 Apr 2023 16:53:20 +0800	[thread overview]
Message-ID: <1681462400-3660-1-git-send-email-qiutt@fujitsu.com> (raw)

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



             reply	other threads:[~2023-04-14  8:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-14  8:53 qiutt [this message]
2023-04-14  9:41 ` [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1681462400-3660-1-git-send-email-qiutt@fujitsu.com \
    --to=qiutt@fujitsu.com \
    --cc=fnstml-fujitsuten@fujitsu.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox