private void checkForProgramIssues(Program program, String resourceFilePath,
			PCodeTestControlBlock testControlBlock, PCodeTestResults testResults) {

		BookmarkManager bookmarkManager = program.getBookmarkManager();
		Iterator<Bookmark> iter = bookmarkManager.getBookmarksIterator(BookmarkType.ERROR);

		boolean hasDisassemblyErrors = false;
		boolean hasRelocationErrors = false;
		while (iter.hasNext()) {
			Bookmark bookmark = iter.next();
			if ("Bad Instruction".equals(bookmark.getCategory())) {
				hasDisassemblyErrors = true;
			}
			if ("Relocation".equals(bookmark.getCategory())) {
				hasRelocationErrors = true;
			}
		}
		if (hasDisassemblyErrors) {
			boolean fail = failOnDisassemblyErrors();
			log(null,
				(fail ? "ERROR" : "WARNING") +
					": Program contains one or more Bad Instruction Error bookmarks - " +
					resourceFilePath);
			if (fail) {
				testResults.summaryHasDisassemblyErrors = true;
			}

		}
		if (hasRelocationErrors) {
			boolean fail = failOnRelocationErrors();
			log(null, (fail ? "ERROR" : "WARNING") +
				": Program contains one or more Relocation Error bookmarks - " + resourceFilePath);
			if (fail) {
				testResults.summaryHasRelocationErrors = true;
			}
		}
	}
@return true if test run should fail up-front if binary contains relocation errors
Ghidra/Features/Base/src/main/java/ghidra/test/processors/support/ProcessorEmulatorTestAdapter.java