Bug 237128 - sys/geom/class/eli:online_resize_test fails to clean up cleanly, causing false positives
Summary: sys/geom/class/eli:online_resize_test fails to clean up cleanly, causing fals...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-testing (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-09 00:48 UTC by Enji Cooper
Modified: 2019-04-09 16:22 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer freebsd_triage 2019-04-09 00:48:06 UTC
$ sudo kyua test -k /usr/tests/sys/geom/class/eli/Kyuafile online_resize_test
online_resize_test:online_resize  ->  broken: Test case cleanup did not terminate successfully  [16.632s]

Results file id is usr_tests_sys_geom_class_eli.20190409-003848-587896
Results saved to /root/.kyua/store/results.usr_tests_sys_geom_class_eli.20190409-003848-587896.db

0/1 passed (1 failed)
Comment 1 commit-hook freebsd_committer freebsd_triage 2019-04-09 16:21:02 UTC
A commit references this bug:

Author: ngie
Date: Tue Apr  9 16:20:36 UTC 2019
New revision: 346057
URL: https://svnweb.freebsd.org/changeset/base/346057

Log:
  Fix geli device cleanup

  Final cleanup routines shouldn't be called from testcases; it should be called
  from the testcase cleanup routine.

  Furthermore, `geli_test_cleanup` should take care of cleaning up geli providers
  and the memory disks used for the geli providers. `geli_test_cleanup` will always
  be executed whereas the equivalent logic in `geli_test_body`, may not have been
  executed if the test failed prior to the logic being run.

  Prior to this change, the test case was trying to clean up `$md` twice: once in
  at the end of the test case body function, and the other in the cleanup function.
  The cleanup function logic was failing because there wasn't anything to clean up
  in the cleanup function and the errors weren't being ignored.

  This fixes FreeBSD test suite runs after r345864.

  PR:		237128
  Reviewed by:	asomers, pjd
  Approved by:	emaste (mentor)
  MFC with:	r345864
  Differential Revision:	https://reviews.freebsd.org/D19854

Changes:
  head/tests/sys/geom/class/eli/online_resize_test.sh