Skip to content

Add config option expected_end_state #2886

Merged
sporksmith merged 8 commits intoshadow:mainfrom
sporksmith:verify-exit-state
May 3, 2023
Merged

Add config option expected_end_state #2886
sporksmith merged 8 commits intoshadow:mainfrom
sporksmith:verify-exit-state

Conversation

@sporksmith
Copy link
Copy Markdown
Contributor

@sporksmith sporksmith commented Apr 19, 2023

  • Allows the user to specify the expected state of a process at the end of a simulation.
  • Changes the default behavior to treat a process still running at the end of the simulation as an error.

See #2034

@github-actions github-actions bot added Component: Build Build/install tools and dependencies Component: Documentation In-repository documentation, under docs/ Component: Libraries Support functions like LD_PRELOAD and logging Component: Main Composing the core Shadow executable Component: Testing Unit and integration tests and frameworks labels Apr 19, 2023
@sporksmith sporksmith changed the title Verify exit state Add config option expected_end_state Apr 20, 2023
@github-actions github-actions bot removed the Component: Libraries Support functions like LD_PRELOAD and logging label Apr 20, 2023
@sporksmith sporksmith marked this pull request as ready for review April 20, 2023 21:43
@sporksmith sporksmith requested a review from stevenengler April 20, 2023 22:26
@sporksmith sporksmith force-pushed the verify-exit-state branch 2 times, most recently from d8fcbb7 to af28171 Compare May 2, 2023 01:27
@sporksmith sporksmith requested a review from stevenengler May 2, 2023 14:05
@sporksmith
Copy link
Copy Markdown
Contributor Author

Changed to use the untagged enum trick to avoid requiring the ! explicit types in yaml. PTAL

sporksmith added 8 commits May 3, 2023 14:56
In particular this ensures we don't circumvent the error checking of the
final process exit status when transitioning from Running to Zombie.
This allows the user to specify the expected state of a process at the
end of a simulation.

This also changes the default behavior to treat a process still running
at the end of the simulation as an error.

See shadow#2034
Explicit yaml types can be difficult to work with. e.g. it's unclear how
to get pyyaml to emit `!running` (and not `"running"` or `!running {}`.
Even if we solved it for pyyaml, users are likely to run into problems
with other tools.

With a few tweaks we get a more intuitive yaml representation, at the
expense of a slightly more complex internal representation.
@sporksmith sporksmith force-pushed the verify-exit-state branch from af28171 to cdf0836 Compare May 3, 2023 19:57
@sporksmith sporksmith enabled auto-merge May 3, 2023 19:57
@sporksmith sporksmith merged commit 7ba17fb into shadow:main May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Build Build/install tools and dependencies Component: Documentation In-repository documentation, under docs/ Component: Main Composing the core Shadow executable Component: Testing Unit and integration tests and frameworks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants