-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run integration test triggers in own PID (#2323)
This is a change to the integration tests so that the commands which are meant to trigger events that the tests look for, are actually picked up by tracee. In order for this to happen, the events can't be the same PID as tracee. This is accomplished using syscall.ForkExec() which runs functions in a shell script. Signed-off-by: grantseltzer <grantseltzer@gmail.com>
- Loading branch information
1 parent
380070e
commit ea11896
Showing
2 changed files
with
81 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
|
||
do_magic_write() { | ||
tmpFileName=$1 | ||
echo "AAAAA" > $tmpFileName | ||
} | ||
|
||
do_ls() { | ||
ls > /dev/null | ||
} | ||
|
||
do_docker_run() { | ||
outputFileName=$1 | ||
output=$(docker run -d --rm alpine) | ||
$(echo $output > $outputFileName) | ||
} | ||
|
||
# $1 is the function to call | ||
# $2 is the temp file to optionally output to | ||
$1 $2 |