Re: Duplicate headers in tools/testing/shared directory diverged - rcupdate.h
From: Lorenzo Stoakes
Date: Wed Apr 15 2026 - 12:52:32 EST
On Wed, Apr 15, 2026 at 10:39:05AM -0600, Shuah Khan wrote:
> All,
>
> I am sending this email to you all because you touched tools/testing/shared
> and its sub directories and show up in
We need to add these to somewhere in MAINTAINERS...
>
> get_maintainer.pl -f tools/testing/shared/ output
>
> rbtree compile failed as it couldn't find urcu.h
Presumably liburcu is not installed.
>
> cc -I../shared -I. -I../../include -I../../arch/x86/include -I../../../lib -g -Og -Wall -D_LGPL_SOURCE -fsanitize=address -fsanitize=undefined -c -o rbtree_test.o rbtree_test.c
> In file included from ../shared/shared.h:11,
> from rbtree_test.c:9:
> ../shared/linux/rcupdate.h:5:10: fatal error: urcu.h: No such file or directory
> 5 | #include <urcu.h>
> | ^~~~~~~~
> compilation terminated.
>
> This sent me down the path to look at the duplicate headers in tools/testing/shared
> especially rcupdate.h which is under tools/testing/shared/linux
>
> It appears this file is an exact copy of include/linux/rcupdate.h and now it
$ wc -l tools/testing/shared/linux/rcupdate.h
12 tools/testing/shared/linux/rcupdate.h
$ wc -l include/linux/rcupdate.h
1196 include/linux/rcupdate.h
Umm, no?
> diverged. Why do we have these duplicate headers here in this shared
> directory - it appears they are out of date and lead to maintenance problems.
Because they're not duplicates of one another? One is a wrapper around urcu,
your problem is you don't have that library installed.
Unless I'm missing something?
>
> thanks,
> -- Shuah
Thanks, Lorenzo