Verify a workset only exists along with a reboot context (#378)

Adds the following:

1. Serializes a workset to disk during setup.
2. Upon deserializing a RebootContext, delete the file from disk (We support rebooting once and only once)
3. Check if a workset exists with a RebootContext
    1. If True, continuing processing
    2. if False, mark the tasks & node as "Done" with appropriate errors via:
        1. send WorkerEvent::Done events for each of the tasks in the work set
        2. send StateUpdateEvent::Done for the node
This commit is contained in:
bmc-msft
2021-01-04 12:51:20 -05:00
committed by GitHub
parent 36b3e2a5aa
commit d038cca1e1
5 changed files with 97 additions and 11 deletions

View File

@ -54,6 +54,7 @@ class Integration(BaseModel):
wait_for_files: List[ContainerType]
check_asan_log: Optional[bool] = Field(default=False)
disable_check_debugger: Optional[bool] = Field(default=False)
reboot_after_setup: Optional[bool] = Field(default=False)
TARGETS: Dict[str, Integration] = {
@ -70,6 +71,7 @@ TARGETS: Dict[str, Integration] = {
target_exe="fuzz.exe",
inputs="seeds",
wait_for_files=[ContainerType.unique_reports, ContainerType.coverage],
reboot_after_setup=True,
),
"linux-libfuzzer-rust": Integration(
template=TemplateType.libfuzzer,
@ -203,6 +205,7 @@ class TestOnefuzz:
setup_dir=setup,
duration=1,
vm_count=1,
reboot_after_setup=config.reboot_after_setup,
)
elif config.template == TemplateType.radamsa:
job = self.of.template.radamsa.basic(