Macros | Functions | Variables
test-fork.c File Reference
#include <unistd.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <string.h>
#include "uv.h"
#include "task.h"
Include dependency graph for test-fork.c:

Go to the source code of this file.

Macros

#define FS_TEST_DIR   1
 
#define FS_TEST_FILE   0
 

Functions

static int _do_fork_fs_events_child (int file_or_dir)
 
static void after_work_cb (uv_work_t *req, int status)
 
static void assert_run_work (uv_loop_t *const loop)
 
static void assert_wait_child (pid_t child_pid)
 
static void assert_watch_file_current_dir (uv_loop_t *const loop, int file_or_dir)
 
static void create_file (const char *name)
 
void fork_signal_to_child_cb (uv_signal_t *handle, int signum)
 
static void fs_event_cb_file_current_dir (uv_fs_event_t *handle, const char *filename, int events, int status)
 
static void run_timer_loop_once (void)
 
static void socket_cb (uv_poll_t *poll, int status, int events)
 
 TEST_IMPL (fork_fs_events_child)
 
 TEST_IMPL (fork_fs_events_child_dir)
 
 TEST_IMPL (fork_fs_events_file_parent_child)
 
 TEST_IMPL (fork_signal_to_child)
 
 TEST_IMPL (fork_signal_to_child_closed)
 
 TEST_IMPL (fork_socketpair)
 
 TEST_IMPL (fork_socketpair_started)
 
 TEST_IMPL (fork_threadpool_queue_work_simple)
 
 TEST_IMPL (fork_timer)
 
static void timer_cb (uv_timer_t *timer)
 
static void timer_cb_touch (uv_timer_t *timer)
 
static void touch_file (const char *name)
 
static void work_cb (uv_work_t *req)
 

Variables

static int after_work_cb_count
 
static int fork_signal_cb_called
 
static int fs_event_cb_called
 
static int socket_cb_called
 
static char socket_cb_read_buf [1024]
 
static int socket_cb_read_fd
 
static int socket_cb_read_size
 
static int timer_cb_called
 
static int timer_cb_touch_called
 
static int work_cb_count
 

Macro Definition Documentation

◆ FS_TEST_DIR

#define FS_TEST_DIR   1

Definition at line 456 of file test-fork.c.

◆ FS_TEST_FILE

#define FS_TEST_FILE   0

Definition at line 455 of file test-fork.c.

Function Documentation

◆ _do_fork_fs_events_child()

static int _do_fork_fs_events_child ( int  file_or_dir)
static

Definition at line 458 of file test-fork.c.

◆ after_work_cb()

static void after_work_cb ( uv_work_t req,
int  status 
)
static

Definition at line 615 of file test-fork.c.

◆ assert_run_work()

static void assert_run_work ( uv_loop_t *const  loop)
static

Definition at line 621 of file test-fork.c.

◆ assert_wait_child()

static void assert_wait_child ( pid_t  child_pid)
static

Definition at line 76 of file test-fork.c.

◆ assert_watch_file_current_dir()

static void assert_watch_file_current_dir ( uv_loop_t *const  loop,
int  file_or_dir 
)
static

Definition at line 414 of file test-fork.c.

◆ create_file()

static void create_file ( const char *  name)
static

Definition at line 350 of file test-fork.c.

◆ fork_signal_to_child_cb()

void fork_signal_to_child_cb ( uv_signal_t handle,
int  signum 
)

Definition at line 222 of file test-fork.c.

◆ fs_event_cb_file_current_dir()

static void fs_event_cb_file_current_dir ( uv_fs_event_t handle,
const char *  filename,
int  events,
int  status 
)
static

Definition at line 398 of file test-fork.c.

◆ run_timer_loop_once()

static void run_timer_loop_once ( void  )
static

Definition at line 61 of file test-fork.c.

◆ socket_cb()

static void socket_cb ( uv_poll_t poll,
int  status,
int  events 
)
static

Definition at line 47 of file test-fork.c.

◆ TEST_IMPL() [1/9]

TEST_IMPL ( fork_fs_events_child  )

Definition at line 509 of file test-fork.c.

◆ TEST_IMPL() [2/9]

TEST_IMPL ( fork_fs_events_child_dir  )

Definition at line 517 of file test-fork.c.

◆ TEST_IMPL() [3/9]

TEST_IMPL ( fork_fs_events_file_parent_child  )

Definition at line 533 of file test-fork.c.

◆ TEST_IMPL() [4/9]

TEST_IMPL ( fork_signal_to_child  )

Definition at line 229 of file test-fork.c.

◆ TEST_IMPL() [5/9]

TEST_IMPL ( fork_signal_to_child_closed  )

Definition at line 277 of file test-fork.c.

◆ TEST_IMPL() [6/9]

TEST_IMPL ( fork_socketpair  )

Definition at line 119 of file test-fork.c.

◆ TEST_IMPL() [7/9]

TEST_IMPL ( fork_socketpair_started  )

Definition at line 156 of file test-fork.c.

◆ TEST_IMPL() [8/9]

TEST_IMPL ( fork_threadpool_queue_work_simple  )

Definition at line 643 of file test-fork.c.

◆ TEST_IMPL() [9/9]

TEST_IMPL ( fork_timer  )

Definition at line 92 of file test-fork.c.

◆ timer_cb()

static void timer_cb ( uv_timer_t timer)
static

Definition at line 36 of file test-fork.c.

◆ timer_cb_touch()

static void timer_cb_touch ( uv_timer_t timer)
static

Definition at line 389 of file test-fork.c.

◆ touch_file()

static void touch_file ( const char *  name)
static

Definition at line 365 of file test-fork.c.

◆ work_cb()

static void work_cb ( uv_work_t req)
static

Definition at line 610 of file test-fork.c.

Variable Documentation

◆ after_work_cb_count

int after_work_cb_count
static

Definition at line 607 of file test-fork.c.

◆ fork_signal_cb_called

int fork_signal_cb_called
static

Definition at line 220 of file test-fork.c.

◆ fs_event_cb_called

int fs_event_cb_called
static

Definition at line 396 of file test-fork.c.

◆ socket_cb_called

int socket_cb_called
static

Definition at line 34 of file test-fork.c.

◆ socket_cb_read_buf

char socket_cb_read_buf[1024]
static

Definition at line 44 of file test-fork.c.

◆ socket_cb_read_fd

int socket_cb_read_fd
static

Definition at line 42 of file test-fork.c.

◆ socket_cb_read_size

int socket_cb_read_size
static

Definition at line 43 of file test-fork.c.

◆ timer_cb_called

int timer_cb_called
static

Definition at line 33 of file test-fork.c.

◆ timer_cb_touch_called

int timer_cb_touch_called
static

Definition at line 387 of file test-fork.c.

◆ work_cb_count

int work_cb_count
static

Definition at line 606 of file test-fork.c.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:33