Page MenuHomeFreeBSD

Fix test timeout: common.dtraceUtil.t_dtrace_contrib.tst_DestructWithFunction_d_ksh
ClosedPublic

Authored by lwhsu on Jul 20 2017, 6:08 PM.

Details

Summary

This test timeout on a quiet system because there is nobody triggers read probefunc while test execution.

Add a delay-executed cat command to generate some noise

Test Plan

cd /usr/tests/cddl/usr.sbin/dtrace/common/dtraceUtil && kyua debug t_dtrace_contrib:tst.DestructWithFunction.d.ksh

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

lwhsu created this revision.Jul 20 2017, 6:08 PM
Herald added 1 blocking reviewer(s): gnn. · View Herald TranscriptJul 20 2017, 6:08 PM
Herald added a subscriber: imp. · View Herald Transcript
ngie accepted this revision.Jul 20 2017, 6:13 PM

It might be a good idea to increase the sleep time in the backgrounded process to avoid clock skew, but this should work. Thanks!!

lwhsu added a comment.Jul 20 2017, 6:40 PM
In D11673#241834, @ngie wrote:

It might be a good idea to increase the sleep time in the backgrounded process to avoid clock skew, but this should work. Thanks!!

In the long run I would modify dtest (test suite driver) to enable execute some post-actions.

lwhsu added a comment.Jul 23 2017, 9:14 PM

Another thought is converting this test case to tst.DestructWithFunction.d and tst.DestructWithFunction.d.exe, to prevent race condition.

markj edited edge metadata.Jul 24 2017, 1:04 AM

Another thought is converting this test case to tst.DestructWithFunction.d and tst.DestructWithFunction.d.exe, to prevent race condition.

Or just kill the shell process from within the script. There are many dtrace tests that do this.

lwhsu updated this revision to Diff 31126.Jul 24 2017, 10:30 AM
lwhsu edited edge metadata.

Use a subprocess to execute auxiliary program and recycle it after test

ngie requested changes to this revision.Jul 24 2017, 5:21 PM
ngie added inline comments.
cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh
45 ↗(On Diff #31126)

Could you please add a sleep 0.1 here to avoid burning CPU too badly? Both FreeBSD and Solaris's version of sleep(1) support floating point precision.

This revision now requires changes to proceed.Jul 24 2017, 5:21 PM
lwhsu updated this revision to Diff 31142.Jul 24 2017, 9:56 PM
lwhsu edited edge metadata.

Add a sleep(1) to avoid CPU busy loop.

lwhsu marked an inline comment as done.Jul 24 2017, 9:56 PM
ngie accepted this revision.Jul 24 2017, 9:59 PM
gnn accepted this revision.Jul 25 2017, 10:25 AM
This revision is now accepted and ready to land.Jul 25 2017, 10:25 AM
This revision was automatically updated to reflect the committed changes.