klee
gen-random-bout.cpp File Reference
#include <assert.h>
#include <fcntl.h>
#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#include "klee/ADT/KTest.h"
Include dependency graph for gen-random-bout.cpp:

Go to the source code of this file.

Macros

#define _FILE_OFFSET_BITS   64
 
#define SMALL_BUFFER_SIZE   64
 
#define MAX_FILE_SIZES   256
 
#define MAX   64
 

Functions

static void error_exit (const char *fmt,...)
 
static unsigned get_unsigned (char *i)
 
static void push_random_obj (KTest *b, const char *name, unsigned non_zero_bytes, unsigned total_bytes)
 
static void push_obj (KTest *b, const char *name, unsigned total_bytes, unsigned char *content)
 
static void push_range (KTest *b, const char *name, unsigned value)
 
void create_stat (size_t size, struct stat *s)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ _FILE_OFFSET_BITS

#define _FILE_OFFSET_BITS   64

Definition at line 10 of file gen-random-bout.cpp.

◆ MAX

#define MAX   64

Definition at line 54 of file gen-random-bout.cpp.

◆ MAX_FILE_SIZES

#define MAX_FILE_SIZES   256

Definition at line 30 of file gen-random-bout.cpp.

◆ SMALL_BUFFER_SIZE

#define SMALL_BUFFER_SIZE   64

Definition at line 27 of file gen-random-bout.cpp.

Function Documentation

◆ create_stat()

void create_stat ( size_t  size,
struct stat *  s 
)

Definition at line 96 of file gen-random-bout.cpp.

References error_exit().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ error_exit()

static void error_exit ( const char *  fmt,
  ... 
)
static

Definition at line 32 of file gen-random-bout.cpp.

Referenced by create_stat(), get_unsigned(), main(), push_obj(), and push_random_obj().

Here is the caller graph for this function:

◆ get_unsigned()

static unsigned get_unsigned ( char *  i)
static

Definition at line 42 of file gen-random-bout.cpp.

References error_exit().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

◆ push_obj()

static void push_obj ( KTest b,
const char *  name,
unsigned  total_bytes,
unsigned char *  content 
)
static

Definition at line 77 of file gen-random-bout.cpp.

References KTestObject::bytes, error_exit(), MAX, KTestObject::name, KTestObject::numBytes, KTest::numObjects, and KTest::objects.

Referenced by main(), and push_range().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ push_random_obj()

static void push_random_obj ( KTest b,
const char *  name,
unsigned  non_zero_bytes,
unsigned  total_bytes 
)
static

Definition at line 55 of file gen-random-bout.cpp.

References KTestObject::bytes, error_exit(), MAX, KTestObject::name, KTestObject::numBytes, KTest::numObjects, and KTest::objects.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ push_range()

static void push_range ( KTest b,
const char *  name,
unsigned  value 
)
static

Definition at line 92 of file gen-random-bout.cpp.

References push_obj().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function: