Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp516927pxb; Wed, 3 Feb 2021 10:33:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxBq8BlEQpGiYD2MJhRmXdtWuNYYcVZe7Fr7b3y4Ewzk1klF12Q3/SGaZ48s4o9Od+FZzU X-Received: by 2002:a17:906:8292:: with SMTP id h18mr4473970ejx.342.1612377180591; Wed, 03 Feb 2021 10:33:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612377180; cv=none; d=google.com; s=arc-20160816; b=boi6GWJk3VKDFE5Ma5/DKE1/mEldvFw6vXKZwTq1sd5TU9WbOi59x6U1WQbt94zC6a b8k8rHp712lIg72oDn8kmiPO2RRRWGFU38Al/MlypT+8k9/MLSTLtxDYD9oRmnVEcc8+ JjVUvSWiTAJLTdq2E3aLcz6xRtzuZDk0ZlsvTBSe8EYRtqpIpWoTbvkydWGx+We2qoQ1 h+osUZ+kKGYcY5X527EGk+yA9OTfP3bQaZfcbUIB9/f+ZDRel4y3TgE9q0C6RHSOKxOw W+ZSY30Yg1Q9lOBCKqgVZO7zkEN9fjNsPAN5ZsKIJOtt769rHEPwnXxoIfUElmsTP8NF 7Yxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=hEe3LKST1YHcfKQNO2v4b7c0gwVjN8GSIL8jKaA5Cfo=; b=FoRMn6W8BChl65Nl/W+pu3t2CqFnMl7qTqQjMcUb6BIzFfihdk2A7aR6N8P3ZMBWJ0 R2CePW59KQfdMYR/xgHNGC6zqTUUMUd1hrp7YDt6ClOO3uyWh+4YtgGfczocZxi8QT17 n1UJMvVHaA8+iOgcwDfNRumjNLQ7fhb4iimWb4cfnfsczhifigxevmd4Hao98XRx8cRv s6P8QCCV5q+Q9aYoJ6r30EAazSMH7m/hBUhivKZb+CIBg3u9/kfuk+irnJ1CT9VKeBGk ECyh3q6ksAPJNOkiEZPOEii2GHWGnT4bg7iD4Hm+F+xt36COx+em5Iu4Nwyq7jKvbMph Ueag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=ie1t7tv3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq26si1830606edb.317.2021.02.03.10.32.27; Wed, 03 Feb 2021 10:33:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=ie1t7tv3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231674AbhBCSa7 (ORCPT + 99 others); Wed, 3 Feb 2021 13:30:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231363AbhBCSa4 (ORCPT ); Wed, 3 Feb 2021 13:30:56 -0500 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 429B8C0613D6 for ; Wed, 3 Feb 2021 10:30:16 -0800 (PST) Received: by mail-ot1-x32a.google.com with SMTP id o12so771166ote.12 for ; Wed, 03 Feb 2021 10:30:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=hEe3LKST1YHcfKQNO2v4b7c0gwVjN8GSIL8jKaA5Cfo=; b=ie1t7tv30f1+Kl61SxX+cXlirmj3FIWBalujA9MEeMhB41z62szQ2QLCu5q+lxLWv+ oVj4s9MFBx5q6M1frsxeVMzHnzWoMik3k5FEuuru82EObZlkAVI1zWWLXRIFUnj4MhK/ 4J9S9fNg6y35WabREdeEpPQLO2SmuJdJPcq4Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hEe3LKST1YHcfKQNO2v4b7c0gwVjN8GSIL8jKaA5Cfo=; b=WGhuedF7zqCq/fMxCARqejyUA6f/Orf34oXE3YcRLyobAQnc3dumlfbvbeXjvVZnLH 5NeJ8xqXn+YJcBtCFpVt8oWus4pWTaTz0i5WSqiRBh2PywXL6n0wRICP+wN+4PSQD63N t86HiNBM3czjyRJqMhOfga3J86JK1810TMBbWRKVYsBBB2sjAcDJDWHeJp4nY36dLpCL /cS69PUGZmkGONBQ52EiK7VIXdYoyyHOIMw+kTvFBvQmGEc8lmMXlEHVIGiZfrW3ejMt 9ai+emmbPtFqbqZlDrRFuKlpS9qtdOXjN3Gvpoy+cPgmGi0IoYqwDDhylnyPMjrUX4WN UEMg== X-Gm-Message-State: AOAM531kJjcipsBC2vA7Bff4jDUPJdu2IGlMLy627SnL522oDYWe1Vxk QRm3AU9BLGuGO1sv+KItZ6ZVFg== X-Received: by 2002:a9d:7088:: with SMTP id l8mr2850061otj.333.1612377015508; Wed, 03 Feb 2021 10:30:15 -0800 (PST) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id o98sm587061ota.0.2021.02.03.10.30.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Feb 2021 10:30:14 -0800 (PST) Subject: Re: [PATCH] selftests: breakpoints: Fix wrong argument of ptrace() when single step To: Tiezhu Yang , Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: <1612341547-22225-1-git-send-email-yangtiezhu@loongson.cn> From: Shuah Khan Message-ID: Date: Wed, 3 Feb 2021 11:30:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <1612341547-22225-1-git-send-email-yangtiezhu@loongson.cn> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/3/21 1:39 AM, Tiezhu Yang wrote: > 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)); > Right before this it does a set_watchpoint(). PTRACE_CONT is what makes sense to me. Error might be the one that is incorrect here? thanks, -- Shuah