netatalk: testhelper.h File Reference

netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
testhelper.h File Reference

Go to the source code of this file.

## Macros
#define | FAIL(a)
#define | FAILEXIT(a, label)
#define | STATIC
#define | ENTER_TESTSET
#define | ENTER_TEST
#define | T_CONN2 1
#define | T_PATH 2
#define | T_AFP3 3
#define | T_AFP3_CONN2 4
#define | T_UNIX_PREV 6
#define | T_UTF8 7
#define | T_VOL2 8
#define | T_VOL_SMALL 10
#define | T_ID 11
#define | T_AFP2 12
#define | T_MAC 13
#define | T_ACL 14
#define | T_EA 15
#define | T_UNIX_GROUP 16
#define | T_ADEA 17
#define | T_NOSYML 18
#define | T_ADV2 19
#define | T_AFP30 20
#define | T_NO_UNIX_PREV 21
#define | T_SINGLE 22
#define | T_VOL_BIG 23
#define | T_MANUAL 25
#define | T_AFP31 26
#define | T_AFP32 27
#define | T_NONDETERM 28
#define | T_CRED 30
#define | T_LOCALHOST 31
#define | T_V2CONV 32
#define | T_EXTMAP 33
#define | ANSI_RED "\033[0;31m"
#define | ANSI_GREEN "\033[0;32m"
#define | ANSI_YELLOW "\033[0;33m"
#define | ANSI_BLUE "\033[0;34m"
#define | ANSI_MAGENTA "\033[0;35m"
#define | ANSI_CYAN "\033[0;36m"
#define | ANSI_GREY "\033[0;37m"
#define | ANSI_DARKGREY "\033[01;30m"
#define | ANSI_BRED "\033[01;31m"
#define | ANSI_BGREEN "\033[01;32m"
#define | ANSI_BYELLOW "\033[01;33m"
#define | ANSI_BBLUE "\033[01;34m"
#define | ANSI_BMAGENTA "\033[01;35m"
#define | ANSI_BCYAN "\033[01;36m"
#define | ANSI_WHITE "\033[01;37m"
#define | ANSI_NORMAL "\033[0m"
#define | ANSI_BOLD "\033[1m"
#define | test_failed()

## Enumerations
enum | ad_format { AD_EA = 1 , AD_V2 = 2 }

## Functions
void | test_failed_at (const char *file, int line)
void | test_skipped (int why)
void | test_nottested (void)
void | enter_test (void)
void | exit_test (char *name)

## Variables
uint16_t | VolID
int | Mac
int | ExitCode
enum ad_format | adouble
char | Data []
char | FailedTests [1024][256]
char | NotTestedTests [1024][256]
char | SkippedTests [1024][256]
char * | Vol
char * | Vol2
char * | Path
char * | User
char * | Test
char * | Server
int | Version
int | Verbose
int | Quiet
int | Locking
int | Loglevel
int | Color
int | Interactive
int | Throttle
int | EmptyVol
int | PassCount
int | FailCount
int | SkipCount
int | NotTestedCount

## Macro Definition Documentation

## ◆ ANSI_BBLUE

#define ANSI_BBLUE "\033[01;34m"

## ◆ ANSI_BCYAN

#define ANSI_BCYAN "\033[01;36m"

## ◆ ANSI_BGREEN

#define ANSI_BGREEN "\033[01;32m"

## ◆ ANSI_BLUE

#define ANSI_BLUE "\033[0;34m"

## ◆ ANSI_BMAGENTA

#define ANSI_BMAGENTA "\033[01;35m"

## ◆ ANSI_BOLD

#define ANSI_BOLD "\033[1m"

## ◆ ANSI_BRED

#define ANSI_BRED "\033[01;31m"

## ◆ ANSI_BYELLOW

#define ANSI_BYELLOW "\033[01;33m"

## ◆ ANSI_CYAN

#define ANSI_CYAN "\033[0;36m"

## ◆ ANSI_DARKGREY

#define ANSI_DARKGREY "\033[01;30m"

## ◆ ANSI_GREEN

#define ANSI_GREEN "\033[0;32m"

## ◆ ANSI_GREY

#define ANSI_GREY "\033[0;37m"

## ◆ ANSI_MAGENTA

#define ANSI_MAGENTA "\033[0;35m"

## ◆ ANSI_NORMAL

#define ANSI_NORMAL "\033[0m"

## ◆ ANSI_RED

#define ANSI_RED "\033[0;31m"

## ◆ ANSI_WHITE

#define ANSI_WHITE "\033[01;37m"

## ◆ ANSI_YELLOW

#define ANSI_YELLOW "\033[0;33m"

## ◆ ENTER_TEST

#define ENTER_TEST

Value:
if (!Quiet) { \
fprintf(stdout, "############## entering %s ##############\n", __func__); \
} \
enter_test(); \
Quiet
int Quiet
Definition afpclient.c:11

## ◆ ENTER_TESTSET

#define ENTER_TESTSET

Value:
fprintf(stdout,"===================\n"); \
fprintf(stdout,"Executing testset: %s\n", __func__); \

## ◆ FAIL

#define FAIL | ( |  | a | ) |

Value:
if ((a)) { \
if (!Quiet) { \
if (Color) { \
fprintf(stdout, ANSI_BRED"[%s:%d] " #a "\n" ANSI_NORMAL, __FILE__, __LINE__);\
} else {\
fprintf(stdout, "[%s:%d] " #a "\n", __FILE__, __LINE__); \
} \
} \
test_failed(); \
}
Color
int Color
Definition afpclient.c:13
ANSI_NORMAL
#define ANSI_NORMAL
Definition testhelper.h:90
ANSI_BRED
#define ANSI_BRED
Definition testhelper.h:83

## ◆ FAILEXIT

#define FAILEXIT | ( |  | a,
|  |  | label )

Value:
if ((a)) { test_failed(); goto label;}
test_failed
#define test_failed()
Definition testhelper.h:101

## ◆ STATIC

#define STATIC

## ◆ T_ACL

#define T_ACL 14

## ◆ T_ADEA

#define T_ADEA 17

## ◆ T_ADV2

#define T_ADV2 19

## ◆ T_AFP2

#define T_AFP2 12

## ◆ T_AFP3

#define T_AFP3 3

## ◆ T_AFP30

#define T_AFP30 20

## ◆ T_AFP31

#define T_AFP31 26

## ◆ T_AFP32

#define T_AFP32 27

## ◆ T_AFP3_CONN2

#define T_AFP3_CONN2 4

## ◆ T_CONN2

#define T_CONN2 1

## ◆ T_CRED

#define T_CRED 30

## ◆ T_EA

#define T_EA 15

## ◆ T_EXTMAP

#define T_EXTMAP 33

## ◆ T_ID

#define T_ID 11

## ◆ T_LOCALHOST

#define T_LOCALHOST 31

## ◆ T_MAC

#define T_MAC 13

## ◆ T_MANUAL

#define T_MANUAL 25

## ◆ T_NO_UNIX_PREV

#define T_NO_UNIX_PREV 21

## ◆ T_NONDETERM

#define T_NONDETERM 28

## ◆ T_NOSYML

#define T_NOSYML 18

## ◆ T_PATH

#define T_PATH 2

## ◆ T_SINGLE

#define T_SINGLE 22

## ◆ T_UNIX_GROUP

#define T_UNIX_GROUP 16

## ◆ T_UNIX_PREV

#define T_UNIX_PREV 6

## ◆ T_UTF8

#define T_UTF8 7

## ◆ T_V2CONV

#define T_V2CONV 32

## ◆ T_VOL2

#define T_VOL2 8

## ◆ T_VOL_BIG

#define T_VOL_BIG 23

## ◆ T_VOL_SMALL

#define T_VOL_SMALL 10

## ◆ test_failed

#define test_failed | ( |  | ) |

Value:
test_failed_at(__FILE__, __LINE__)
test_failed_at
void test_failed_at(const char *file, int line)
Definition testhelper.c:153

## Enumeration Type Documentation

## ◆ ad_format

enum ad_format

Enumerator
AD_EA |
AD_V2 |

## Function Documentation

## ◆ enter_test()

void enter_test | ( | void |  | ) |
| extern

## ◆ exit_test()

void exit_test | ( | char * | name | ) |
| extern

## ◆ test_failed_at()

void test_failed_at | ( | const char * | file,
|  | int | line )
| extern

## ◆ test_nottested()

void test_nottested | ( | void |  | ) |
| extern

## ◆ test_skipped()

void test_skipped | ( | int | why | ) |
| extern

## Variable Documentation

## ◆ adouble

enum ad_format adouble
| extern

## ◆ Color

int Color
| extern

## ◆ Data

char Data[]
| extern

## ◆ EmptyVol

int EmptyVol
| extern

## ◆ ExitCode

int ExitCode
| extern

## ◆ FailCount

int FailCount
| extern

## ◆ FailedTests

char FailedTests[1024][256]
| extern

## ◆ Interactive

int Interactive
| extern

## ◆ Locking

int Locking
| extern

## ◆ Loglevel

int Loglevel
| extern

## ◆ Mac

int Mac
| extern

## ◆ NotTestedCount

int NotTestedCount
| extern

## ◆ NotTestedTests

char NotTestedTests[1024][256]
| extern

## ◆ PassCount

int PassCount
| extern

## ◆ Path

char* Path
| extern

## ◆ Quiet

int Quiet
| extern

## ◆ Server

char* Server
| extern

## ◆ SkipCount

int SkipCount
| extern

## ◆ SkippedTests

char SkippedTests[1024][256]
| extern

## ◆ Test

char* Test
| extern

## ◆ Throttle

int Throttle
| extern

## ◆ User

char* User
| extern

## ◆ Verbose

int Verbose
| extern

## ◆ Version

int Version
| extern

## ◆ Vol

char* Vol
| extern

## ◆ Vol2

char* Vol2
| extern

## ◆ VolID

uint16_t VolID
| extern