static PCodeTestControlBlock getMainControlBlock(Program program, PCodeTestFile testFile,
			AddressSetView restrictedSet, String cachedProgramPath, Structure testInfoStruct,
			Structure groupInfoStruct, boolean applyStruct, PCodeTestResults testResults)
			throws InvalidControlBlockException, CodeUnitInsertionException {

		PCodeTestControlBlock.testInfoStruct = testInfoStruct;
		PCodeTestControlBlock.groupInfoStruct = groupInfoStruct;

		Memory memory = program.getMemory();
		byte[] magicBytes = getCharArrayBytes(program, MAIN_CONTROL_BLOCK_MAGIC);

		Address startOfControlBlock = findBytes(memory, restrictedSet, magicBytes);
		if (startOfControlBlock == null) {
			throw new InvalidControlBlockException("TestInfo structure not found");
		}

		return new PCodeTestControlBlock(program, restrictedSet, startOfControlBlock, testFile,
			cachedProgramPath, applyStruct, testResults);
	}
Find Main TestInfo structure within memory and return instance of PCodeTestControlBlock
@param program
@param testFile original binary test file
@param restrictedSet a restricted set to be searched for control structures
@param cachedProgramPath program path within program file cache
@param testInfoStruct TestInfo structure definition
@param groupInfoStruct GroupInfo structure definition
@param applyStruct create structure Data within program if true
@param testResults test results storage object
@return instance of PCodeTestControlBlock
@throws InvalidControlBlockException
@throws CodeUnitInsertionException
Ghidra/Features/Base/src/main/java/ghidra/test/processors/support/PCodeTestControlBlock.java