Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Legit exceptions mechanism #159

Open
idanarye opened this issue Mar 18, 2019 · 2 comments
Open

Legit exceptions mechanism #159

idanarye opened this issue Mar 18, 2019 · 2 comments

Comments

@idanarye
Copy link

We often have exceptions bubbling through multiple layers:

TEST/MAYHEM    \                     / handle or crash
                \                   /
wepy.explore     \                 / bubble up
                  \               /
stress0            \             / bubble up
                    \           /
cli                  \exception/

The top layer decides if it is going to continue with the exception or fail the test, but the medium layers still need to make a decision based on the top layer's decision:

  1. If the test is going to fail, they want to keep the potentially-corrupted state so that it'll appear in the debug artifacts.
  2. If the test is going to continue, maybe they need to fix/rollback (e.g. - s0 may need to resume stressing on a filesystem that has failed to delete? Or stop waiting for a rebooting host to reboot if its reboot was aborted?)

We want to somehow let the top layer mark the exception as legitimate, and as the exception bubbles up the middle layers will base their behavior on the exception's legitimacy.

@koreno
Copy link
Contributor

koreno commented Mar 18, 2019 via email

@doron-cohen
Copy link

I think control should be left to the uppermost layer (in this case Mayhem) so it could "freeze" stress0 for example. other than that we could pass exception handlers as objects to decide whether to bubble up or swallow an exception at a lower level.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants