From patchwork Tue Mar 29 22:23: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: 8691421 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8C3C5C0553 for ; Tue, 29 Mar 2016 22:24:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B9DF0202AE for ; Tue, 29 Mar 2016 22:24:04 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id EBF3B2027D for ; Tue, 29 Mar 2016 22:24:03 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3EA411A1F79; Tue, 29 Mar 2016 15:24:33 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by ml01.01.org (Postfix) with ESMTP id 968051A1F79 for ; Tue, 29 Mar 2016 15:24:32 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 29 Mar 2016 15:24:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,413,1455004800"; d="scan'208";a="934261909" Received: from dwillia2-desk3.jf.intel.com ([10.54.39.14]) by fmsmga001.fm.intel.com with ESMTP; 29 Mar 2016 15:24:02 -0700 Subject: [ndctl PATCH] ndctl: limit clear poison test to 4.6+ kernels From: Dan Williams To: linux-nvdimm@lists.01.org Date: Tue, 29 Mar 2016 15:23:25 -0700 Message-ID: <20160329222325.31212.8411.stgit@dwillia2-desk3.jf.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-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Prior kernels do not export a clear poison facility. Signed-off-by: Dan Williams --- test/clear.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/clear.sh b/test/clear.sh index e74522201231..16b0cbf3a71c 100755 --- a/test/clear.sh +++ b/test/clear.sh @@ -13,6 +13,15 @@ err() { exit $rc } +eval $(uname -r | awk -F. '{print "maj="$1 ";" "min="$2}') +if [ $maj -lt 4 ]; then + echo "kernel $maj.$min lacks clear poison support" + exit $rc +elif [ $maj -eq 4 -a $min -lt 6 ]; then + echo "kernel $maj.$min lacks clear poison support" + exit $rc +fi + set -e trap 'err $LINENO' ERR