Received: by 10.223.185.116 with SMTP id b49csp1383457wrg; Wed, 21 Feb 2018 18:03:26 -0800 (PST) X-Google-Smtp-Source: AH8x22513cRZu+xAJffIIkXgDwRd5fqjCMqg1ITzp8T49VdMsbgcwHfkdq1gF8pW4LFjz9JfvgBc X-Received: by 2002:a17:902:6e4:: with SMTP id 91-v6mr4835104plh.26.1519265006039; Wed, 21 Feb 2018 18:03:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519265006; cv=none; d=google.com; s=arc-20160816; b=sIiDeQlsYjOAhGU8Wl2jNiLQYAtcIv59T3891PO3Wa4CTwhnA+/T5MUOHGFtvwqstZ BwhTKjnbKFaaIEgqFXELGH0+Be6eaR9G8wL5MaJj4LPBb9fl+oIgiR3EVVcVHdkz1JIq zVbUsAVt58mfNREh5ygcv7EO4uZIxPOeHE5Pl3awdv/RS+/mmY3xOmZ0HfyTMr/GZ04G vj6meB8O3ldUEUGQ3U6NEvHGtIOtMQzTx6Tx+S0kVse7bJvlCakTKUbMa8G0qdrU/ATA zAXjRTUokAj7RQJNkCzu6oKZ7wiUHhxK2AArDD6RMLTvhKu5eTHNwbmz2X9CRqWnHIHs c2Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=PKypfVMmPk97wGoWMxrHgdZc2o+DGJHQE/zgmVrq/vQ=; b=K7Y9LXqhgao0M/8QsVCemEjtozxXBqkiPKIDpBvE7qprNCoGVC6u+Z28F3m+ZTLN2J FnYshnr6T5l75QzED9708B2ZQcDdOdy0ox50/Da0eTtt1OUk/k/mlydM8Fg7ksRSkf0F 64hy/JyTfTpZDlsgpQetMB+02w1jGb2jUdosQndle1+dfYd32onpmbGKqwXZNjDi9iu8 GKt2yROscf1trEcfsUUOSAbEMuY/z3VVI4bZ4u2vd/7XY0+hKe769R6VdglKWzhf3Ku4 RVxVC+PzTYCkSsteF18GnfBvAomVTjIgChfzXNBi5SyE26q1/uukuy8QLzeble10oUAv EsgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=DLhGsLbd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5-v6si369970plk.185.2018.02.21.18.03.11; Wed, 21 Feb 2018 18:03:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=DLhGsLbd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751991AbeBVB4g (ORCPT + 99 others); Wed, 21 Feb 2018 20:56:36 -0500 Received: from mail-qk0-f196.google.com ([209.85.220.196]:38690 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751943AbeBVB4c (ORCPT ); Wed, 21 Feb 2018 20:56:32 -0500 Received: by mail-qk0-f196.google.com with SMTP id s198so4628379qke.5; Wed, 21 Feb 2018 17:56:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=PKypfVMmPk97wGoWMxrHgdZc2o+DGJHQE/zgmVrq/vQ=; b=DLhGsLbdjrd7JgL0YGIhML7LE2j4iXyGFmOJ1BKGWNESZmvZSGbMdnYkYnvd2T4c8H bTD1nf9Ic/mHpl319TYdG/pRsefTUE1T1wG61BmgH0UYP2QwXtYFetj6gQL81uUb1c8B BBkJWFQ6J0jDB5C61zi1dWqhVJW7OEZpMEZrI5ezR7mnoc6BZRVYIcm6nRQY+oAgR29f akZRAFgEpotfNvHeQAKpIiIw5vceDFEJGZxQR446AdMKFRKMhzzG0X+FKMqAPQBW1cGO p1RytM/Wi5kpihobC9j4Ah7f+z224XSZo2KCHktdb1CrTrgmv2CW7Vjc/+4RV9AU8gCv dhZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=PKypfVMmPk97wGoWMxrHgdZc2o+DGJHQE/zgmVrq/vQ=; b=Kbdt8czadxp+2KrDoWfL2vacXgVFw4qRdfnzG+PT9vtlAeLlAYUuYkNuMGa0fPUI6h +DGjLl47RBFmc0pQjsga0F9ZMB9FoIBXFUW47rjAE+7mXVl2OlLUCzBuWob4sVM3QjIh RKtRdB1zhEbVY/XzOgG/uapAPlTmhecXyiGA9O/X/uETz56/l9bVxlkxBi4+gXG3NoPH TwZYdYuEJAWr2SIZh8MIDDPB8GFozWqEs9qOHTbKg/GPLNjDlShSl0Ug8jRxop++faMn E+ffCUBNKsRqkkDUxkvcWpv80zaePxQcIRyeSoA+7v6NrWpY2YVmJ3erzXUu6ySngWhC 3cIw== X-Gm-Message-State: APf1xPD2LOIMG/AGZEfrcqU18XabkTSFkV0aom2JB8DPMzYqCHNifLg6 f7fAp1sp/p+tnHgLtkibeDI= X-Received: by 10.55.156.84 with SMTP id f81mr8246117qke.36.1519264591723; Wed, 21 Feb 2018 17:56:31 -0800 (PST) Received: from localhost.localdomain (50-39-100-161.bvtn.or.frontiernet.net. [50.39.100.161]) by smtp.gmail.com with ESMTPSA id n29sm14182630qtf.18.2018.02.21.17.56.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2018 17:56:31 -0800 (PST) From: Ram Pai To: shuahkh@osg.samsung.com, linux-kselftest@vger.kernel.org Cc: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, x86@kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com, akpm@linux-foundation.org, dave.hansen@intel.com, benh@kernel.crashing.org, paulus@samba.org, khandual@linux.vnet.ibm.com, aneesh.kumar@linux.vnet.ibm.com, bsingharora@gmail.com, hbabu@us.ibm.com, mhocko@kernel.org, bauerman@linux.vnet.ibm.com, ebiederm@xmission.com, linuxram@us.ibm.com, arnd@arndb.de Subject: [PATCH v12 06/22] selftests/vm: fix the wrong assert in pkey_disable_set() Date: Wed, 21 Feb 2018 17:55:25 -0800 Message-Id: <1519264541-7621-7-git-send-email-linuxram@us.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1519264541-7621-1-git-send-email-linuxram@us.ibm.com> References: <1519264541-7621-1-git-send-email-linuxram@us.ibm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the flag is 0, no bits will be set. Hence we cant expect the resulting bitmap to have a higher value than what it was earlier. cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/testing/selftests/vm/protection_keys.c b/tools/testing/selftests/vm/protection_keys.c index 83216c5..0109388 100644 --- a/tools/testing/selftests/vm/protection_keys.c +++ b/tools/testing/selftests/vm/protection_keys.c @@ -443,7 +443,7 @@ void pkey_disable_set(int pkey, int flags) dprintf1("%s(%d) pkey_reg: 0x%lx\n", __func__, pkey, rdpkey_reg()); if (flags) - pkey_assert(rdpkey_reg() > orig_pkey_reg); + pkey_assert(rdpkey_reg() >= orig_pkey_reg); dprintf1("END<---%s(%d, 0x%x)\n", __func__, pkey, flags); } -- 1.7.1