Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp256115lqr; Wed, 5 Jun 2024 05:23:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWAOk9dSfVHLarEAGBAEcg9vcNc6qpuKJ7RfUkB9HQaTdv1vVrhToYRVkGpS1eoEXoKrR/CE7lQccM4OmaxVORMFIm/9xIb+9dwtZrSOA== X-Google-Smtp-Source: AGHT+IGJIWU6320aVo/4xRQydSbfC/gMrtluqnZahyn3exTpmnpe4D/5VC6OM/QLjRnKNU6HkZRl X-Received: by 2002:a05:6214:5bc8:b0:6af:36c8:197b with SMTP id 6a1803df08f44-6b02bf9277dmr25970546d6.30.1717590188409; Wed, 05 Jun 2024 05:23:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717590188; cv=pass; d=google.com; s=arc-20160816; b=QmF0XI9rNygvzasN/oxLRJ/SFgofLISyecgT1kNUr4cHTJnEVJtausV2uzxdiooF6O Shb2FwAF7HIbEJyxofJsNJKMqfGHcIVwQK7kvJqamsu+RmHQ9TkwK9gYzxnRm2VSq19g +Ak1hgX+jM+6FZfVy1dOjJjbtcdG2tl93wexd8Fmmw0JBvYvIGaV4HbNDKIRrf+MvzMy zolhUZ21zd+yyNjW3HnFnpHpR/1peuP+zoZrydtKBDmmLnfv0hVGC2Qi6SNxJ9hj5T9v nxjpe9+sMfQT53NIeN7wRCBY2PJw+CRyG/rU6MjAj4/k1684QH05Q1az6iQPHQAgm0B2 SMYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=0eCMUmMzktibZ/N3uSXEBLp9QpPQqMiypVl2XdVdlT4=; fh=TaLBwBY6QVGowwtwu9uXqnm6VTV4xe1cO58Myf3rbKE=; b=MkYJtNS+HUMvB1LBXxEtJNDuWPFCOK/MqDqdRqK1PADQiOuIP8VoncHreRUFWln/rY n40K2flOBEoXoZ8XEBHI1qNzlUB08nfnagVEII3NHqX7NMnZsSCe3gxXRG+fx2bqwjmd KMvatFJp8uTpaC15x1F83fc5mYfoXDeWCVbanscybfWaH1MOWbkwQPjOz+isy7OKrwhF La5uEDHn0E/Te9giFeLYOsXWw1fxl4tPkkUBkLRoI1YRgu+IR7BJ7cLMc4Ao/Drziq41 Q44l+E2LITZy93UVZ41yJDAXKnR/m3r1F61mCDMLGZEgtP2U3sIJgnvdyjXgYEQBYk9k ENmg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-202431-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b42b6edsi124322316d6.463.2024.06.05.05.23.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 05:23:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202431-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-202431-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 452FF1C21C25 for ; Wed, 5 Jun 2024 12:23:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D893C1BD50A; Wed, 5 Jun 2024 11:56:21 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CABE91BD4EC; Wed, 5 Jun 2024 11:56:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717588581; cv=none; b=cDp4VjD23JVgKffN+jdrjhV3tcMRMU9Geu7A1mI7IgQNxjVu/o4EGcNwUyR6veX87zTYgIdfPAEJPGrs7LPlq9HXFLzp2jFqTkEMHh04ES7i/IYw1bTIqO777dVv0CyImz32KaFEab7EevFwzm5TgbVH12hWXKwsIIfxoJGsi+c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717588581; c=relaxed/simple; bh=Zy9IzQB3ejrKR2POqOn3wcMgHH1MCGBVI1V+s+78v5U=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=PcN3o1WtBX1hrvpfeUvrXizyfoig3yzhTRkpMw1g3ociTeEP2cbqT4lctnmNVP2SlGvGr4/bTpbd1cxdIp46FBrZwLXc2JBuq2oO/lU5BV3OEI35ueB3848inTNetYbXiWgXDpIpeC/nncMRH0h2AwU0y9tHKojBvoFqPNkp6Jo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 37701339; Wed, 5 Jun 2024 04:56:42 -0700 (PDT) Received: from e116581.blr.arm.com (e116581.arm.com [10.162.40.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 625493F762; Wed, 5 Jun 2024 04:56:14 -0700 (PDT) From: Dev Jain To: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, shuah@kernel.org, linux-kselftest@vger.kernel.org Cc: linux-kernel@vger.kernel.org, broonie@kernel.org, suzuki.poulose@arm.com, Anshuman.Khandual@arm.com, Dev Jain Subject: [PATCH] selftests: arm64: Fix redundancy of a testcase Date: Wed, 5 Jun 2024 17:24:48 +0530 Message-Id: <20240605115448.640717-1-dev.jain@arm.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Currently, we are writing the same value as we read, into the TLS register; hence, we cannot confirm updation of the register, making the testcase "verify_tpidr_one" redundant. Fix this; while at it, do a style change. Signed-off-by: Dev Jain --- tools/testing/selftests/arm64/abi/ptrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/arm64/abi/ptrace.c b/tools/testing/selftests/arm64/abi/ptrace.c index abe4d58d731d..c105703442f9 100644 --- a/tools/testing/selftests/arm64/abi/ptrace.c +++ b/tools/testing/selftests/arm64/abi/ptrace.c @@ -47,7 +47,7 @@ static void test_tpidr(pid_t child) /* ...write a new value.. */ write_iov.iov_len = sizeof(uint64_t); - write_val[0] = read_val[0]++; + write_val[0] = read_val[0] + 1; ret = ptrace(PTRACE_SETREGSET, child, NT_ARM_TLS, &write_iov); ksft_test_result(ret == 0, "write_tpidr_one\n"); @@ -108,7 +108,7 @@ static void test_tpidr(pid_t child) /* Writing only TPIDR... */ write_iov.iov_len = sizeof(uint64_t); memcpy(write_val, read_val, sizeof(read_val)); - write_val[0] += 1; + ++write_val[0]; ret = ptrace(PTRACE_SETREGSET, child, NT_ARM_TLS, &write_iov); if (ret == 0) { -- 2.39.2