We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63277fb commit 65490bbCopy full SHA for 65490bb
tests/run-tests.sh
@@ -2,9 +2,6 @@
2
3
set -e
4
5
-echo "a" > /tmp/a
6
-echo "b" > /tmp/b
7
-echo "c" > /tmp/c
8
COPYCAT="/tmp/a /tmp/b" copycat -- tests
9
10
echo -e "\nRunning benchmark without interception:"
tests/tests_general.c
@@ -25,6 +25,13 @@ void check_correct_fd(int fd) {
25
EXPECT(!a);
26
}
27
28
+void setup() {
29
+ FILE *f = fopen("/tmp/b", "w");
30
+ EXPECT(f);
31
+ fprintf(f, "b");
32
+ fclose(f);
33
+}
34
+
35
int do_open(const char *filename) {
36
return open(filename, O_RDONLY);
37
@@ -40,6 +47,8 @@ int do_openat2(const char *filename) {
40
47
41
48
int main(int argc, char *argv[])
42
49
{
50
+ setup();
51
43
52
const char filename[] = "/tmp/a";
44
53
int f = -1;
45
54
0 commit comments