Greenbone Vulnerability Management Libraries 22.35.6
Functions
pidfile_tests.c File Reference
#include "../util/fileutils.h"
#include "pidfile.c"
#include <cgreen/cgreen.h>
#include <cgreen/mocks.h>
#include <glib.h>
#include <sys/stat.h>
#include <unistd.h>

Functions

 Describe (pidfile)
 
 BeforeEach (pidfile)
 
 AfterEach (pidfile)
 
 Ensure (pidfile, pidfile_create_returns_error_for_null_path)
 
 Ensure (pidfile, pidfile_create_creates_file_with_correct_pid)
 
 Ensure (pidfile, pidfile_create_creates_directory_if_needed)
 
 Ensure (pidfile, pidfile_create_returns_error_when_cannot_create_file)
 
 Ensure (pidfile, pidfile_remove_deletes_file_with_matching_pid)
 
 Ensure (pidfile, pidfile_remove_does_not_delete_file_with_different_pid)
 
 Ensure (pidfile, pidfile_remove_handles_nonexistent_file)
 
int main (int argc, char **argv)
 

Function Documentation

◆ AfterEach()

AfterEach ( pidfile  )

◆ BeforeEach()

BeforeEach ( pidfile  )

◆ Describe()

Describe ( pidfile  )

◆ Ensure() [1/7]

Ensure ( pidfile  ,
pidfile_create_creates_directory_if_needed   
)

◆ Ensure() [2/7]

Ensure ( pidfile  ,
pidfile_create_creates_file_with_correct_pid   
)

◆ Ensure() [3/7]

Ensure ( pidfile  ,
pidfile_create_returns_error_for_null_path   
)

◆ Ensure() [4/7]

Ensure ( pidfile  ,
pidfile_create_returns_error_when_cannot_create_file   
)

◆ Ensure() [5/7]

Ensure ( pidfile  ,
pidfile_remove_deletes_file_with_matching_pid   
)

◆ Ensure() [6/7]

Ensure ( pidfile  ,
pidfile_remove_does_not_delete_file_with_different_pid   
)

◆ Ensure() [7/7]

Ensure ( pidfile  ,
pidfile_remove_handles_nonexistent_file   
)

◆ main()

int main ( int  argc,
char **  argv 
)