zvol_swap_003_pos shouldn't use swapadd in cleanup
The zfs test zvol_swap_003_pos during cleanup does a swapadd in its cleanup function to re-add any system swap devices from /etc/vfstab. However this conflicts with the overall zvol swap test group cleanup function (
usr/src/test/zfs-test/tests/functional/zvol/zvol_swap/cleanup.ksh) which also tries to do this.
Both trying to do this will cause the final cleanup to fail. Instead zvol_swap_003_pos should let the test group cleanup function handle this. The test group setup already removes any system swap devices prior to running any zvol swap tests, so omitting this step in the individual test would more correctly leave the system state as it was at the start of the test.
Updated by Jason King over 2 years ago
To test, I ran all of the zvol swap tests w/ this fix combined with the fix for #12281. With both fixes applied, all of the zvol swap tests (including setup and cleanup) now pass. In addition, I verified that after the tests were complete that any temporary swap volumes were removed and the test pool was destroyed.
Updated by Electric Monk about 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit d3879c39d2a534146eaf46dc510b80678ea24023 Author: Jason King <firstname.lastname@example.org> Date: 2020-02-14T22:47:37.000Z 12181 zvol tests should avoid grep -w 12281 zvol_swap_003_pos shouldn't use swapadd in cleanup Reviewed by: Kody Kantor <email@example.com> Reviewed by: Andy Stormont <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>