Fix test timeout: common.speculation.t_dtrace_contrib.tst_NoSpecBuffer_d
ClosedPublic

Authored by lwhsu on Jul 20 2017, 5:15 PM.

Details

Summary

This test timeout on a quiet system because there is nobody triggers
syscall::open:entry and syscall::: probe while test execution.

Add a simple script to generate some noise, it sleeps for 1 second at begining
because current dtest script doesn't support execute a program after invoking
dtrace script.

Test Plan

cd /usr/tests/cddl/usr.sbin/dtrace/common/speculation && kyua debug t_dtrace_contrib:tst_NoSpecBuffer_d

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.
lwhsu created this revision.Jul 20 2017, 5:15 PM
Herald added 1 blocking reviewer(s): gnn. · View Herald TranscriptJul 20 2017, 5:15 PM
Herald added a subscriber: imp. · View Herald Transcript
ngie added a comment.Jul 20 2017, 5:19 PM

Why is a binary file being checked in?

lwhsu added a comment.Jul 20 2017, 5:30 PM
In D11671#241800, @ngie wrote:

Why is a binary file being checked in?

That's not a binary file, it's a script which needs to be run while test running, like other .exe files in test suite. arc(1) treats it as binary...

lwhsu updated this revision to Diff 31016.EditedJul 20 2017, 5:33 PM

svn ps svn:mime-type text/plain tst.NoSpecBuffer.exe

markj added inline comments.Jul 23 2017, 7:56 PM
cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe
27 ↗(On Diff #31016)

This is susceptible to the same race I mentioned in the other review. IMO it is better to just loop forever and let the test harness kill the .exe process once the test has passed.

lwhsu updated this revision to Diff 31109.Jul 23 2017, 9:09 PM

Use infinite loop

lwhsu marked an inline comment as done.Jul 23 2017, 9:10 PM
markj accepted this revision.Jul 24 2017, 1:01 AM
lwhsu updated this revision to Diff 31143.Jul 24 2017, 9:59 PM

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

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.