Address post-commit review comments in the https://reviews.llvm.org/D82549, including
- changed file name from llvm/test/tools/llvm-readobj/XCOFF/xcoff-auxiliary-header.test --> llvm/test/tools/llvm-readobj/XCOFF/auxiliary-header.test
- replaced macro define by using lambda function.
- added a helper function to reduce the duplicated check and print error code.
I previously suggested test input files should be renamed too, i.e. 64-xlc-exec since it's already in an XCOFF subdirectory.