|
|
Log in / Subscribe / Register

Toward a real "too small to fail" rule

Toward a real "too small to fail" rule

Posted Mar 19, 2024 6:31 UTC (Tue) by PengZheng (subscriber, #108006)
In reply to: Toward a real "too small to fail" rule by koverstreet
Parent article: Toward a real "too small to fail" rule

> kunit isn't what you want for testing memory allocation failure paths, you'll never have unit tests for this stuff. You just need to run the big integration tests that you already have (e.g. fstests) with fault injection.

> The thing that's made this hard in the past is that you need to be specific about which allocation callsites you're injecting errors into, or your tests will fail in ways that you weren't expecting. That's the capability we don't have yet: we have error injection in the kernel, but it doesn't have facilities for defining per callsite injection points and I've never seen anyone use it for testing memory allocation failures.

We did lots of memory allocation error injections in unit tests, though in user space.
And the error injectors are very easy to write, which are actually generated by GitHub Copilot.

https://github.com/apache/celix/blob/master/libs/error_in...

The way to use it is quite straightforward: just link to the CMake target Celix::malloc_ei.

Specifying precise call sites to fail is also easier:
https://github.com/apache/celix/blob/master/libs/error_in...


to post comments

Toward a real "too small to fail" rule

Posted Mar 19, 2024 10:42 UTC (Tue) by gray_-_wolf (subscriber, #131074) [Link] (11 responses)

> And the error injectors are very easy to write, which are actually generated by GitHub Copilot.

Do I understand it right that the file https://github.com/apache/celix/blob/master/libs/error_in... was generated by Copilot?

Toward a real "too small to fail" rule

Posted Mar 19, 2024 10:52 UTC (Tue) by PengZheng (subscriber, #108006) [Link] (10 responses)

Every single stub is generated by Copilot not the whole C file.

There is no copyright issue, since there is almost only one way to write stub, such as

void *__real_malloc(size_t);
CELIX_EI_DEFINE(malloc, void *)
void *__wrap_malloc(size_t size) {
errno = ENOMEM;
CELIX_EI_IMPL(malloc);
errno = 0;
return __real_malloc(size);
}

There is actually no real difference if it is written by hand or generated by AI.
By the way, it is us create the pattern.
AI just recognize the pattern we created and follows the pattern.

Rest assured that 100% no copyright issue involved.

Toward a real "too small to fail" rule

Posted Mar 19, 2024 11:16 UTC (Tue) by gray_-_wolf (subscriber, #131074) [Link] (9 responses)

Actually what surprised me was the license of the file, since I was under the impression that LLM produced output is not copyrightable. So I am trying to understand why the file is under Apache license 2 instead of, I don't know, public domain or something.

Would you happen to know what the consensus here is? Can you just slap any license you want on the output of copilot?

Toward a real "too small to fail" rule

Posted Mar 19, 2024 11:30 UTC (Tue) by PengZheng (subscriber, #108006) [Link] (2 responses)

> Would you happen to know what the consensus here is? Can you just slap any license you want on the output of copilot?

If there is no difference between AI-generated output and hand-written codes, since there happens to be only one way of writing stub, why bother worrying copyright issues. Not to mention that I invented the mentioned way.

Moreover, the mentioned tests can be put under public domain or any license (because they are not essential part of the project), and are not installed anywhere outside of the project.

Toward a real "too small to fail" rule

Posted Mar 19, 2024 12:45 UTC (Tue) by paulj (subscriber, #341) [Link] (1 responses)

If you are relying on the argument that there is only 1 way to write something, and hence there is nothing creative to it, and hence it is not copyrightable, then... surely you can not claim a copyright over it, and hence can not put a licence notice on it either?

Smells like you get some advice on this?

Toward a real "too small to fail" rule

Posted Mar 19, 2024 12:53 UTC (Tue) by PengZheng (subscriber, #108006) [Link]

Is there any argument? I just said there is nothing to worry about and I really don't care these issues.
The licenses put there are just IDE boilerplate.

If any one interested to correct this, just send a PR to remove these licenses claim, I will happily apply them.
Unless some lawyers find me, I won't bother worrying this and leave it as is.

Toward a real "too small to fail" rule

Posted Mar 19, 2024 11:35 UTC (Tue) by Wol (subscriber, #4433) [Link] (5 responses)

You shouldn't be able to slap ANY copyright on the output of Co-Pilot. After all, it's not your work. HOWEVER.

If you fed it a template and said "write in this style", then your input is your copyright. Co-Pilot's work is a derived work, therefore your copyright flows through to the output.

Equally, if you review AND CORRECT Co-Pilot's work, then you have created a derivative work, and you can claim copyright in the derivative.

But no, as a fundamental rule I think it's been pretty much decided that Co-Pilot's work is not copyrightable, what matters is the pre-existing copyrights on the works Co-Pilot used as input, and post-process copyrights added to the output.

Europe I think has specifically said using copyrighted works as INPUT is not infringing, so the LLM "academics" are not breaching copyright - they have NOT said that using the output is non-infringing ...

Cheers,
Wol

Toward a real "too small to fail" rule

Posted Mar 19, 2024 13:46 UTC (Tue) by josh (subscriber, #17465) [Link] (2 responses)

> But no, as a fundamental rule I think it's been pretty much decided that Co-Pilot's work is not copyrightable

This has not been legally determined yet, and cautious users should avoid assuming this. It may also also end up depending on jurisdiction.

Toward a real "too small to fail" rule

Posted Mar 19, 2024 16:45 UTC (Tue) by Wol (subscriber, #4433) [Link] (1 responses)

Well if a Gorilla can't get copyright, I seriously doubt an AI can!

I think it's a pretty safe bet you cannot put an AI down as the copyright holder. An AI can't ADD copyright, nor can it REMOVE it.

Feeding stuff in is (in places like Europe) defined in law as "non-infringing", aiui, but it says nothing about getting stuff out again :-)

Cheers,
Wol

Toward a real "too small to fail" rule

Posted Mar 19, 2024 21:22 UTC (Tue) by josh (subscriber, #17465) [Link]

Ah, when you said "Co-Pilot's work is not copyrightable", I thought you were saying you thought AI output was in general not copyrightable (not legally determined), rather than that the AI itself cannot be an author and hold copyright (legally quite certain barring unlikely changes in law).

> nor can it REMOVE it.

We're likely on the same page, then. Hopefully courts agree.

Toward a real "too small to fail" rule

Posted Mar 21, 2024 11:33 UTC (Thu) by Karellen (subscriber, #67644) [Link] (1 responses)

If you fed it a template and said "write in this style", then your input is your copyright. Co-Pilot's work is a derived work, therefore your copyright flows through to the output.

Hmmm..... if you wrote a story where half the characters were lifted from another story, and all their dialogue were copied verbatim from that story, with your new characters reacting differently to those events, then your inputs from the new characters is your copyright, and the work as a whole is derived from your work.

...but, it is also derived from the story you got the other characters from. Just because some of the work is yours, does not automatically give you the right to claim copyright over the whole work. See also, music sampling. Just because you wrote 95% of a song, that does not allow you to claim copyright over a small sample you lifted from elsewhere and looped in the background of your track. Even if you chop a small sample up into even smaller pieces and re-order them to be almost unrecognisable, that fact that you got those pieces from an existing work is the issue.

I don't think it's reasonable to conclude that the copyright of all the other inputs to a final work (e.g. all the other inputs to Co-Pilot's training) can just be ignored, simply because you have a claim to one of the inputs, or even to a majority of the inputs.

Toward a real "too small to fail" rule

Posted Mar 21, 2024 15:10 UTC (Thu) by Wol (subscriber, #4433) [Link]

>> If you fed it a template and said "write in this style", then your input is your copyright. Co-Pilot's work is a derived work, therefore your copyright flows through to the output.

> Hmmm..... if you wrote a story where half the characters were lifted from another story, and all their dialogue were copied verbatim from that story, with your new characters reacting differently to those events, then your inputs from the new characters is your copyright, and the work as a whole is derived from your work.

Are you reading via "Unread comments"? It's great, but it does strip context.

My intent (which I thought was obvious) was that the template was YOUR WORK, therefore YOUR COPYRIGHT. Therefore Co-Pilot's (or any other AI's) work is *also* your copyright.

Cheers,
Wol


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds