#include "vfer_api.h"
#include "vsl_util.h"
#include "vsl_api.h"
#include "vfer_tests.h"
Go to the source code of this file.
Defines | |
#define | READWRITE(NR) |
#define | SETMARK(SOCK) |
#define | TESTSIZE 63*1024 |
Enumerations | |
enum | status { READ, WROTE } |
Functions | |
int | main (int argc, char **argv) |
Definition in file vsl_test_ssh.c.
#define READWRITE | ( | NR | ) |
Value:
do { \ /* Handle read */ \ if ( s ## NR ## _stat == WROTE ) { \ ASSERT( vsl_selecttest(&sock ## NR) == VSL_READABLE || \ vsl_selecttest(&sock ## NR) == 0); \ if ( vsl_selecttest(&sock ## NR) == VSL_READABLE ) { \ ASSERT( vsl_recv(&sock ## NR, buf2, buflen) == buflen ); \ ASSERT( memcmp(buf, buf2, buflen) == 0 ); \ } \ s ## NR ## _stat = READ; \ num_read++; \ } \ /* Handle write */ \ else if ( s ## NR ## _stat == READ ) { \ ASSERT( vsl_selecttest(&sock ## NR) == VSL_WRITABLE || \ vsl_selecttest(&sock ## NR) == 0); \ if ( vsl_selecttest(&sock ## NR) == VSL_WRITABLE ) { \ ASSERT( vsl_send(&sock ## NR, buf, buflen) == buflen ); \ } \ s ## NR ## _stat = WROTE; \ num_written++; \ } \ } while(0)
#define SETMARK | ( | SOCK | ) |
Value:
do { \ if ( s ## SOCK ## _stat == WROTE ) \ ASSERT( vsl_selectmark(&sock ## SOCK, VSL_READABLE | VSL_EXCEPTION) == 0 ); \ else \ ASSERT( vsl_selectmark(&sock ## SOCK, VSL_WRITABLE | VSL_EXCEPTION) == 0 ); \ } while(0)
#define TESTSIZE 63*1024 |
Definition at line 29 of file vsl_test_ssh.c.
enum status |
int main | ( | int | argc, | |
char ** | argv | |||
) |
main
Definition at line 34 of file vsl_test_ssh.c.