Bug 220164 - sys/geom/class/gate/ggate_test: geom_gate tests fail when /dev/ggctl is not available
Summary: sys/geom/class/gate/ggate_test: geom_gate tests fail when /dev/ggctl is not a...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: 11.0-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Enji Cooper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-20 17:58 UTC by Glen Barber
Modified: 2017-11-07 16:44 UTC (History)
2 users (show)

See Also:
ngie: mfc-stable11+
ngie: mfc-stable10+
ngie: mfc-stable9-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Glen Barber freebsd_committer 2017-06-20 17:58:39 UTC
The geom_gate tests do not properly check /dev/ggctl exists after attempting, and failing, to load geom_gate(4).

Output from one of these tests:

===> sys/geom/class/gate/ggate_test:ggatel_file
Result:     failed: atf-check failed; see the output of the test for details
Start time: 2017-06-20T15:59:39.706844Z
End time:   2017-06-20T15:59:39.776547Z
Duration:   0.070s

Metadata:
    allowed_architectures is empty
    allowed_platforms is empty
    description = ggatel can proxy files
    has_cleanup = true
    is_exclusive = false
    required_configs is empty
    required_disk_space = 0
    required_files is empty
    required_memory = 0
    required_programs = ggatel
    required_user = root
    timeout = 15

Standard output:
Executing command [ ggatel create -u 0 work ]

Standard error:
1+0 records in
1+0 records out
1048576 bytes transferred in 0.007412 secs (141464819 bytes/sec)
1+0 records in
1+0 records out
1048576 bytes transferred in 0.008461 secs (123935133 bytes/sec)
Fail: incorrect exit status: 1, expected: 0
stdout:

stderr:
ggatel: geom_gate module not available!

Files left in work directory after failure: ggate.devs, plainfiles, src, work
ggatec: open(/dev/ggctl): No such file or directory
===> Failed tests
sys/geom/class/gate/ggate_test:ggatel_file  ->  failed: atf-check failed; see the output of the test for details  [0.070s]
===> Summary
Results read from /root/.kyua/store/results.usr_tests.20170620-155827-682012.db
Test cases: 1 total, 0 skipped, 0 expected failures, 0 broken, 1 failed
Start time: 2017-06-20T15:59:39.706844Z
End time:   2017-06-20T15:59:39.776547Z
Total time: 0.070s
Comment 1 commit-hook freebsd_committer 2017-07-29 22:02:08 UTC
A commit references this bug:

Author: ngie
Date: Sat Jul 29 22:01:17 UTC 2017
New revision: 321702
URL: https://svnweb.freebsd.org/changeset/base/321702

Log:
  Load geom_gate(4) if necessary before running tests; skip if it can't be loaded

  The test code prior to r311893 loaded geom_gate at test start if necessary and
  skipped the tests if it couldn't be loaded.

  The ATF-ifcation of this test done in r311893 unfortunately dropped this
  functionality.

  This change restores the geom_gate module load and skips the test(s) if unavailable
  in an ATF-like way.

  MFC after:	1 month
  PR:		220164
  Reported by:	gjb

Changes:
  head/tests/sys/geom/class/gate/ggate_test.sh
Comment 2 commit-hook freebsd_committer 2017-07-29 22:04:11 UTC
A commit references this bug:

Author: ngie
Date: Sat Jul 29 22:03:21 UTC 2017
New revision: 321703
URL: https://svnweb.freebsd.org/changeset/base/321703

Log:
  Remove superfluous `exit 0` added in r321702

  atf_skip triggers equivalent functionality, which means the `exit 0`
  is unreachable code.

  PR:		220164
  MFC after:	1 month
  MFC with:	r321702

Changes:
  head/tests/sys/geom/class/gate/ggate_test.sh
Comment 3 commit-hook freebsd_committer 2017-09-08 04:41:00 UTC
A commit references this bug:

Author: ngie
Date: Fri Sep  8 04:39:59 UTC 2017
New revision: 323300
URL: https://svnweb.freebsd.org/changeset/base/323300

Log:
  MFC r321702,r321703:

  r321702:

  Load geom_gate(4) if necessary before running tests; skip if it can't be loaded

  The test code prior to r311893 loaded geom_gate at test start if necessary and
  skipped the tests if it couldn't be loaded.

  The ATF-ifcation of this test done in r311893 unfortunately dropped this
  functionality.

  This change restores the geom_gate module load and skips the test(s) if unavailable
  in an ATF-like way.

  PR:		220164

  r321703:

  Remove superfluous `exit 0` added in r321702

  atf_skip triggers equivalent functionality, which means the `exit 0`
  is unreachable code.

  PR:		220164
  MFC with:	r321702

Changes:
_U  stable/11/
  stable/11/tests/sys/geom/class/gate/ggate_test.sh
Comment 4 commit-hook freebsd_committer 2017-09-08 04:41:02 UTC
A commit references this bug:

Author: ngie
Date: Fri Sep  8 04:39:59 UTC 2017
New revision: 323300
URL: https://svnweb.freebsd.org/changeset/base/323300

Log:
  MFC r321702,r321703:

  r321702:

  Load geom_gate(4) if necessary before running tests; skip if it can't be loaded

  The test code prior to r311893 loaded geom_gate at test start if necessary and
  skipped the tests if it couldn't be loaded.

  The ATF-ifcation of this test done in r311893 unfortunately dropped this
  functionality.

  This change restores the geom_gate module load and skips the test(s) if unavailable
  in an ATF-like way.

  PR:		220164

  r321703:

  Remove superfluous `exit 0` added in r321702

  atf_skip triggers equivalent functionality, which means the `exit 0`
  is unreachable code.

  PR:		220164
  MFC with:	r321702

Changes:
_U  stable/11/
  stable/11/tests/sys/geom/class/gate/ggate_test.sh