From patchwork Sun Jul 16 03:56:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ram Pai X-Patchwork-Id: 789041 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x9FGK2n4fz9s3w for ; Sun, 16 Jul 2017 15:24:09 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="X/9PZcFg"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3x9FGK1SH0zDqny for ; Sun, 16 Jul 2017 15:24:09 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="X/9PZcFg"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-qt0-x242.google.com (mail-qt0-x242.google.com [IPv6:2607:f8b0:400d:c0d::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3x9CP91JjFzDqmQ for ; Sun, 16 Jul 2017 13:59:57 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="X/9PZcFg"; dkim-atps=neutral Received: by mail-qt0-x242.google.com with SMTP id m54so14729849qtb.1 for ; Sat, 15 Jul 2017 20:59:57 -0700 (PDT) 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=6EyWVkbvV/MUaxr82awr1o+EZ0j4dym9p4AKIyRkzUU=; b=X/9PZcFghTXhD23UNHmbL5jVRhVUlqd1CKVrjH0WlleEQUyhIUAskTtytF3UxzGUiN JOpFuOI7rw6Y0CkQmaYIe1t7p2O9PfSAhV95ztY4Bu1uJw6oj0Hq2dpfWp3bELmvhDLF nS8168fRRdrM4cq7Gwwq1ut+0GbLk5Q73M1aPhNWj4TvtoH5+HjfXXlbZgoOCFW6UslS N6REjUs3cX4CCG5kP+fUSdFopA3FcMx9tgzjl/NIFry9Sb6W8DLdUxoncLO40bmkS4Cj CKgrH8pZNkwNPre9NMzIjZml1Q5vPuew1YpC0wD1QvkHitjgcPb0+7C58c8KTg7vIcU6 uRHg== 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=6EyWVkbvV/MUaxr82awr1o+EZ0j4dym9p4AKIyRkzUU=; b=FE41UcvRxrioVzD0yr9T+UDCsgfRFPsU3Tgp8ovqjkz06NAfnuOqAB9z8cN/YhUlwS clkDVr2BBVtFUZrkOfJSa9NNtYQEURuBpLhiHWDKAMzh56aLKs6t0iQ3E3iSAJDqrSG1 DMqAhZHx7aGUrFSnbfpAFVW9yQ27XUwN/BVJSoeB/GJf6hx7m0sK6UtpbSFUVqNORqRW HJnZ43/IduBuNoamA888uJ/nBYFk3TjqaaZHhL6G0Psa6EfBqTQaf/hkHtYtjZRZgeWc 7J1VTpu/oi2tIB4BpJuiLe4z/CNGytu5dCg6P+EZTL0mB9WpxwGv4QMEMdLF7BOVc/x0 1Mfw== X-Gm-Message-State: AIVw110tV2AXoS3S68MppgEs/4qbNOTRoo43xrbvsENZsOBw/DCrwhtd spQ34SMGARu7r5Um7aA= X-Received: by 10.237.59.43 with SMTP id p40mr481906qte.95.1500177595229; Sat, 15 Jul 2017 20:59:55 -0700 (PDT) Received: from localhost.localdomain (50-39-103-96.bvtn.or.frontiernet.net. [50.39.103.96]) by smtp.gmail.com with ESMTPSA id q46sm2290345qtc.54.2017.07.15.20.59.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Jul 2017 20:59:54 -0700 (PDT) From: Ram Pai To: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [RFC v6 46/62] selftest/vm: fix the wrong assert in pkey_disable_set() Date: Sat, 15 Jul 2017 20:56:48 -0700 Message-Id: <1500177424-13695-47-git-send-email-linuxram@us.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1500177424-13695-1-git-send-email-linuxram@us.ibm.com> References: <1500177424-13695-1-git-send-email-linuxram@us.ibm.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arnd@arndb.de, corbet@lwn.net, linuxram@us.ibm.com, mhocko@kernel.org, dave.hansen@intel.com, mingo@redhat.com, paulus@samba.org, aneesh.kumar@linux.vnet.ibm.com, akpm@linux-foundation.org, khandual@linux.vnet.ibm.com Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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. 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 e5f5535..b2d7879 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); }