class CloneHelper

Defined at line 110 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h

Helper class to handle tests that needs to clone processes.

Public Methods

void CloneHelper ()

Defined at line 189 of file ../../src/starnix/tests/syscalls/cpp/test_helper.cc

void ~CloneHelper ()

Defined at line 202 of file ../../src/starnix/tests/syscalls/cpp/test_helper.cc

int runInClonedChild (unsigned int cloneFlags, int (*)(void *) childFunction)

Call clone with the specified childFunction and cloneFlags.

Perform the necessary asserts to ensure the clone was performed with

no errors and return the new process ID.

Defined at line 204 of file ../../src/starnix/tests/syscalls/cpp/test_helper.cc

int runInClonedChild (unsigned int cloneFlags, std::function<void ()> action)

Call clone and execute the given |action| inside the child,

then exit with a status equal to the number of failed expectations and

assertions. Return immediately with the pid of the child.

Defined at line 210 of file ../../src/starnix/tests/syscalls/cpp/test_helper.cc

int sleep_1sec (void * )

Handy trivial function for passing clone when we want the child to

sleep for 1 second and return 0.

Defined at line 214 of file ../../src/starnix/tests/syscalls/cpp/test_helper.cc

int doNothing (void * )

Handy trivial function for passing clone when we want the child to

do nothing and return 0.

Defined at line 222 of file ../../src/starnix/tests/syscalls/cpp/test_helper.cc