[llvm] [DirectX] Add boilerplate integration of `objcopy` for `DXContainerObjectFile` (PR #153079)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 14 01:06:39 PDT 2025


jh7370 wrote:

> We do have [DXContainerTest.cpp](https://github.com/inbelic/llvm-project/blob/main/llvm/unittests/Object/DXContainerTest.cpp), where we test reading invalid structs. I am not sure how much benefit we get from reproducing those here.
> 
> I have added two tests to sanity check they surface as expected.

I'm not asking for testing of the underlying parsing code (since it should be tested elsewhere). I'm asking for tests that show that when that code is called and fed an invalid object, the resultant error is handled properly in your new code. This would help identify problems like the one I referred to in the second part of [this comment](https://github.com/llvm/llvm-project/pull/153079#discussion_r2269096056). There are numerous examples of this for the other formats supported by llvm-objcopy, often requiring yaml2obj features for generating invalid object files. It may be necessary to extend yaml2obj to provide ways for creating invalid objects.

https://github.com/llvm/llvm-project/pull/153079


More information about the llvm-commits mailing list