Skip to contentSkip to conversation

strace: fix ptest path not found

PATCH In review Sinan Kaya 2 participants 3 messages Oct 30, 2018 – Nov 2, 2018

lore
Share & tools
lore

Sinan Kaya

author
#0 lore raw

PATCH 1/1 strace: fix ptest path not found

Running strace ptest is failing with file not found errors.

../../strace: Process 1990 attached
diff: ../../../ptest0/tests/strace-ff.expected: No such file or directory

Even though file is present in the /usr/lib/strace/ptest/tests directory.

Issue is caused by sed doing a find and replace causing an incorrect path to be generated.

Below is the srcdir and top_srcdir in the Makefile:

srcdir = ../../ptest0/tests
top_srcdir = ../../strace-4.20

Replacing this with

srcdir = .
top_srcdir = ..

old results:
===================================================
30 of 373 tests failed
(117 tests were not run)
Please report to [email protected]
===================================================

new results:
===================================================
13 of 373 tests failed
(117 tests were not run)
Please report to [email protected]
===================================================

---
 meta/recipes-devtools/strace/strace_4.20.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/strace/strace_4.20.bb +2 -1
index 869c12f65a..0b35f5443d 100644
@@ -43,7 +43,8 @@ do_compile_ptest() {
 
 do_install_ptest() {
 	oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
-	sed -i -e '/^src/s/strace.*[1-9]/ptest/' \
+	sed -i -e 's:^srcdir =.*:srcdir = .:g' \
+	    -e 's:^top_srcdir =.*:top_srcdir = ..:g' \
 	    -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
 	    -e 's|${DEBUG_PREFIX_MAP}||g' \
 	    -e 's:${HOSTTOOLS_DIR}/::g' \
Signature · 1 line
2.19.0
#1 lore raw

Sinan,

Quoted 8 lines · Sinan Kaya

Running strace ptest is failing with file not found errors.

../../strace: Process 1990 attached
diff: ../../../ptest0/tests/strace-ff.expected: No such file or directory

Even though file is present in the /usr/lib/strace/ptest/tests directory.

Quoted 7 lines

Issue is caused by sed doing a find and replace causing an incorrect path to be generated.

Below is the srcdir and top_srcdir in the Makefile:

srcdir = ../../ptest0/tests
top_srcdir = ../../strace-4.20

Do you know if this affects Master?

- armin

Quoted 39 lines

Replacing this with

srcdir = .
top_srcdir = ..

old results:
===================================================
30 of 373 tests failed
(117 tests were not run)
Please report to [email protected]
===================================================

new results:
===================================================
13 of 373 tests failed
(117 tests were not run)
Please report to [email protected]
===================================================

---
 meta/recipes-devtools/strace/strace_4.20.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/strace/strace_4.20.bb +2 -1
index 869c12f65a..0b35f5443d 100644
@@ -43,7 +43,8 @@ do_compile_ptest() {
 
 do_install_ptest() {
 	oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
-	sed -i -e '/^src/s/strace.*[1-9]/ptest/' \
+	sed -i -e 's:^srcdir =.*:srcdir = .:g' \
+	    -e 's:^top_srcdir =.*:top_srcdir = ..:g' \
 	    -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
 	    -e 's|${DEBUG_PREFIX_MAP}||g' \
 	    -e 's:${HOSTTOOLS_DIR}/::g' \
author
#2 lore raw
Quoted 3 lines · On 11/1/2018 7:48 PM, akuster808 wrote:
Quoted 2 lines

srcdir = ../../ptest0/tests
top_srcdir = ../../strace-4.20

Do you know if this affects Master?

I have not tested master but I have seen the same issue there. I looked for a solution at master before debugging this.