Rename the flock test case to posix_flock
This commit is contained in:
parent
b44390b883
commit
91f025f1c8
@ -20,7 +20,7 @@ TEST_DEPS := client data_sink naughty_child
|
|||||||
# Tests: need to be compiled and run by test-% target
|
# Tests: need to be compiled and run by test-% target
|
||||||
TESTS ?= env empty hello_world malloc mmap file fs_perms getpid spawn sched pipe time timerfd \
|
TESTS ?= env empty hello_world malloc mmap file fs_perms getpid spawn sched pipe time timerfd \
|
||||||
truncate readdir mkdir open stat link symlink chmod chown tls pthread system_info rlimit \
|
truncate readdir mkdir open stat link symlink chmod chown tls pthread system_info rlimit \
|
||||||
server server_epoll unix_socket cout hostfs cpuid rdtsc device sleep exit_group flock \
|
server server_epoll unix_socket cout hostfs cpuid rdtsc device sleep exit_group posix_flock \
|
||||||
ioctl fcntl eventfd emulate_syscall access signal sysinfo prctl rename procfs wait \
|
ioctl fcntl eventfd emulate_syscall access signal sysinfo prctl rename procfs wait \
|
||||||
spawn_attribute exec statfs random umask pgrp vfork mount
|
spawn_attribute exec statfs random umask pgrp vfork mount
|
||||||
# Benchmarks: need to be compiled and run by bench-% target
|
# Benchmarks: need to be compiled and run by bench-% target
|
||||||
|
@ -14,14 +14,14 @@
|
|||||||
|
|
||||||
const char **g_argv;
|
const char **g_argv;
|
||||||
int g_argc;
|
int g_argc;
|
||||||
const char *g_file_path = "/root/test_flock_file.txt";
|
const char *g_file_path = "/root/test_posix_flock_file.txt";
|
||||||
int g_fd;
|
int g_fd;
|
||||||
off_t g_file_len = 128;
|
off_t g_file_len = 128;
|
||||||
|
|
||||||
// Expected child arguments
|
// Expected child arguments
|
||||||
const int child_argc = 2;
|
const int child_argc = 2;
|
||||||
const char *child_argv[3] = {
|
const char *child_argv[3] = {
|
||||||
"flock",
|
"posix_flock",
|
||||||
"child",
|
"child",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
@ -86,7 +86,7 @@ static int test_setlk() {
|
|||||||
static int test_spawn_child_and_unlock() {
|
static int test_spawn_child_and_unlock() {
|
||||||
int status, child_pid;
|
int status, child_pid;
|
||||||
int ret = posix_spawn(&child_pid,
|
int ret = posix_spawn(&child_pid,
|
||||||
"/bin/flock", NULL, NULL,
|
"/bin/posix_flock", NULL, NULL,
|
||||||
(char *const *)child_argv,
|
(char *const *)child_argv,
|
||||||
NULL);
|
NULL);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
Loading…
Reference in New Issue
Block a user