[RFC] glibc AI policy. Round 3. Adopt the GCC AI policy.
Carlos O'Donell
carlos@redhat.com
Tue Nov 3 23:30:32 GMT 2026
On 10/24/26 10:51 AM, Siddhesh Poyarekar wrote:
> On 2026-10-24 09:34, Carlos O'Donell wrote:
>> Developers,
>>
>> tl;dr I would like glibc to adopt the gcc AI policy documented here:
>> https://gcc.gnu.org/ai-policy.html
> I believe have quite a few more test cases with copyright notices
> than gcc does. Do we want to add specific wording to somehow
> preserve that or do we go the gcc way for the testsuite? Similarly,
> do we want to annotate LLM generated tests somehow to distinguish
> them from handwritten ones?
At a high level several things are important to the project:
1. When you write a test by hand, that test should have a license
and copyright such that the project can know how you intended
to contribute and share that work. We encourage that test to
be LGPLv2+, the same as the project, for simplicity.
- Example: glibc/misc/tst-mkstemp-fuse-parallel.c
2. When we copy code from another project into the testsuite in
order to run it as part of the testsuite, that code must
preserve the original notices as required by the original
license (and meet any license obligations).
- Example: glibc/support/bundled/linux/include/uapi/linux/fuse.h
What other invariants would we want to preserve?
Why would we want to mark LLM-generated tests as such?
LLM-generated tests have git commit history of Assisted-by: LLM.
If we need to remove them we will go back through the test sources
to get a version that is clean.
If the goal is to stop from copying from a test into the implementation,
then I think that's always a goal we should have regardless of LLMs.
Some glibc tests are copies of user programs, have no license header,
or otherwise, and so we should not copy from tests into the
implementation ever. It's simpler if we just don't do this to avoid
accidents.
The example above is a good case where we can get in trouble if we copy
GPLv2 code into an LGPLv2+ library (though UAPI headers use
"WITH Linux-syscall-note") instead of just making syscalls.
In summary:
- Do not copy from tests into the implementation.
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list