Skip to content

Commit 9d1f06a

Browse files
TO DELETE: fix tests by changing them
1 parent ee52ba9 commit 9d1f06a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/unit/syscall/src/clone.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <fcntl.h>
66
#include <semaphore.h>
7+
#include <syscall.h>
78
#include <unistd.h>
89

910
constexpr int ARRAY_SIZE = 100;
@@ -60,15 +61,15 @@ TEST(SystemCallTest, TestThreadCloneProducerConsumer) {
6061
}
6162

6263
TEST(SystemCallTest, TestForkParentChild) {
63-
auto pid = fork();
64+
auto pid = syscall(SYS_fork);
6465
EXPECT_GE(pid, 0);
6566
if (pid == 0) {
6667
exit(EXIT_SUCCESS);
6768
}
6869
}
6970

7071
TEST(SystemCallTest, TestThreadCloneProducerConsumerWithStat) {
71-
constexpr const char *PATHNAME = "test_file.txt";
72+
constexpr const char *PATHNAME = "test_clone.txt";
7273
sem = static_cast<sem_t *>(malloc(sizeof(sem_t)));
7374
EXPECT_EQ(sem_init(sem, 0, 0), 0);
7475
FILE *fp = fopen(PATHNAME, "w+");

0 commit comments

Comments
 (0)