]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
kselftest/arm64: Fix redundancy of a testcase
authorDev Jain <dev.jain@arm.com>
Wed, 5 Jun 2024 11:54:48 +0000 (17:24 +0530)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 12 Jun 2024 15:00:27 +0000 (16:00 +0100)
Currently, we are writing the same value as we read into the TLS
register, hence we cannot confirm update of the register, making the
testcase "verify_tpidr_one" redundant. Fix this.

Signed-off-by: Dev Jain <dev.jain@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20240605115448.640717-1-dev.jain@arm.com
[catalin.marinas@arm.com: remove the increment style change]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
tools/testing/selftests/arm64/abi/ptrace.c

index abe4d58d731df7eb6c7a57f36131b64b8ec2eb55..4c941270d8de0abed76a4d2ee5b1e4bbfff3108d 100644 (file)
@@ -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");