[llvm] [ELFObject] Added dbgs() statement in removeSections() (PR #124692)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 10 01:04:01 PST 2025
jh7370 wrote:
I'll take a look at this PR next week - I have other priorities for this week, I'm afraid.
> @jh7370 I am not sure how to generate the tests for this. Could you guide me? I am a first-time contributor.
The best bet is to take a look at how other tests check things. Tests for llvm-objcopy and the corresponding library are primarily contained in llvm/test/tools/llvm-objcopy. You'll want an input that contains sections/symbols you want output for. This input will be in the form of a YAML document that you use yaml2obj to turn into an object file that you then feed into llvm-objcopy with the appropriate options. You'll feed the stdout/stderr (I haven't looked at which you've used) to FileCheck, which is a pattern matcher that matches against CHECK directives contained in the file. These CHECK directives should be used to match against the new messages. There aren't many llvm-objcopy tests that check messages, so you might want to look at e.g. llvm-readobj tests that do similar things, for more examples.
https://github.com/llvm/llvm-project/pull/124692
More information about the llvm-commits
mailing list