From nobody Fri Oct 3 18:01:16 2025 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 C9302287257 for ; Wed, 27 Aug 2025 11:04:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756292689; cv=none; b=LeuiC4V2PpzY9iR/O9K+Ya4JBegdKIK/SPWnu/3QuQL+ZIB9gnoD9bClG0iiVeA6DFc/tWACY5n15pkSOxR6vDSprEi50BGmuEwIUFhw+5PnFiv4Cwq3nojeHmAYC8nzQ0tJ6hYQkUylc8srXhvCpvnwEn7+FKDdqF4gst6yvtY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756292689; c=relaxed/simple; bh=j86wCjork52YcHNP0G8QYH3M20P0o4gvNc3xBHSW35Q=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=WNXMpC0/L/EVtkr4wrxZ7kPbxHCsQYieh3mbBQonQWTE4i3UfhsKzAbEVzbM918b/E6lsHjaykJa5jJSha6a6MypSRmTErfKElfz56sGep13OoEz+P8reJgGwzlEsUNxx1XLUM0703tyA2YLYkk8ljbrMKwF32PMJOKYf9N0hcY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=lgS9MXP9; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="lgS9MXP9" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-45a1b0c5366so40041745e9.3 for ; Wed, 27 Aug 2025 04:04:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1756292686; x=1756897486; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=B1JLDczBck6DvgDcQzS2GBWgdu9LwuHv0ctBDRr5UCA=; b=lgS9MXP9+m0MAJcAkRAGmPv+j2e+d6OwFJB6gp1uvnom0MsLMp/KXaIILOSZlDvdbV 0lWEcg0vIDN2n/fXNpoDEO0WpA1TEt5wSpnh9TrE+3/ztPg53kmjBaYDY2h6x/Fk7NfJ 4njeNuopQcijXkkxXdjUab+dfVxb9dKrxxwKTaq8BW0x0Ys5qs4gsIXfeP9aUzkRo71B pgRGcF82qBWswxOas8t5+ozoOuMgphy3BjDxYog6umUFAq3JRAVX0dC3LRp5WGD0RDgH LrXsguxoSCXpPaSrvYno+8oxxuVWDUnC/clfNSYqaOKOx3yMF7EM2nAPhyKHWq0b9O1F KODQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756292686; x=1756897486; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=B1JLDczBck6DvgDcQzS2GBWgdu9LwuHv0ctBDRr5UCA=; b=VD+sRtVtyYw4QrO7XEoONF58OheRJX7S7GQTz0rpzs/TBg7YTJ/ZWs/2AI9zmFM8W6 DIn3HkewFS7Bz1F0YyQ4d82o7o3pmnMuSDQ13bqnw5h5QXBxb1j6RFIiPd0U+RQwlgla OIuDzgoTSNLqRqo1sOTggb/uI31U0lR3iYq/XUUAW8HykRLp8KB94Gl3/8zY0G+E/sr7 UWhq/R2vkVqY2pITsi0IiT2fZESR6ElYfD5xfvS6WhDi3F9L2IWizzGpoSvMZ3y36h6p v1Kfu+ni7si5/yNlmq5jFcxJ/zSrKXKwzR4WXA7qG3amStG+OXW+t7MN/Dm9rxj7bLBa fJPw== X-Gm-Message-State: AOJu0YzRjfihuxed1gG6F9nTtl0js5rn0JLO2O24a/g3wrS7cNZrmaJm ErPF4+/DosfHSqYZmfT2QkGGPiquZ5iPuAGFhE9UNiS778riyRne4w+jUEBPv+oFfh/P7cuNOIE MVdxF+v8H3k8E4Q== X-Google-Smtp-Source: AGHT+IGrAcbdSroEv8381iwG9fFa7HIZzG92rr8VYjO8Tn1BstPgPDU22+oW3fciclP7XBaLivl8yhvcXwvINQ== X-Received: from wmbhe13.prod.google.com ([2002:a05:600c:540d:b0:459:dcca:571e]) (user=jackmanb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:5251:b0:455:f380:32e2 with SMTP id 5b1f17b1804b1-45b517ca54cmr175548825e9.18.1756292686018; Wed, 27 Aug 2025 04:04:46 -0700 (PDT) Date: Wed, 27 Aug 2025 11:04:41 +0000 In-Reply-To: <20250827-b4-vma-no-atomic-h-v1-0-5d3a94ae670f@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250827-b4-vma-no-atomic-h-v1-0-5d3a94ae670f@google.com> X-Mailer: b4 0.14.2 Message-ID: <20250827-b4-vma-no-atomic-h-v1-1-5d3a94ae670f@google.com> Subject: [PATCH 1/3] tools: testing: Allow importing arch headers in shared.mk From: Brendan Jackman To: "Liam R. Howlett" , Andrew Morton , Lorenzo Stoakes , Vlastimil Babka , Jann Horn , Pedro Falcato Cc: linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, linux-mm@kvack.org, Brendan Jackman Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable There is an arch/ tree under tools. This contains some useful stuff, to make that available, import the necessary Make helper file and then add it to the -I flags. There still aren't that many headers so also just smush all of them into SHARED_DEPS instead of starting to do any header dependency hocus pocus. Signed-off-by: Brendan Jackman Acked-by: Pedro Falcato Reviewed-by: Liam R. Howlett Reviewed-by: Lorenzo Stoakes --- tools/testing/shared/shared.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/shared/shared.mk b/tools/testing/shared/shared.mk index 923ee2492256b693c5cf16cc014d9d2410be5457..937aaa7623320da1085a8e0f43f= 6a728ddd3ab1c 100644 --- a/tools/testing/shared/shared.mk +++ b/tools/testing/shared/shared.mk @@ -1,6 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 +include ../../scripts/Makefile.arch =20 -CFLAGS +=3D -I../shared -I. -I../../include -I../../../lib -g -Og -Wall \ +CFLAGS +=3D -I../shared -I. -I../../include -I../../arch/$(SRCARCH)/includ= e \ + -I../../../lib -g -Og -Wall \ -D_LGPL_SOURCE -fsanitize=3Daddress -fsanitize=3Dundefined LDFLAGS +=3D -fsanitize=3Daddress -fsanitize=3Dundefined LDLIBS +=3D -lpthread -lurcu @@ -11,6 +13,7 @@ SHARED_DEPS =3D Makefile ../shared/shared.mk ../shared/*.= h generated/map-shift.h \ generated/bit-length.h generated/autoconf.h \ ../../include/linux/*.h \ ../../include/asm/*.h \ + ../../arch/$(SRCARCH)/include/asm/*.h \ ../../../include/linux/xarray.h \ ../../../include/linux/maple_tree.h \ ../../../include/linux/radix-tree.h \ --=20 2.50.1 From nobody Fri Oct 3 18:01:16 2025 Received: from mail-ej1-f74.google.com (mail-ej1-f74.google.com [209.85.218.74]) (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 8DAD972610 for ; Wed, 27 Aug 2025 11:04:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756292690; cv=none; b=LuY4TU/6GNLNb8Bemil31ZkIJIMTd2e/O6BOE+H3YGQUaXofdsAb8DYoQCluZV68Qrfh4lbH4kJSMPKbkR2YfUu+3B0yJkvBptWG1t31Yh6fnhLs5tkcId6DNrF9KfuFStLD8wE1/lghxz6ZRV6VkccQcs21uN32GUxLER8Y0P0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756292690; c=relaxed/simple; bh=gUJIPIaJXkDeLBNzJ+jbvX1ZWY6PwjW3+iZyq0+2v5s=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=LyBv+0SWMnRD6kJFjFIppqSIu/SpG1kosfwd465Roo+K1BNPVi5gcHGGw1RcK9NAMR8j5j2eny2OB2jBZhapem6gsP0RwXe/kea6F629ezyNHY16qaYcFNUZtWcHtuOpe1je5zXow8cG1hf2EDsfuRxLsu/MAGs6SrZxTKsQcQ0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=iBq85VXs; arc=none smtp.client-ip=209.85.218.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="iBq85VXs" Received: by mail-ej1-f74.google.com with SMTP id a640c23a62f3a-afeb71cc67cso106549766b.2 for ; Wed, 27 Aug 2025 04:04:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1756292687; x=1756897487; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=pAE5CII86KHK3JlA1J37woP/VEU59D1d2hbqyEmTE24=; b=iBq85VXsOOMM20HILFUCUwddvx+f21RAPhplQlulUXXg3pbOVh5wMnKNd0gI1Oo++M bqEN2Cs5pirNS7Ch17Y2xa/EmJTkt7bM1paJUoENd8LjWOvwOM8Z7Kil06UKXJaTMO8j pmbS7m9TdmoW9WHMO8jO5Ae5yqJFNvfqjDhsGgx0hwEUVvC/0tnr6sna+74v7Ebve3VU TBWFLiFpqcsvFKBom+tmNaePCRjiiLIsGlLuM+8wYYJM02uJHe3I0bZ/MD2JLlty3VhX Z5DHEJT/GT9PgG9zQj3aKbvZox3Uv2HbXeDju/cL9c2cbt/ixWKFy5NaSRC9QStGbQH8 ZBEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756292687; x=1756897487; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pAE5CII86KHK3JlA1J37woP/VEU59D1d2hbqyEmTE24=; b=ZE74nZDuq0ygwRwiooGNI8BAHAwuRci8Cvkg26WqOqaFhfUmXOYwbiA/naJlqV5ziP 98Ge3OEbkeh7huRI06TEXBrVU1mfXqbC52ster40dSkucjNAlP426QCpRPEMIhmuRc8h vBMS3BoJQt7gtPQffSgHBy9QaJzMFJnIbkCUK7F2O/xp/rDCgsQ1IFY6Q8+BAHN1o3YY twVD/vEL7Dk3QsPjBl230jVnGCa//JiwJv5SDLb7qZhZxNITZAG5+lm/f9FDdK5DWoLM BuXxXu+d7eKCZqbPI/+CQ0Co2mGJMFL7fLMfogfnu379hN6UJ1Lu0y9HSz89XKu3YaYD 8lfQ== X-Gm-Message-State: AOJu0YzWzeohGbG+VTb7mb985l2Kk186v/9qC9xVlShk50q/3yC1oeBP STVQXghUoQMniX2i/RFod0iNYLnvfGKgdIoG8dIny64LdXV2pzAHu0DKgV4iJkqFsI4GcrlPRMl sha2RcSK1jZ+sTg== X-Google-Smtp-Source: AGHT+IFps824G1+9A1E1L6AAWpNXIwur9m1JpZYdYKH4pXCtjT5yIMTBrMWE7hKq5tOG/iUqapsb98A/ivv/rA== X-Received: from ejctk13.prod.google.com ([2002:a17:907:c28d:b0:afe:94a7:8b97]) (user=jackmanb job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:1c93:b0:af9:d80f:645d with SMTP id a640c23a62f3a-afe29793340mr1744344266b.57.1756292686965; Wed, 27 Aug 2025 04:04:46 -0700 (PDT) Date: Wed, 27 Aug 2025 11:04:42 +0000 In-Reply-To: <20250827-b4-vma-no-atomic-h-v1-0-5d3a94ae670f@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250827-b4-vma-no-atomic-h-v1-0-5d3a94ae670f@google.com> X-Mailer: b4 0.14.2 Message-ID: <20250827-b4-vma-no-atomic-h-v1-2-5d3a94ae670f@google.com> Subject: [PATCH 2/3] tools: testing: Use existing atomic.h for vma/radix-tree tests From: Brendan Jackman To: "Liam R. Howlett" , Andrew Morton , Lorenzo Stoakes , Vlastimil Babka , Jann Horn , Pedro Falcato Cc: linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, linux-mm@kvack.org, Brendan Jackman Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The shared userspace logic used for unit-testing radix-tree and VMA code currently has its own replacements for atomics helpers. This is not needed as the necessary APIs already have userspace implementations in the tools tree. Switching over to that allows deleting a bit of code. Note that the implementation is different; while the version being deleted here is implemented using liburcu, the existing version in tools uses either x86 asm or compiler builtins. It's assumed that both are equally likely to be correct. The tools tree's version of atomic_t is a struct type while the version being deleted was just a typedef of an integer. This means it's no longer valid to call __sync_bool_compare_and_swap() directly on it. One option would be to just peek into the struct and call it on the field, but it seems a little cleaner to just use the corresponding atomic.h API. On non-x86 archs this is implemented using __sync_val_compare_and_swap(). It's not clear why the old version uses the bool variant instead of the generic "val" one, for now it's assumed that this was a mistake. Signed-off-by: Brendan Jackman Reviewed-by: Lorenzo Stoakes --- tools/testing/shared/linux/maple_tree.h | 6 ++---- tools/testing/vma/linux/atomic.h | 17 ----------------- tools/testing/vma/vma_internal.h | 3 ++- 3 files changed, 4 insertions(+), 22 deletions(-) diff --git a/tools/testing/shared/linux/maple_tree.h b/tools/testing/shared= /linux/maple_tree.h index f67d47d32857cee296c2784da57825c9a31cd340..7d0fadef0f11624dbb110ad351a= abdc79a19dcd2 100644 --- a/tools/testing/shared/linux/maple_tree.h +++ b/tools/testing/shared/linux/maple_tree.h @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0+ */ -#define atomic_t int32_t -#define atomic_inc(x) uatomic_inc(x) -#define atomic_read(x) uatomic_read(x) -#define atomic_set(x, y) uatomic_set(x, y) +#include + #define U8_MAX UCHAR_MAX #include "../../../../include/linux/maple_tree.h" diff --git a/tools/testing/vma/linux/atomic.h b/tools/testing/vma/linux/ato= mic.h deleted file mode 100644 index 788c597c4fdea7392307de93ff4459453b96179b..000000000000000000000000000= 0000000000000 --- a/tools/testing/vma/linux/atomic.h +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#ifndef _LINUX_ATOMIC_H -#define _LINUX_ATOMIC_H - -#define atomic_t int32_t -#define atomic_inc(x) uatomic_inc(x) -#define atomic_read(x) uatomic_read(x) -#define atomic_set(x, y) uatomic_set(x, y) -#define U8_MAX UCHAR_MAX - -#ifndef atomic_cmpxchg_relaxed -#define atomic_cmpxchg_relaxed uatomic_cmpxchg -#define atomic_cmpxchg_release uatomic_cmpxchg -#endif /* atomic_cmpxchg_relaxed */ - -#endif /* _LINUX_ATOMIC_H */ diff --git a/tools/testing/vma/vma_internal.h b/tools/testing/vma/vma_inter= nal.h index 3639aa8dd2b06ebe5b9cfcfe6669994fd38c482d..a720a4e6bada83e6b32e7676208= 9eeec35ba8fac 100644 --- a/tools/testing/vma/vma_internal.h +++ b/tools/testing/vma/vma_internal.h @@ -21,6 +21,7 @@ =20 #include =20 +#include #include #include #include @@ -1381,7 +1382,7 @@ static inline int mapping_map_writable(struct address= _space *mapping) do { if (c < 0) return -EPERM; - } while (!__sync_bool_compare_and_swap(&mapping->i_mmap_writable, c, c+1)= ); + } while (!atomic_cmpxchg(&mapping->i_mmap_writable, c, c+1)); =20 return 0; } --=20 2.50.1 From nobody Fri Oct 3 18:01:16 2025 Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.73]) (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 1EAA02C08CA for ; Wed, 27 Aug 2025 11:04:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756292691; cv=none; b=AnzbXwUARpX/zwPNqO8sljZvAmJL/dhH0bYV8HoVp8QivSlovu/NtEnyBNEIyrvwB3BmVp1ubxiV9ylpF0R0lQtACHpJtNLCWWQ2FybIImfcwrjij8K1/b+arArZmrDeYrTWc/jgr9XSs3ZVDKhaEzazVO0nqDXrqKfW8snqdIo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756292691; c=relaxed/simple; bh=9Kd9r8EWcGhXM9Z0go2oGM47zU0PnGfjgD38W5EqGLo=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=HNrtg1w6y4NquKFSeCxJG3iqy0QoDWo8MCqOHVPZ8NRmL3zTnCY8mFMGJHxVUYBZ9hcv81mJmRPEQm7V0ohIOe6r/UExtyiiYUFomFi3F8QCW2yQ06F5nTehO8bHDRgULb1KAtshxEpJIfsfp85oce4SpgWyMHc0JRxFaVVDR0M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=y7CglR45; arc=none smtp.client-ip=209.85.208.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="y7CglR45" Received: by mail-ed1-f73.google.com with SMTP id 4fb4d7f45d1cf-61c524e33d9so3409545a12.1 for ; Wed, 27 Aug 2025 04:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1756292688; x=1756897488; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=nf4CiXWHDpJDlUPbhGw995yPVPVvyqVPHVSb+srJYto=; b=y7CglR45+wclbtO8eHXbKeSdReA96QxHd++QE5gcPamd5qmaJNGj3Ve7b3PYASfAKt 2cGRSXa3Yol7eIboCw9v+3CGZWAauyY/qyh5nvzjZWOZh6++/PzjXI4GkTcgD80eNraF 51Yv4OCgU4kviycu/EU4x5PmV3mb0GxSpvmCywlzHprhywEm5hCMYDDVgVDixLiwpB8f kBDfp+0XfU3+gbdK5A014b0TJkIVAGCmELQLWzcA2wgSVdJRuHDBwcVUBWlCkWEiGDkc QELi+mOlXjDPXa05vIw+PIVwmIiRB6v6WYxIf2VWPuiuWsz/F3zYmppVqfanRCVtkGsK vCjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756292688; x=1756897488; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nf4CiXWHDpJDlUPbhGw995yPVPVvyqVPHVSb+srJYto=; b=JRwm4VzgbohetgfYtUPWjx/FdtoJ8vVLBEbg4avBLh4N7hLKV2VUwitOb0plivuQKC s+50klOC8djPikSzyHHINwq6hLRRnmiN5cMCJEXmm/cHQLkCfEgO5SXTAMqipRbI6308 J6pxSJo1ZEw5fIQDUD7B+lZLIZeKfHZ8mKy0/JmjBikyGxX5mivXd5P3KGxvWyV89ui/ J++uwqD8MKCugJVyq4sd16W7vQ8d5oAViJn1rKQ+2bTUQsO242d2j8kWflseSKunK5Ok ovGeT0j3LoizmSVG8JAoNeyOeBFWRSbOHSpt5TDygqq6l9MkzOXKPNTUsAfIwFgBwtOB 29VA== X-Gm-Message-State: AOJu0YzFfzWq2wZPuL011sI/fke+7vFpf6V7S6dGm/xucj5b+u9VwlFS FUKmvYa9sEOKH19T+2m2sg0dAh+bqanFgp3a8QP6xcP4NDEoSz8VPAMFBL8k+z//AoNzwOkKm4B DhY71FPIIsaI8jQ== X-Google-Smtp-Source: AGHT+IHrZXwCVvuqupUKpT95XmcWj4Xa/7qE/DbFzWdo9LcsAOtZKdLGvcR+C3sRuAOM6hlRZPCPsneY5yWc2w== X-Received: from edbes5.prod.google.com ([2002:a05:6402:3805:b0:61c:8c63:a94d]) (user=jackmanb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:50d1:b0:61c:b951:adb with SMTP id 4fb4d7f45d1cf-61cb9510f08mr777554a12.9.1756292688190; Wed, 27 Aug 2025 04:04:48 -0700 (PDT) Date: Wed, 27 Aug 2025 11:04:43 +0000 In-Reply-To: <20250827-b4-vma-no-atomic-h-v1-0-5d3a94ae670f@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250827-b4-vma-no-atomic-h-v1-0-5d3a94ae670f@google.com> X-Mailer: b4 0.14.2 Message-ID: <20250827-b4-vma-no-atomic-h-v1-3-5d3a94ae670f@google.com> Subject: [PATCH 3/3] tools: testing: Support EXTRA_CFLAGS in shared.mk From: Brendan Jackman To: "Liam R. Howlett" , Andrew Morton , Lorenzo Stoakes , Vlastimil Babka , Jann Horn , Pedro Falcato Cc: linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, linux-mm@kvack.org, Brendan Jackman Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This allows the user to set cflags when building tests that use this shared build infrastructure. For example, it enables building with -Werror so that patch-check scripts will fail: make -C tools/testing/vma -j EXTRA_CFLAGS=3D-Werror Signed-off-by: Brendan Jackman Acked-by: Pedro Falcato Reviewed-by: Liam R. Howlett Reviewed-by: Lorenzo Stoakes --- tools/testing/shared/shared.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/shared/shared.mk b/tools/testing/shared/shared.mk index 937aaa7623320da1085a8e0f43f6a728ddd3ab1c..5bcdf26c8a9d51ab2cbd264f2f8= a7445d7c036e3 100644 --- a/tools/testing/shared/shared.mk +++ b/tools/testing/shared/shared.mk @@ -4,6 +4,7 @@ include ../../scripts/Makefile.arch CFLAGS +=3D -I../shared -I. -I../../include -I../../arch/$(SRCARCH)/includ= e \ -I../../../lib -g -Og -Wall \ -D_LGPL_SOURCE -fsanitize=3Daddress -fsanitize=3Dundefined +CFLAGS +=3D $(EXTRA_CFLAGS) LDFLAGS +=3D -fsanitize=3Daddress -fsanitize=3Dundefined LDLIBS +=3D -lpthread -lurcu LIBS :=3D slab.o find_bit.o bitmap.o hweight.o vsprintf.o --=20 2.50.1