Skip to content

Separate file events and dir events #81

Description

@krs85

Example use: When skipping a program, say the program creates a dir and puts a bunch of files in there. If we try to copy outputs to a dir that doesn't exist yet, it will error. It is much simpler to just take care of the dir postconditions first (in apply_all_transitions()), and it's fairly simple to separate them within the ExecFileEvents struct.

Potential dir actions (SyscallEvents) that need to be handled separately from files:

  • statfs
  • create
  • delete (rmdir, unlinkat(flags = AT_REMOVEDIR)
  • rename: future TODO
  • getdents

Other:

  • Separate the file SyscallEvents from dir ones
  • ExecFileEvents -> ExecSyscallEvents(FileEvents, DirEvents)
  • generate_file_preconditions()
  • generate_file_postconditions()
  • generate_dir_preconditions()
  • generate_dir_postconditions()
  • generate_postconditions() -> calls both
  • generate_preconditions() -> calls both
  • update_based_on_syscall() -> LastMod. update based on file event, update based on dir event.
  • update_based_on_syscalls() -> FirstState. update based on file event, update based on dir event.
  • copying to the cache (generate_list_of_files_to_copy_to_cache). Don't have to do anything here with dirs.
  • serving from the cache (apply_transition_function). Need to do: create, rename, delete. Separate function for dirs.
  • stdout files (copied to cache + removed from starting cwd)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions