Received: by 10.223.176.46 with SMTP id f43csp3259102wra; Mon, 22 Jan 2018 10:58:43 -0800 (PST) X-Google-Smtp-Source: AH8x2240Kbql5OLRMQ42huQH5eRnWrAOsAFa6iSjHDRgYopTHCVkaIaXBXbGQCW/Xj1ki1XmJ61J X-Received: by 10.36.210.133 with SMTP id z127mr10137686itf.116.1516647523459; Mon, 22 Jan 2018 10:58:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516647523; cv=none; d=google.com; s=arc-20160816; b=PV1bwCWR6Ko8iEIAw1Mv3Bb37sVKYWa8UNJ7NetYeZUgyXj32RoAedzKJTSic6toGH 3xRUjUq6mQpNyjw4ML9uwiixpJBMtOhto75HUNJjuxqIP9YXKY2s1nXnLmRPmMlZunKd UJdfnSa6hPxOEBTOlLLE+yAJsD1fKM3EBlf03U33O+mYyH+kmSEWvxAC4gh2V9FBo+H8 n50GTbe4nSiTyhVY6FEIzjxmek2FQtmVv5LGPGYr/hcwHx+1RnBZetWLkq1jCJIS8GQA BLYT7d4sy3BR0sOx12sTXBdq1DbuXaVjpSyzNPN2L6owgvNMqRAynGjddqdXvDgrDZfl e/xw== 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=21NdIeg/fA2GmVJb8PigKBUo28t36nFV2rc/+3EjDws=; b=YtBEEKCJGRC6Yk8KgPQ7ZYb6+pbPGk0DP9UXlnQlNdo3c/cyUZ2Pp7GslFJd142200 RL9/NqLvokTHkt7PHdDeEcmSJV0g+sdA30Kvsl7BN9Hu49Gsvf1EEk0tVjvUwwQhiSNj +yncmWIWNct8+ZtEvrSXSQ1cboz3VU0vIlTtbe9s8spZUlWy3msfUJUN5fNP8cMEtZmE H5j7OwM1/yd1dbauNSYYEQAVByfyiXWEt6exF8JlYMIwN130FCAZaunUpj3AguLI9I5M JgS3OBlmwMe1mALOFjyKUvCkZFcgYaEhgAZkfXK38SfivrRpqS4+t/0Qha4W+9vJIVk4 ECpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ftlri+eQ; 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 u65si6278263ith.164.2018.01.22.10.58.30; Mon, 22 Jan 2018 10:58:43 -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=ftlri+eQ; 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 S1751383AbeAVSxP (ORCPT + 99 others); Mon, 22 Jan 2018 13:53:15 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:40378 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751149AbeAVSxF (ORCPT ); Mon, 22 Jan 2018 13:53:05 -0500 Received: by mail-qt0-f193.google.com with SMTP id s39so23478268qth.7; Mon, 22 Jan 2018 10:53:05 -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=21NdIeg/fA2GmVJb8PigKBUo28t36nFV2rc/+3EjDws=; b=ftlri+eQVx3CoLoDVLkQz73PsUgdqiy9dzxbqDeOzh2rhZbEM2Ar7IXaGwl4ZWbswM 0r3CIXFDXxh2MEojeEQpKFOaNSY3xkL9iA2FsSenil2nEEGCdnu+2G440LX79n7FLzUK F9CJzplNZNA6uhC3hZN1atp1YPmgkJCe198tdbZduN8S6ERJNvmWhmqaH/PQSVHMnZC4 GOqZVmPa3o+63QxboAxkxektFNi1V/9ImueYx3BaVWbotL/6sdBZzGYRbVyYwewQQGTc N6VcR3uV049vC+L99fT5hB30Y8SCYDfDKmfp0eMjl+cCTJ7jeJGPPlRd66VH71OP2YkU 1h9w== 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=21NdIeg/fA2GmVJb8PigKBUo28t36nFV2rc/+3EjDws=; b=TnHnHlJ6aOKrVzFPZtgE2MvspfX5Rn9Uijuaq3gDZXgnaEHJGD/wkjWFASbHaJluBE u8a0/HWiKyrNDJlYKEdu1RdYNhOBGqbSdAuSe+VNJE47TaWacbhUmlD2/tvu+4FRpEXg RBfAm9dHtHHdc5awf5J+IFu0rxjrmw3pQ4Hc3gyoFrcMZdpdwDib2n956HMNe1FvlN/I Nr539LER5vctWOo88AZ0QZUfvDH4qDgCPTbSThAA+Pv3KJHexnqGgntEPHL5/mJne8vj YCEZl2CCSaoPHsSBRloXzgLTEcyi5XKbNmpLKI3vraoZXdYHz6+Q4U8Y9QwsoorOJZLF J+aw== X-Gm-Message-State: AKwxytdHuW397CCYVOuf+TU+q5ZPvVGCdhAUmdlVburms/9d6X41KVCW JeBu1W5QMUlxKuapHyUq1cQ= X-Received: by 10.55.127.197 with SMTP id a188mr6369161qkd.10.1516647184900; Mon, 22 Jan 2018 10:53:04 -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 o20sm10790061qkl.14.2018.01.22.10.53.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jan 2018 10:53:04 -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 v10 06/24] selftests/vm: fix the wrong assert in pkey_disable_set() Date: Mon, 22 Jan 2018 10:51:59 -0800 Message-Id: <1516647137-11174-7-git-send-email-linuxram@us.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1516647137-11174-1-git-send-email-linuxram@us.ibm.com> References: <1516647137-11174-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. 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