From patchwork Thu Mar 15 20:50:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 10285789 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 666AF6061F for ; Thu, 15 Mar 2018 20:59:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5920528BF5 for ; Thu, 15 Mar 2018 20:59:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B6E128C17; Thu, 15 Mar 2018 20:59:37 +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 CBF3B28BF5 for ; Thu, 15 Mar 2018 20:59:36 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 20BE6223FCF4F; Thu, 15 Mar 2018 13:53:12 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=dan.j.williams@intel.com; receiver=linux-nvdimm@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6E3FA223FCF33 for ; Thu, 15 Mar 2018 13:53:10 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Mar 2018 13:59:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,312,1517904000"; d="scan'208";a="39289859" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga001.jf.intel.com with ESMTP; 15 Mar 2018 13:59:34 -0700 Subject: [ndctl PATCH] ndctl. test: fix module-taint sanity-check From: Dan Williams To: linux-nvdimm@lists.01.org Date: Thu, 15 Mar 2018 13:50:29 -0700 Message-ID: <152114702911.748.6433135505529426881.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-2-gc94f MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.23 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 nfit_test_init() validates that the libnvdimm modules that a test would use are the properly instrumented external versions. If module signing is enabled the sanity check will fail because the check expects only the 'O' flag, but unsigned external modules will have the 'O' flag and the 'E' flag set. Relax the constraint to just check for 'O'. Fixes: 00fc65075c89 ("test: validate nfit_test modules...") Signed-off-by: Dan Williams --- test/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core.c b/test/core.c index ca983e4913f7..4b36b2d14d7b 100644 --- a/test/core.c +++ b/test/core.c @@ -195,7 +195,7 @@ retry: break; } - if (strcmp(attr, "O") != 0) { + if (!strchr(attr, 'O')) { log_err(&log_ctx, "%s.ko: expected taint: O got: %s\n", name, attr); break;