From patchwork Thu Jun 14 00:44:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ram Pai X-Patchwork-Id: 929170 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 415lv95R4Mz9s01 for ; Thu, 14 Jun 2018 11:11:33 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=us.ibm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="R5vFKbOi"; 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 415lv93mmdzF0dW for ; Thu, 14 Jun 2018 11:11:33 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=us.ibm.com 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="R5vFKbOi"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400d:c09::242; helo=mail-qk0-x242.google.com; envelope-from=ram.n.pai@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=us.ibm.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="R5vFKbOi"; dkim-atps=neutral Received: from mail-qk0-x242.google.com (mail-qk0-x242.google.com [IPv6:2607:f8b0:400d:c09::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 415lLt5YWkzF09h for ; Thu, 14 Jun 2018 10:47:02 +1000 (AEST) Received: by mail-qk0-x242.google.com with SMTP id y4-v6so2704445qka.5 for ; Wed, 13 Jun 2018 17:47:02 -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=wA0yLiW8ZzyGForFWSpjVpsJn8QZUIqxgzyWYWLHSiQ=; b=R5vFKbOibUvrIRZBss8W/boet++GM/5gVqXSUf7vCsWFcNGoZ0o+sACHaIMRjVMiF9 u9fiCce+FjdlqJ0BxVRby0CHecNkZVHrR2Sj9aLZWju3YYrEbk+NQbvc0irb/V2cFJKv YnR9JgkbMU3HiVa3gbKeasXnzdUhaVbKWAI9hRyDT9PdJie6ekE0N2Mfr0+OgSLaSI5g 3K165krNKtqh/YWlsT5g4hVKwr1SxFKSS5tmPPL0KOatQU98ZGL4aEEmrfBln9w4gQk3 8Xvwld5foY1mWXCZtZa/aBk0QMnvGMdIUObrrLi1EYrB1dWxtHz2nF/X3nVwf/wCYgZ0 2/mA== 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=wA0yLiW8ZzyGForFWSpjVpsJn8QZUIqxgzyWYWLHSiQ=; b=VJmU5A+ABbLWDv5CuEO+oNdpunCnsN9n9GqKhFSPbZIAQpU9NQSVmr5lNHg60vKgBn hMeytYcS7miwmjghmm/aCr4hYy8sfJ4SvUP/OzyB9U9afjBBTmHVETMRDQFB/q8Jzd2v 5f+grIZkK/y7d4xiqMhOR5FrJa6ZDbeRDpWmdEnSbZIuoBuAjdsgofTkBolP2CXrLJkd Mh7WPuOWbyK7wXIUGc2mAGsX2xXGbPv9nk0ccsM/mGUfuC4KGEfwoRB+4K9fTqR+gJ2G f/bXRnWvnBGW+YOSHjO6GsCrp4D7MsqtOMjMCEteTxQOxWLv464yMs349OMK+zOgqBIH DbzQ== X-Gm-Message-State: APt69E3STXi1OhQBAKJB/6f3Q2XMLKXVQ58BU/oc/ls/iM1JuWpgpnZ1 YJItRjYTXFfDLQ55pO8kMuA= X-Google-Smtp-Source: ADUXVKJ/5JIKd5yADaazkRvAEHH5Wco/tOBJiawqu/4xEZGcbQ18AvBxA5NgokiasjCvKiMLuDxczw== X-Received: by 2002:a37:65c5:: with SMTP id z188-v6mr366750qkb.410.1528937220757; Wed, 13 Jun 2018 17:47:00 -0700 (PDT) Received: from localhost.localdomain (50-39-100-161.bvtn.or.frontiernet.net. [50.39.100.161]) by smtp.gmail.com with ESMTPSA id u31-v6sm3225898qtc.28.2018.06.13.17.46.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jun 2018 17:47:00 -0700 (PDT) From: Ram Pai To: shuahkh@osg.samsung.com, linux-kselftest@vger.kernel.org Subject: [PATCH v13 08/24] selftests/vm: fix the wrong assert in pkey_disable_set() Date: Wed, 13 Jun 2018 17:44:59 -0700 Message-Id: <1528937115-10132-9-git-send-email-linuxram@us.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1528937115-10132-1-git-send-email-linuxram@us.ibm.com> References: <1528937115-10132-1-git-send-email-linuxram@us.ibm.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, fweimer@redhat.com, dave.hansen@intel.com, x86@kernel.org, linuxram@us.ibm.com, mhocko@kernel.org, linux-mm@kvack.org, mingo@redhat.com, aneesh.kumar@linux.vnet.ibm.com, bauerman@linux.vnet.ibm.com, msuchanek@suse.de, linuxppc-dev@lists.ozlabs.org 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. 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 57340b3..5fcccdb 100644 --- a/tools/testing/selftests/vm/protection_keys.c +++ b/tools/testing/selftests/vm/protection_keys.c @@ -415,7 +415,7 @@ void pkey_disable_set(int pkey, int flags) dprintf1("%s(%d) pkey_reg: 0x"PKEY_REG_FMT"\n", __func__, pkey, read_pkey_reg()); if (flags) - pkey_assert(read_pkey_reg() > orig_pkey_reg); + pkey_assert(read_pkey_reg() >= orig_pkey_reg); dprintf1("END<---%s(%d, 0x%x)\n", __func__, pkey, flags); }