Bug 13841

Summary: quilt ptest intermittent failure
Product: [QA/Testing] Package Testing (ptest) Reporter: Richard Purdie <richard.purdie>
Component: ptestAssignee: Yi Fan Yu <yf3yu>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: Medium+ CC: alex.kanavin, flowergom, randy.macleod
Version: unspecified   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Richard Purdie 2020-03-21 13:39:19 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/93/builds/459

AssertionError: Failed ptests:
{'quilt': ['patch-wrapper.test']}
Comment 1 Richard Purdie 2020-03-22 11:06:05 UTC
That leads to https://autobuilder.yocto.io/pub/non-release/20200321-1/testresults/qemuarm64-ptest-fast/testresults.json
which has the log:

PASS: one.test
[patch-wrapper.test]
[1] $ mkdir somewhere -- ok
[3] $ cat > foo.orig -- ok
[9] $ sed -e 's/3/3a/' foo.orig > foo -- ok
[10] $ diff -u foo.orig foo > foo.diff -- ok
[11] $ mv foo.orig foo -- ok
[13] $ mkdir ${QUILT_PATCHES:-patches} -- ok
[14] $ patch-wrapper -s -p0 < foo.diff -- ok
[15] $ quilt pop -q -- ok
[18] $ rm -rf ${QUILT_PATCHES:-patches} ${QUILT_PC:-.pc} -- ok
[20] $ mkdir ${QUILT_PATCHES:-patches} -- ok
[21] $ patch-wrapper --backup -B xxx/ -s -p0 < foo.diff -- ok
[22] $ find xxx -type f -- ok
[24] $ quilt pop -q -- ok
[27] $ rm -rf ${QUILT_PATCHES:-patches} ${QUILT_PC:-.pc} -- ok
[29] $ mkdir ${QUILT_PATCHES:-patches} -- ok
[30] $ patch-wrapper -s -p0 -i foo.diff -- ok
[31] $ quilt pop -q -- ok
[34] $ rm -rf ${QUILT_PATCHES:-patches} ${QUILT_PC:-.pc} -- ok
[36] $ mkdir ${QUILT_PATCHES:-patches} -- ok
[37] $ patch-wrapper -p0 < foo.diff -- ok
[39] $ quilt pop -q -- ok
[42] $ rm -rf ${QUILT_PATCHES:-patches} ${QUILT_PC:-.pc} -- ok
[44] $ mv foo.diff somewhere/ -- ok
[45] $ mkdir ${QUILT_PATCHES:-patches} -- ok
[46] $ patch-wrapper -p0 < somewhere/foo.diff -- ok
[48] $ quilt pop -q -- ok
[51] $ rm -rf ${QUILT_PATCHES:-patches} ${QUILT_PC:-.pc} -- ok
[53] $ mkdir ${QUILT_PATCHES:-patches} -- ok
[54] $ patch-wrapper -p0 -i somewhere/foo.diff -- ok
[56] $ quilt pop -q -- ok
[59] $ rm -rf ${QUILT_PATCHES:-patches} ${QUILT_PC:-.pc} -- ok
[61] $ sed -e 's/5/5b/' foo > foo.new -- ok
[62] $ mv foo.new foo -- ok
[63] $ mkdir ${QUILT_PATCHES:-patches} -- ok
[64] $ patch-wrapper -p0 < somewhere/foo.diff -- failed
patching file foo                     == patching file foo
ln: failed to access '.pc/somewhere/foo.diff/foo': No such file or directory != Hunk #1 succeeded at 1 with fuzz 1.
Hunk #1 succeeded at 1 with fuzz 1.   != ~
[67] $ cat foo.orig -- failed
cat: foo.orig: No such file or directory != 1
~                                     != 
~                                     != 3
~                                     != 
~                                     != 5b
[73] $ quilt pop -q -- ok
[76] $ rm -rf ${QUILT_PATCHES:-patches} ${QUILT_PC:-.pc} -- ok
38 commands (36 passed, 2 failed)
make: *** [Makefile:10: check-patch-wrapper] Error 2
FAIL: patch-wrapper.test
Comment 2 Alexander Kanavin 2020-03-24 21:39:54 UTC
This test shouldn't be run at all, as it is included only when --with-patch-wrapper is supplied to ./configure. I sent a patch to match the upstream behaviour.
Comment 3 Matthew Zeng 2020-03-27 16:48:52 UTC
Alexander Kanavin: did you work on this bug? I just got assigned as it was marked as "unassigned".
Comment 4 Alexander Kanavin 2020-03-27 16:55:08 UTC
I didn't get to the bottom of why the test fails intermittently. What  I did was:

1. Made a patch to disable the test (which should not be merged yet, as the intermittent nature of the failure means there might be a deeper issue)

2. Ran -c testimage core-image-sato-ptest-fast three times, all fully passed :-/
Comment 5 Matthew Zeng 2020-04-15 11:37:35 UTC
Since it seems lke the patch https://patchwork.openembedded.org/patch/171262/ is not yet merged, I'll be moving it to 3.2
Comment 6 Randy MacLeod 2020-08-20 09:27:21 UTC
Joe, Sakib has a few bugs so could you work on this one?
Comment 7 Minjae Kim 2021-02-09 00:37:17 UTC
This issue happanded again:

https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/1500/steps/12/log
s/stdio

WARNING: core-image-sato-sdk-ptest-1.0-r0 do_testimage: There were failing ptests.
Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/core/decorator/__init__.py", line 36, in wrapped_f
    return func(*args, **kwargs)
  File "/home/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/core/decorator/__init__.py", line 36, in wrapped_f
    return func(*args, **kwargs)
  File "/home/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/core/decorator/__init__.py", line 36, in wrapped_f
    return func(*args, **kwargs)
  File "/home/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/runtime/cases/ptest.py", line 25, in test_ptestrunner_expectfail
    self.do_ptestrunner()
  File "/home/pokybuild/yocto-worker/qemuarm64-ptest/build/meta/lib/oeqa/runtime/cases/ptest.py", line 112, in do_ptestrunner
    self.fail(failmsg)
AssertionError: Failed ptests:
{'libinput': ['libinput-test-suite'], 'quilt': ['patch-wrapper.test']}

And I think that it also related with https://bugzilla.yoctoproject.org/show_bug.cgi?id=14164
Comment 8 Yi Fan Yu 2021-02-10 00:17:05 UTC
Could not reproduce on qemuarm64

Might be because of filesystem filling up.
I will try running all testsuite
Comment 9 Yi Fan Yu 2021-02-11 15:28:58 UTC
since i have trouble reproducing, the problem is not in quilt.
The autobuilder ptest seems to always fail, each time with a different one
the usual culprits are tcl, libevent and quilt

Investigating if they have any similarities might be helpful
Comment 10 Yi Fan Yu 2021-03-26 15:33:20 UTC
not seen recently and cannot reproduce locally...