Date: Sun, 10 Jan 2021 00:17:30 GMT From: Alan Somers <asomers@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 19cca0b9613d - main - aio: fix the tests when ZFS is not available Message-ID: <202101100017.10A0HUpU063964@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=19cca0b9613d7c3058e41baf0204245119732235 commit 19cca0b9613d7c3058e41baf0204245119732235 Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2021-01-10 00:14:55 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2021-01-10 00:16:38 +0000 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: 022ca2fc7fe08d51f33a1d23a9be49e6d132914e --- sys/contrib/openzfs/module/zfs/vdev.c | 1 + tests/sys/aio/aio_test.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/sys/contrib/openzfs/module/zfs/vdev.c b/sys/contrib/openzfs/module/zfs/vdev.c index 7ffe924212da..0b96c52669bd 100644 --- a/sys/contrib/openzfs/module/zfs/vdev.c +++ b/sys/contrib/openzfs/module/zfs/vdev.c @@ -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]); diff --git a/tests/sys/aio/aio_test.c b/tests/sys/aio/aio_test.c index f563ec5fa5d9..b34e7c13f5a4 100644 --- a/tests/sys/aio/aio_test.c +++ b/tests/sys/aio/aio_test.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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101100017.10A0HUpU063964>