From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B52225A2B4 for ; Mon, 9 Mar 2026 21:21:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773091281; cv=none; b=uZonxNAWB75cpZ2PIr+CJXuUwfjLHy353ufNGBRNabbYonyoGtoJwyjicw8fP0eAepUUyzYyMgQtYV4jd/YnqHuQdaf6Frqby9bu++uSblF0FIvToHfbIb0hg2brO/BCvc6YWSX10zF34lel3gYB4bVXaGilhd0YBCK2Uo28GnQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773091281; c=relaxed/simple; bh=vUN0P1C2rFmutu5iY2iU1uKl1ZMEsY4ucyehCMvH7GU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ATHaVWERX6TZfS2UwmRMVzGjXBHAp0sPNMCQapC5BzyY8Ey23SEvr8pQ6y1yCXAui3+IlJ98WMeDucP8RQF2470BznmfFiRi4j22olgxJj+ALOXIVifR7Go0kSYAQTQp8r/QmGvEu18sgylx5Avztdx9/GgrHTfUwAuwzsGqmH4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CCQqzQG8; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CCQqzQG8" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-483487335c2so101976175e9.2 for ; Mon, 09 Mar 2026 14:21:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773091278; x=1773696078; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=3mR/03iy2wclJWH4dE6b/zGJuZMq85sTEJ9qWO5p4OU=; b=CCQqzQG8PW2xnKP9RjMMCi3RS2kTPXyq7+3zJOlAnWjnwT9lSI2izOxvF4Nny9Ke+G N2dwuiDtRopd8kdXrJc7habzzbtjD/9zLgqTeOKfWsIfcYJJV9JKNRw+Z4Kb62EBk/7A 1pnAMokPbGLPgLgPaceUrcGS7jx6Qk9BU7wSprzVJLEPhkwOzUpq+fRSzJ/iuv6H0kmO o7YItkePHlapdlP33s/EJK8sd0jG+DjdukbzWIwZWR6PSHP75OSv5IAHm4trNiMmsFkN /ERoyDDmGQUOOtZlBjpT2LGAmtVHnNt5XpOjLzN6hcIF1C4lAbqQY0ZTK5vv4E8+e+jp 2D1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773091278; x=1773696078; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3mR/03iy2wclJWH4dE6b/zGJuZMq85sTEJ9qWO5p4OU=; b=UzXgdBGEng/qS1getGQds+oDKBgcq36xFx0V1OxLUSRK7YdnPFLfIZw/Ab3R9EFXY1 ey1tgeyoKeHiNegbtQqp/CJFQvRfSdC43vB82mG++T4nrOhBsnaM+rvqBbgH37sM3ec6 PfqisDXFTJlH3S6XoBQ0+/CzBJ0jcD5EGExhcqnw1hoRFyk7IvDUclYdGxi5A9AawTR6 qZh2pUWTN/1VQkQssD772bHB8Mte6STpxU9CFqoESc8bL/hk04hAeBurYMHXUuLfOJLd f803yMhJedD+oFO8od6bJodcjSZ2bJ5rugKHNgpJikaw0NBnHnMV7Yv47Wa5TMei83v+ 4V7A== X-Forwarded-Encrypted: i=1; AJvYcCWHseFLEh2miK8/TV24MP7bt6gYfXrBr6jgL9VFt+++FsxfDh7sQWaTM1impYEhf/u6nUMu6cpg+3IowQs=@vger.kernel.org X-Gm-Message-State: AOJu0YzbIQr4WSfc0nhblShsRGAe1UW1K7Ys+vOggySIvYD0xg9iaV5w McRk11wdK8KApBTLCOGtlEwV3vWfF2bACawto4h02qSCovZbmMg7GDGw X-Gm-Gg: ATEYQzzxBGy6UK1dpoRhlCnutxiSDu6jxEgf+wq4tx4GHlLakZVUmFIG2dzu5tBdOTQ +bEq/rK6lCMoBvTgqcce4f8poC0EUMZLijLWo75zYdzFFq9i/AV0wNQ3MeC5T8imydyDb+YNNHV GTSMz4SN3eUXXzafNat/+SBJVQD2x3VVEFCCndxrgCKAwkI8wm2OWCwL7KV5rNkrX8WrdjDRE5c DZOGbypE/iEErLeTBhMUhKjKaW8ZL65134PjgDZ+s74I4IsSejOdVRH0POG7/Pawu9I27LfvVdG oij7OpiAtOs3PrbI58Olo5gLv8/LkxI9ygcIuDSfbmQCBBJ1rdxUaqGrGZctPN+O/RPBWPsiPpT 4GdG5LnpC2S014RE8zPKB0NVHmRk/fxyB30JlMJCU686abbbxtydYQORpJAwluu4QH1fuFscVZA baj/sbWtF6nGLwbQmg X-Received: by 2002:a05:600c:1f0f:b0:483:703e:4ad5 with SMTP id 5b1f17b1804b1-48526967cd9mr205736655e9.22.1773091278353; Mon, 09 Mar 2026 14:21:18 -0700 (PDT) Received: from curiosity ([80.211.22.60]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48541aacd81sm18535685e9.14.2026.03.09.14.21.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2026 14:21:17 -0700 (PDT) Date: Tue, 10 Mar 2026 00:21:14 +0300 From: Sergey Matyukevich To: thecharlesjenkins@gmail.com Cc: Shuah Khan , Paul Walmsley , Palmer Dabbelt , Andy Chiu , Deepak Gupta , linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/4] selftests: riscv: Fix compilation issues for v_ptrace and cfi Message-ID: References: <20260305-fix_selftests-v1-0-61b62d23500b@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260305-fix_selftests-v1-0-61b62d23500b@gmail.com> Hello Charlie, On Thu, Mar 05, 2026 at 12:11:28AM -0800, Charlie Jenkins via B4 Relay wrote: > There are a couple of compilation issues of the riscv selftests. > Coincidentally two of the issues are independent problems with not > including the header that includes the BIT() macro and the other issue > is from checkpatch incorrectly suggesting to remove non-redundant > braces. > > Signed-off-by: Charlie Jenkins > --- > Charlie Jenkins (4): > selftests: riscv: Add definition of BIT() macro > selftests: riscv: Add braces around EXPECT_EQ() > riscv: ptrace: Fix BIT() compilation issues > selftests: riscv: Add license to cfi selftest > > arch/riscv/include/uapi/asm/ptrace.h | 1 + > tools/testing/selftests/riscv/cfi/Makefile | 2 ++ > tools/testing/selftests/riscv/vector/Makefile | 2 ++ > tools/testing/selftests/riscv/vector/validate_v_ptrace.c | 16 ++++++++++------ > 4 files changed, 15 insertions(+), 6 deletions(-) > --- > base-commit: c107785c7e8dbabd1c18301a1c362544b5786282 > change-id: 20260304-fix_selftests-c3f0ae46b3c7 > > Best regards, > -- > Charlie Jenkins Thanks for catching this ! On rc3 I can also reproduce the issue reported by the kernel test robot for v_exec_initval_nolibc.c and vstate_exec_nolibc.c. The following addition to your fixes seems to resolve it: diff --git a/tools/testing/selftests/riscv/vector/Makefile b/tools/testing/selftests/riscv/vector/Makefile index 92c4cfe5f34d..48d6cd5e72f6 100644 --- a/tools/testing/selftests/riscv/vector/Makefile +++ b/tools/testing/selftests/riscv/vector/Makefile @@ -22,15 +22,13 @@ $(OUTPUT)/vstate_prctl: vstate_prctl.c $(OUTPUT)/sys_hwprobe.o $(OUTPUT)/v_helpe $(CC) -static -o$@ $(CFLAGS) $(LDFLAGS) $^ $(OUTPUT)/vstate_exec_nolibc: vstate_exec_nolibc.c - $(CC) -nostdlib -static -include ../../../../include/nolibc/nolibc.h \ - -Wall $(CFLAGS) $(LDFLAGS) $^ -o $@ -lgcc + $(CC) -static -o$@ $(CFLAGS) $(LDFLAGS) $^ $(OUTPUT)/v_initval: v_initval.c $(OUTPUT)/sys_hwprobe.o $(OUTPUT)/v_helpers.o $(CC) -static -o$@ $(CFLAGS) $(LDFLAGS) $^ $(OUTPUT)/v_exec_initval_nolibc: v_exec_initval_nolibc.c - $(CC) -nostdlib -static -include ../../../../include/nolibc/nolibc.h \ - -Wall $(CFLAGS) $(LDFLAGS) $^ -o $@ -lgcc + $(CC) -static -o$@ $(CFLAGS) $(LDFLAGS) $^ $(OUTPUT)/vstate_ptrace: vstate_ptrace.c $(OUTPUT)/sys_hwprobe.o $(OUTPUT)/v_helpers.o $(CC) -static -o$@ $(CFLAGS) $(LDFLAGS) $^ diff --git a/tools/testing/selftests/riscv/vector/v_exec_initval_nolibc.c b/tools/testing/selftests/riscv/vector/v_exec_initval_nolibc.c index 4dde05e45a04..e3f062c85452 100644 --- a/tools/testing/selftests/riscv/vector/v_exec_initval_nolibc.c +++ b/tools/testing/selftests/riscv/vector/v_exec_initval_nolibc.c @@ -9,6 +9,10 @@ * To be "clean" all values must be all zeroes. */ +#include +#include +#include + #define __stringify_1(x...) #x #define __stringify(x...) __stringify_1(x) diff --git a/tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c b/tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c index 12f1b1b1c7aa..ecd687bb8359 100644 --- a/tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c +++ b/tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c @@ -1,6 +1,12 @@ // SPDX-License-Identifier: GPL-2.0-only -#include +#include +#include +#include +#include + +#include +#include #define THIS_PROGRAM "./vstate_exec_nolibc" Regards, Sergey