mirror-linux/tools/testing/shared/linux
Marco Elver 944e3f7562 tools: Update context analysis macros in compiler_types.h
In sync with the main kernel headers, include a stub version of
compiler-context-analysis.h in tools/include/linux/compiler_types.h and
remove the sparse context tracking definitions.

Since tools/ headers are generally self-contained, provide a standalone
tools/include/linux/compiler-context-analysis.h with no-op stubs for now. Also
clean up redundant stubs in tools/testing/shared/linux/kernel.h that are now
redundant.

This fixes build errors in tools/testing/radix-tree/ where headers from
include/linux/ (like cleanup.h) are used directly and expect these
macros to be defined:

| cc -I../shared -I. -I../../include -I../../arch/x86/include -I../../../lib -g -Og -Wall -D_LGPL_SOURCE -fsanitize=address -fsanitize=undefined    -c -o radix-tree.o radix-tree.c
| In file included from ../shared/linux/cleanup.h:2,
|                  from ../shared/linux/../../../../include/linux/idr.h:18,
|                  from ../shared/linux/idr.h:5,
|                  from radix-tree.c:18:
| ../shared/linux/../../../../include/linux/idr.h: In function ‘class_idr_alloc_destructor’:
| ../shared/linux/../../../../include/linux/cleanup.h:283:9: error: expected declaration specifiers before ‘__no_context_analysis’
|   283 |         __no_context_analysis                                           \
|       |         ^~~~~~~~~~~~~~~~~~~~~

Closes: https://lore.kernel.org/oe-lkp/202601261546.d7ae2447-lkp@intel.com
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Tested-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Link: https://patch.msgid.link/20260127111428.3747328-1-elver@google.com
2026-01-28 09:25:45 +01:00
..
bug.h
cleanup.h radix-tree: add missing cleanup.h 2025-04-11 17:32:35 -07:00
cpu.h
idr.h tools/testing: add linux/args.h header and fix radix, VMA tests 2025-08-19 16:35:54 -07:00
interval_tree.h lib/rbtree: enable userland test suite for rbtree related data structure 2025-03-17 12:17:00 -07:00
interval_tree_generic.h lib/rbtree: enable userland test suite for rbtree related data structure 2025-03-17 12:17:00 -07:00
kconfig.h
kernel.h tools: Update context analysis macros in compiler_types.h 2026-01-28 09:25:45 +01:00
kmemleak.h
local_lock.h
lockdep.h
maple_tree.h tools: testing: use existing atomic.h for vma/maple tests 2025-09-13 16:55:25 -07:00
percpu.h
preempt.h
radix-tree.h
rbtree.h lib/rbtree: enable userland test suite for rbtree related data structure 2025-03-17 12:17:00 -07:00
rbtree_augmented.h lib/rbtree: enable userland test suite for rbtree related data structure 2025-03-17 12:17:00 -07:00
rbtree_types.h lib/rbtree: enable userland test suite for rbtree related data structure 2025-03-17 12:17:00 -07:00
rcupdate.h
xarray.h