Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isolate tests in child processes #158

Conversation

Peyman-EsteghamatRad
Copy link

With this PR testcases are isolated in single processes. This allows to keep executing all testcases even if some tests fail due to an unhandled signal (e.g. SIGSEGV).

utest.h Outdated
@@ -33,6 +33,10 @@
#ifndef SHEREDOM_UTEST_H_INCLUDED
#define SHEREDOM_UTEST_H_INCLUDED

#include <cstdlib>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are gonna run into some nasty cross platform issues here I'd bet!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I think cross platform compatibility will be a problem. I will check if there is a solution for that.

utest.h Outdated
@@ -1554,21 +1558,43 @@ int utest_main(int argc, const char *const argv[]) {

ns = utest_ns();
errno = 0;

pid_t pid = fork();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to do some perf testing to see how much slower this is (I suspect it might be).

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

Successfully merging this pull request may close these issues.

2 participants