From owner-dev-commits-src-all@freebsd.org Sun Jan 10 00:17:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA9374E7716; Sun, 10 Jan 2021 00:17:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DCy8V5hL6z4hJ7; Sun, 10 Jan 2021 00:17:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B55DB1EFAF; Sun, 10 Jan 2021 00:17:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10A0HUoH063965; Sun, 10 Jan 2021 00:17:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10A0HUpU063964; Sun, 10 Jan 2021 00:17:30 GMT (envelope-from git) Date: Sun, 10 Jan 2021 00:17:30 GMT Message-Id: <202101100017.10A0HUpU063964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 19cca0b9613d - main - aio: fix the tests when ZFS is not available MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19cca0b9613d7c3058e41baf0204245119732235 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2021 00:17:30 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=19cca0b9613d7c3058e41baf0204245119732235 commit 19cca0b9613d7c3058e41baf0204245119732235 Author: Alan Somers AuthorDate: 2021-01-10 00:14:55 +0000 Commit: Alan Somers 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);