DTtrace test suite driver: execute the verifying script generated by test case
ClosedPublic

Authored by lwhsu on Jul 24 2017, 9:34 PM.

Details

Summary

The test case common.funcs.t_dtrace_contrib.tst_basename_d generates a verifying
script which needs to be run to complete the test.

While here, add missing shebang.

Test Plan

cd /usr/tests/cddl/usr.sbin/dtrace && kyua test

This depends on D11707 which fixes common.funcs.t_dtrace_contrib.tst_basename_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 24 2017, 9:34 PM
Herald added 1 blocking reviewer(s): gnn. · View Herald TranscriptJul 24 2017, 9:34 PM
Herald added a subscriber: imp. · View Herald Transcript
lwhsu edited the summary of this revision. (Show Details)Jul 24 2017, 9:35 PM
markj added inline comments.Jul 24 2017, 9:43 PM
cddl/usr.sbin/dtrace/tests/tools/dtest.sh
90 ↗(On Diff #31136)

I don't see why we're suppressing stderr here. Don't we want to see it? I would instead write:

head -n 1 $STDOUT | grep -q -E <regexp>

ngie accepted this revision.Jul 24 2017, 9:54 PM
lwhsu added inline comments.Jul 24 2017, 10:10 PM
cddl/usr.sbin/dtrace/tests/tools/dtest.sh
90 ↗(On Diff #31136)

I originally though it suppress the case that STDOUT does not exist, but now I think it's also fine to yell when that does happen. The 2nd suppressing is similar.

lwhsu updated this revision to Diff 31146.Jul 24 2017, 10:12 PM
lwhsu edited edge metadata.
  • Remove unnecessary stderr suppressing
  • Use -q to suppress grep(1) output
lwhsu marked 2 inline comments as done.Jul 24 2017, 10:12 PM
ngie accepted this revision.Jul 24 2017, 10:13 PM
markj accepted this revision.Jul 24 2017, 10:15 PM
gnn accepted this revision.Jul 25 2017, 10:24 AM
This revision is now accepted and ready to land.Jul 25 2017, 10:24 AM
This revision was automatically updated to reflect the committed changes.