aio: fix the tests when ZFS is not available
Don't try to cleanup the zpool if we couldn't create a zpool in the
first place.
Submitted by: tmunro
MFC-with: 022ca2fc7f
This commit is contained in:
parent
408c514f73
commit
19cca0b961
@ -3263,6 +3263,7 @@ vdev_load(vdev_t *vd)
|
||||
|
||||
/*
|
||||
* Recursively load all children.
|
||||
* TODO: parallelize.
|
||||
*/
|
||||
for (int c = 0; c < vd->vdev_children; c++) {
|
||||
error = vdev_load(vd->vdev_child[c]);
|
||||
|
@ -943,6 +943,10 @@ aio_zvol_cleanup(void)
|
||||
char cmd[160];
|
||||
|
||||
pidfile = fopen("pidfile", "r");
|
||||
if (pidfile == NULL && errno == ENOENT) {
|
||||
/* Setup probably failed */
|
||||
return;
|
||||
}
|
||||
ATF_REQUIRE_MSG(NULL != pidfile, "fopen: %s", strerror(errno));
|
||||
ATF_REQUIRE_EQ(1, fscanf(pidfile, "%d", &testpid));
|
||||
fclose(pidfile);
|
||||
|
Loading…
Reference in New Issue
Block a user