From patchwork Wed Feb 3 08:39:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 12063725 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8A9CC433E0 for ; Wed, 3 Feb 2021 08:40:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 95E0864E46 for ; Wed, 3 Feb 2021 08:40:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232992AbhBCIkT (ORCPT ); Wed, 3 Feb 2021 03:40:19 -0500 Received: from mail.loongson.cn ([114.242.206.163]:60398 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232983AbhBCIkG (ORCPT ); Wed, 3 Feb 2021 03:40:06 -0500 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxf_IsYRpgSJQCAA--.3171S2; Wed, 03 Feb 2021 16:39:08 +0800 (CST) From: Tiezhu Yang To: Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] selftests: breakpoints: Fix wrong argument of ptrace() when single step Date: Wed, 3 Feb 2021 16:39:07 +0800 Message-Id: <1612341547-22225-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQA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a7IU0qQ6PUUUUU== X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org According to the error message, the first argument of ptrace() should be PTRACE_SINGLESTEP instead of PTRACE_CONT when ptrace single step. Fixes: f43365ee17f8 ("selftests: arm64: add test for unaligned/inexact watchpoint handling") Signed-off-by: Tiezhu Yang --- tools/testing/selftests/breakpoints/breakpoint_test_arm64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c b/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c index ad41ea6..2f4d4d6 100644 --- a/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c +++ b/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c @@ -143,7 +143,7 @@ static bool run_test(int wr_size, int wp_size, int wr, int wp) if (!set_watchpoint(pid, wp_size, wp)) return false; - if (ptrace(PTRACE_CONT, pid, NULL, NULL) < 0) { + if (ptrace(PTRACE_SINGLESTEP, pid, NULL, NULL) < 0) { ksft_print_msg( "ptrace(PTRACE_SINGLESTEP) failed: %s\n", strerror(errno));