Page MenuHomeFreeBSD

Replace for/retry loops with "wait_for_ggate_device" calls and atf_check dd calls
ClosedPublic

Authored by ngie on Feb 1 2017, 4:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 18, 1:57 AM
Unknown Object (File)
Oct 31 2024, 8:34 AM
Unknown Object (File)
Oct 2 2024, 10:53 AM
Unknown Object (File)
Sep 29 2024, 8:51 AM
Unknown Object (File)
Sep 29 2024, 5:30 AM
Unknown Object (File)
Sep 28 2024, 2:16 AM
Unknown Object (File)
Sep 25 2024, 8:00 AM
Unknown Object (File)
Sep 7 2024, 8:01 AM
Subscribers

Details

Reviewers
asomers
Summary
  1. Replace for/retry loops with "wait_for_ggate_device" calls

As noted in r313008, the underlying issue was that geom_gate device
creation wasn't created at ggatel command completion, but some short
time after.

ggatec(8) employs similar logic to create /dev/ggate* devices.

Switch from retry loops to wait_for_ggate_device function calls instead
to detect the presence of the /dev/ggate* device, as this function is
sufficient for determining whether or not the character device is ready
for testing

  1. Use atf_check consistently with all dd calls to ensure that data output is expected.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

Test Plan

for i in $(seq 10); do \
sudo kyua test -k /usr/tests/sys/geom/class/gate/Kyuafile \

	    ggate_test:ggated || break; \

done

->

...
ggate_test:ggated -> passed [27.406s]

Results file id is usr_tests_sys_geom_class_gate.20170201-164729-582240
Results saved to /root/.kyua/store/results.usr_tests_sys_geom_class_gate.20170201-164729-582240.db

1/1 passed (0 failed)
$ echo $? $i
0 10
$

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningtests/sys/geom/class/gate/ggate_test.sh:CHMOD1Invalid Executable
Unit
No Test Coverage
Build Status
Buildable 7124
Build 7300: arc lint + arc unit

Event Timeline

ngie retitled this revision from to Replace for/retry loops with "wait_for_ggate_device" calls.
ngie updated this object.
ngie edited the test plan for this revision. (Show Details)
ngie added a reviewer: asomers.
tests/sys/geom/class/gate/ggate_test.sh
32
  1. && break should be removed
  2. This should be called with atf_check.
38
  1. This should be called with atf_check
  2. The trailing backslash should be removed.

Sprinkle atf_check calls around the testcases; resolve issues I pointed out in CR comments

ngie retitled this revision from Replace for/retry loops with "wait_for_ggate_device" calls to Replace for/retry loops with "wait_for_ggate_device" calls and atf_check dd calls.Feb 1 2017, 5:07 PM
ngie updated this object.
ngie marked 2 inline comments as done.
asomers edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Feb 1 2017, 5:18 PM