Apache HTTPD
Classes | Macros | Functions | Variables
testfileinfo.c File Reference
#include "apr_file_io.h"
#include "apr_file_info.h"
#include "apr_strings.h"
#include "apr_errno.h"
#include "apr_general.h"
#include "apr_poll.h"
#include "apr_lib.h"
#include "testutil.h"

Go to the source code of this file.

Classes

struct  view_fileinfo
 

Macros

#define FILENAME   "data/file_datafile.txt"
 
#define NEWFILENAME   "data/new_datafile.txt"
 
#define NEWFILEDATA   "This is new text in a new file."
 

Functions

static void finfo_equal (abts_case *tc, apr_finfo_t *f1, apr_finfo_t *f2)
 
static void test_info_get (abts_case *tc, void *data)
 
static void test_stat (abts_case *tc, void *data)
 
static void test_stat_eq_finfo (abts_case *tc, void *data)
 
static void test_buffered_write_size (abts_case *tc, void *data)
 
static void test_mtime_set (abts_case *tc, void *data)
 
abts_suitetestfileinfo (abts_suite *suite)
 

Variables

static const struct view_fileinfo vfi []
 

Macro Definition Documentation

◆ FILENAME

#define FILENAME   "data/file_datafile.txt"

Definition at line 26 of file testfileinfo.c.

◆ NEWFILEDATA

#define NEWFILEDATA   "This is new text in a new file."

Definition at line 28 of file testfileinfo.c.

◆ NEWFILENAME

#define NEWFILENAME   "data/new_datafile.txt"

Definition at line 27 of file testfileinfo.c.

Function Documentation

◆ finfo_equal()

static void finfo_equal ( abts_case tc,
apr_finfo_t f1,
apr_finfo_t f2 
)
static

< Type

< Size of the file

< Access Time

< Modification Time

< Creation or inode-changed time

< ->name in proper case

< User

< Group

< Inode

< Device

< Number of links

< Storage size consumed by the file

< all protections

Definition at line 51 of file testfileinfo.c.

◆ test_buffered_write_size()

static void test_buffered_write_size ( abts_case tc,
void *  data 
)
static

< Open the file for reading

< Open the file for writing

< Create the file if not there

< Open the file and truncate to 0 length

< Open the file for buffered I/O

< Delete the file after close

< use OS's default permissions

<

Deprecated:
See also
APR_FPROT_OS_DEFAULT

< Size of the file

Definition at line 174 of file testfileinfo.c.

◆ test_info_get()

static void test_info_get ( abts_case tc,
void *  data 
)
static

< Open the file for reading

< use OS's default permissions

<

Deprecated:
See also
APR_FPROT_OS_DEFAULT

< an atomic unix apr_stat()

Definition at line 106 of file testfileinfo.c.

◆ test_mtime_set()

static void test_mtime_set ( abts_case tc,
void *  data 
)
static

< Open the file for reading

< Open the file for writing

< Create the file if not there

< Open the file and truncate to 0 length

< Open the file for buffered I/O

< Delete the file after close

< use OS's default permissions

<

Deprecated:
See also
APR_FPROT_OS_DEFAULT

< Modification Time

< Modification Time

Definition at line 204 of file testfileinfo.c.

◆ test_stat()

static void test_stat ( abts_case tc,
void *  data 
)
static

< an atomic unix apr_stat()

Definition at line 131 of file testfileinfo.c.

◆ test_stat_eq_finfo()

static void test_stat_eq_finfo ( abts_case tc,
void *  data 
)
static

< Open the file for reading

< use OS's default permissions

<

Deprecated:
See also
APR_FPROT_OS_DEFAULT

< an atomic unix apr_stat()

< an atomic unix apr_stat()

Definition at line 151 of file testfileinfo.c.

◆ testfileinfo()

abts_suite * testfileinfo ( abts_suite suite)

Definition at line 251 of file testfileinfo.c.

Variable Documentation

◆ vfi

const struct view_fileinfo vfi[]
static
Initial value:
= {
{ 0x00000010 , "MTIME"},
{ 0x00000020 , "CTIME"},
{ 0x00000040 , "ATIME"},
{ 0x00000100 , "SIZE"},
{ 0x00001000 , "DEV"},
{ 0x00002000 , "INODE"},
{ 0x00004000 , "NLINK"},
{ 0x00008000 , "TYPE"},
{ 0x00010000 , "USER"},
{ 0x00020000 , "GROUP"},
{ 0x00100000 , "UPROT"},
{ 0x00200000 , "GPROT"},
{ 0x00400000 , "WPROT"},
{0, NULL}
}
return NULL
Definition mod_so.c:359