Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Many systems on which CTF is too old for tst.bitfield-offset.d to pass will also be too old for objdump --ctf=.ctf to work: in that case, we have no way to tell how new the CTF is (and thus whether this bug is expected to be fixed), so we have to skip it. Even figuring out if this is the case is hard. We don't want to try to objdump the entire kernel CTFA again in case it works (it's huge and takes ages to dump: we're not exiting early on a version check here, after all). But objdump returns with an exitcode of 1 both if an unrecognized option is found *and* if the target contains no CTF at all -- so we must literally grep for 'Unrecognized option' (under LANG=C) to be sure of spotting an instance we must skip. (We also check for a zero exit code, because if our random test executable *does* contain CTF and dumping it works there's no need to grep the stderr for anything at all.) Signed-off-by: Nick Alcock <nick.alcock@oracle.com> Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
- Loading branch information