pacemaker  2.1.9-49aab99839
Scalable High-Availability cluster resource manager
Functions | Variables
mock.c File Reference
#include <crm_internal.h>
#include <errno.h>
#include <pwd.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <setjmp.h>
#include <sys/types.h>
#include <sys/utsname.h>
#include <unistd.h>
#include <grp.h>
#include <cmocka.h>
#include <crm/common/unittest_internal.h>
#include "mock_private.h"
Include dependency graph for mock.c:

Go to the source code of this file.

Functions

_Noreturn void __wrap_abort (void)
 
void * __wrap_calloc (size_t nmemb, size_t size)
 
char * __wrap_getenv (const char *name)
 
void * __wrap_realloc (void *ptr, size_t size)
 
int __wrap_setenv (const char *name, const char *value, int overwrite)
 
int __wrap_unsetenv (const char *name)
 
pid_t __wrap_getpid (void)
 
void __wrap_setgrent (void)
 
struct group * __wrap_getgrent (void)
 
void __wrap_endgrent (void)
 
FILE * __wrap_fopen (const char *pathname, const char *mode)
 
int __wrap_getpwnam_r (const char *name, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result)
 
ssize_t __wrap_readlink (const char *restrict path, char *restrict buf, size_t bufsize)
 
char * __wrap_strdup (const char *s)
 

Variables

bool pcmk__mock_calloc = false
 
bool pcmk__mock_getenv = false
 
bool pcmk__mock_realloc = false
 
bool pcmk__mock_setenv = false
 
bool pcmk__mock_unsetenv = false
 
bool pcmk__mock_getpid = false
 
bool pcmk__mock_grent = false
 
bool pcmk__mock_fopen = false
 
bool pcmk__mock_getpwnam_r = false
 
bool pcmk__mock_readlink = false
 
bool pcmk__mock_strdup = false
 

Function Documentation

◆ __wrap_abort()

_Noreturn void __wrap_abort ( void  )

Definition at line 71 of file mock.c.

◆ __wrap_calloc()

void* __wrap_calloc ( size_t  nmemb,
size_t  size 
)

Definition at line 93 of file mock.c.

◆ __wrap_endgrent()

void __wrap_endgrent ( void  )

Definition at line 297 of file mock.c.

◆ __wrap_fopen()

FILE* __wrap_fopen ( const char *  pathname,
const char *  mode 
)

Definition at line 321 of file mock.c.

◆ __wrap_getenv()

char* __wrap_getenv ( const char *  name)

Definition at line 118 of file mock.c.

◆ __wrap_getgrent()

struct group* __wrap_getgrent ( void  )

Definition at line 285 of file mock.c.

◆ __wrap_getpid()

pid_t __wrap_getpid ( void  )

Definition at line 220 of file mock.c.

◆ __wrap_getpwnam_r()

int __wrap_getpwnam_r ( const char *  name,
struct passwd *  pwd,
char *  buf,
size_t  buflen,
struct passwd **  result 
)

Definition at line 379 of file mock.c.

◆ __wrap_readlink()

ssize_t __wrap_readlink ( const char *restrict  path,
char *restrict  buf,
size_t  bufsize 
)

Definition at line 416 of file mock.c.

◆ __wrap_realloc()

void* __wrap_realloc ( void *  ptr,
size_t  size 
)

Definition at line 142 of file mock.c.

◆ __wrap_setenv()

int __wrap_setenv ( const char *  name,
const char *  value,
int  overwrite 
)

Definition at line 170 of file mock.c.

◆ __wrap_setgrent()

void __wrap_setgrent ( void  )

Definition at line 272 of file mock.c.

◆ __wrap_strdup()

char* __wrap_strdup ( const char *  s)

Definition at line 453 of file mock.c.

◆ __wrap_unsetenv()

int __wrap_unsetenv ( const char *  name)

Definition at line 198 of file mock.c.

Variable Documentation

◆ pcmk__mock_calloc

bool pcmk__mock_calloc = false

Definition at line 90 of file mock.c.

◆ pcmk__mock_fopen

bool pcmk__mock_fopen = false

Definition at line 318 of file mock.c.

◆ pcmk__mock_getenv

bool pcmk__mock_getenv = false

Definition at line 115 of file mock.c.

◆ pcmk__mock_getpid

bool pcmk__mock_getpid = false

Definition at line 217 of file mock.c.

◆ pcmk__mock_getpwnam_r

bool pcmk__mock_getpwnam_r = false

Definition at line 376 of file mock.c.

◆ pcmk__mock_grent

bool pcmk__mock_grent = false

Definition at line 236 of file mock.c.

◆ pcmk__mock_readlink

bool pcmk__mock_readlink = false

Definition at line 413 of file mock.c.

◆ pcmk__mock_realloc

bool pcmk__mock_realloc = false

Definition at line 139 of file mock.c.

◆ pcmk__mock_setenv

bool pcmk__mock_setenv = false

Definition at line 167 of file mock.c.

◆ pcmk__mock_strdup

bool pcmk__mock_strdup = false

Definition at line 450 of file mock.c.

◆ pcmk__mock_unsetenv

bool pcmk__mock_unsetenv = false

Definition at line 195 of file mock.c.