From patchwork Sat May 21 21:55:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 9130659 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2A29360221 for ; Sat, 21 May 2016 21:56:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C9B128135 for ; Sat, 21 May 2016 21:56:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1190528159; Sat, 21 May 2016 21:56:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ABBEC28135 for ; Sat, 21 May 2016 21:56:12 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6581A1A1E20; Sat, 21 May 2016 14:56:20 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ml01.01.org (Postfix) with ESMTP id CEBA91A1E20 for ; Sat, 21 May 2016 14:56:19 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 21 May 2016 14:56:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,346,1459839600"; d="scan'208";a="982000737" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.14]) by orsmga002.jf.intel.com with ESMTP; 21 May 2016 14:56:12 -0700 Subject: [ndctl PATCH 3/5] test: fix 'pfn alignment too big' checks From: Dan Williams To: linux-nvdimm@lists.01.org Date: Sat, 21 May 2016 14:55:25 -0700 Message-ID: <146386772584.1884.14928714720506804854.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <146386771020.1884.14405221977201209581.stgit@dwillia2-desk3.amr.corp.intel.com> References: <146386771020.1884.14405221977201209581.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-9-g687f MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP The unit test properly detects when ndctl_pfn_enable() should fail, but it then fails to abort the test. Signed-off-by: Dan Williams --- test/libndctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/libndctl.c b/test/libndctl.c index fb4a2eac74f9..16072fbc8819 100644 --- a/test/libndctl.c +++ b/test/libndctl.c @@ -615,7 +615,7 @@ static int __check_pfn_create(struct ndctl_region *region, if (rc == 0) { fprintf(stderr, "%s: expected pfn enable failure with align: %lx\n", devname, align); - return rc; + return -ENXIO; } ndctl_pfn_delete(pfn); return 0;