Bug 13409

Summary: dbus ptest times out occasionally
Product: [QA/Testing] Package Testing (ptest) Reporter: Richard Purdie <richard.purdie>
Component: ptestAssignee: Changqing Li <changqing.li>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: High CC: changqing.li, randy.macleod
Version: unspecified   
Target Milestone: 2.8 M3   
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 2019-06-19 11:50:59 UTC
When this happens the log is:

https://autobuilder.yocto.io/pub/non-release/20190618-9/testresults/qemux86-64-ptest/dbus-test.log

2019-06-18T18:26
ERROR: Unable to detach from controlling tty, Inappropriate ioctl for device
2019-06-18T18:26

ERROR: Exit status is 9
DURATION: 301

https://autobuilder.yocto.io/pub/non-release/20190618-9/testresults/testresult-report.txt
Comment 1 Changqing Li 2019-07-25 05:12:36 UTC
Testcase test-bus of dbus-ptest need long time to finish. And ptest-runner's default timeout is 300s,  so  dbus-ptest will be killed by ptest-runner when 
timeout.

Here is time of each case needed(Test on qemux86-64 with kvm)
root@qemux86-64:/usr/lib/dbus-test/ptest/test# for i in `ls test*\.log`; do echo -n $i ": "; grep real $i; done
test-bus-launch-helper.log : real	0m 0.02s
test-bus-system.log : real	0m 0.00s
test-bus.log : real	33m 42.13s     --------------------->33m is longer than 300s
test-corrupt.log : real	0m 0.00s
test-dbus-daemon-eavesdrop.log : real	0m 0.02s
test-dbus-daemon.log : real	0m 0.38s
test-dbus.log : real	0m 10.98s
test-fdpass.log : real	0m 0.05s
test-loopback.log : real	0m 0.08s
test-marshal.log : real	0m 0.00s
test-message.log : real	0m 0.00s
test-monitor.log : real	0m 0.10s
test-names.log : real	0m 0.00s
test-printf.log : real	0m 0.02s
test-refs.log : real	0m 0.59s
test-relay.log : real	0m 0.72s
test-sd-activation.log : real	0m 0.00s
test-shell.log : real	0m 0.00s
test-spawn.log : real	0m 0.00s
test-syntax.log : real	0m 0.00s
test-syslog.log : real	0m 0.00s
test-uid-permissions.log : real	0m 0.00s
test-variant.log : real	0m 0.16s


Upstream have separated out the subcases which take long time out of bin test-bus, but it is only on unstable release. maybe in the future, we can skip the subcases that take long time. refer:
https://gitlab.freedesktop.org/dbus/dbus/commit/3b512610c0414c4f40c464e1a8dd5d3d665e74d7



@Randy and Richard, there are several options to fix this problem, can you give your opinion, thanks.

1) skip test-bus for dbus ptest
2) add a patch for ptest-runner, for dbus-ptest, set timeout to 600s.
3) there is  an option for ptest-runner to set timeout, change autobuilder run
   with ptest-runner -t 600, but this will make all test run with this timeout
Comment 2 Richard Purdie 2019-08-08 15:04:56 UTC
I'd suggest we skip the test, we don't want to spend 30mins on that
Comment 3 Randy MacLeod 2019-08-08 15:05:16 UTC
Skip the test. 
Report the issue upstream as a concern.
Comment 4 Randy MacLeod 2019-08-15 14:54:41 UTC
Please skip the test.