From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f53.google.com (mail-dl1-f53.google.com [74.125.82.53]) (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 0487E2C11D1 for ; Tue, 10 Mar 2026 01:45:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773107155; cv=none; b=R07j2tToDnn9ZzYN1hlD+Ai5y7kqn12WFnmeRhJgaVWYwylrUHnGWXLiWP18ow8ccJFiER+SgtC+dXQRi1TrOzHYzn3BItnsbSufwoyMt/uBJ3KoB8pCtB9C+nAH2Dk+QLNLvqaZPTpuO0MEF4PcTU2CNjwqP8os/rFBWWjF1cY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773107155; c=relaxed/simple; bh=SPq7NgFqZxgaNG2O9E6O5X6uW4f8iqmz2KIvn6WVjRA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aAZM5YXFOodxdpq5qq1wofBkBTrh37EztEP+4e0RFJU+wceYL6tL7MqvYkPgjbZV/t1DKYxA2sv6SJTmh76mX9KNHs7EqopX67KLHxn/K4MxraR2cz/Hs8+3hq2PkeaAiCEyJy5vd16Rw5poZynj5EQE9ecHMFTmwBRGZRz02Ow= 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=THGM0mu+; arc=none smtp.client-ip=74.125.82.53 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="THGM0mu+" Received: by mail-dl1-f53.google.com with SMTP id a92af1059eb24-1273349c56bso14921179c88.0 for ; Mon, 09 Mar 2026 18:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773107151; x=1773711951; 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=sas/jGM9/gBj/qBL5u5kVfFi+K6+9Elbw68TaVWyj4k=; b=THGM0mu+JyHCQt6S+jeDTzmUwfVY6Dsdn+fEpKLiDN5Je/Vk+wGV3RPKy6sFk0DGYr YJkn3KGRd/tnQ/hbNcZsJeIxI8kT6Uq9i/aLrjuspCz6OdJkx0mOHG4lXhb64rq8wsCK g+KNrD9Kxn5GGfQCs/PE3bOtrdFdYD/Ekl00ETDHlwMXUeu6UnoCQwsUBCMWGdOAdbzO hDza9pbycMVbHdNU7qG9DPC+QOhE/g87xUX3ddtvbCO98FUiF31E1oCuTaNs9ewrUvhq kDgLooTs1ofj3zgSVPddHhllDlWehDL4CHELIXrUUVXsy1CM77k+gjBHBfzW5DFh6k2k ALTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773107151; x=1773711951; 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=sas/jGM9/gBj/qBL5u5kVfFi+K6+9Elbw68TaVWyj4k=; b=wqCl2InCG5fmyELnhNeDNySoQBsGmltr35NxCVylMAaHm1tsXXTZ0u13Pe9gqX/eHj mw/0M2N4LGFG0zEq5DC3dyOMAoMGCu4YvQbWnSZIoB5OqO3qS8sE3t0V87CTrWXfWHMQ W7TfxbD5YJLkneqnJTmVsoP/3x/bR9HidaVWcAH3IO+6frifGnaJ6FkIJOUZ+vTevnIa 11Xl6dlshhe22JNW5ndpSdgEVltOTHt4RUrbUxLDF+DI2RJcIsL7zBGCTFm7iBxXygzx UcmoQXLSL9fGN7VsL4G1cFV3fCvjttd140v0VvGaerGTmFA76h2l9PcPL0QD5ZkwZHG5 TxDQ== X-Forwarded-Encrypted: i=1; AJvYcCXbFcYhKSwToWP1oczDHpvgEgetVVxM8+qvrldQAaHxyevyiN8lgdMGhIaicL6OZTU6g+sngRLPJMWteBQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwlRvKLbY0rnbEEfb2jnusbC7oVyHSTiM6e5Ox4Z9Du9ejZCSf/ OKQ4v0wgHCjcTEaw7HjKj7KTUZEpspI0dK8C+ZREa9wAODTHr5KbU1Hr X-Gm-Gg: ATEYQzzcxsoSG357F98jW//cVbhpNJt8GNE3O4h8gRi1v8/lVQ9dA6/LiNhSCrLHSxd uc58w7WDsIksIf7cJVumTIIwjsWhRdhSQyrN6xmN7A5TPloo8Z5u5uE6CH8hdlVil2VvlAg9cjT OsuFWOcJFp6mvuDyB86TIL+ZcEbWqkCVcYN5Nyj9t0e8XgBln0Ri0Nnpl+NVhUjrZ2OIE/hnYUB RoH+kz/QGEnFfG4uEk8Lf50/mYHnSmkg5+yBcOnyk8SgoAsl23zP/BdXIBraGOURmPW7lRUA+X4 j0bduWlrtOK1IMRIrEpH8vSs0PhzMuzNIVcjPCfvy6paQqydVN10MS89OLwE0icPrwNkSMGX080 DSeSVs2y4b+j1L4vBJpYly+qDw+fd3UqdPHwPEQcmlC2L9tnytV8Ij+GULT4IOYZwPXhSkRxHhS QxEEhiCM+FtjteR8hECGFyy2XJp/OIuPqJ X-Received: by 2002:a05:7022:6b8e:b0:128:d375:f1d3 with SMTP id a92af1059eb24-128d375f681mr3154192c88.18.1773107150649; Mon, 09 Mar 2026 18:45:50 -0700 (PDT) Received: from inky.localdomain ([2601:647:6700:64d0::5c10]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-128c3f433d2sm11321482c88.10.2026.03.09.18.45.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2026 18:45:50 -0700 (PDT) Date: Mon, 9 Mar 2026 18:45:46 -0700 From: Charlie Jenkins To: Sergey Matyukevich 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: <20260310014546.GA17809@inky.localdomain> 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: On Tue, Mar 10, 2026 at 12:21:14AM +0300, Sergey Matyukevich wrote: > 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: I missed that locally since those file compilations were cached for me! I think we want to keep those as nolibc so instead we can only add the header to the CFLAGS for only the tests that want libc, I'll send out an updated version. - Charlie > > 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