CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
|
A program for testing the Cloud Digital Interface (CDI), also known as CDI SDK. This file contains the definitions of the functions used for the cdi_test program. More...
#include "cdi_test.h"
#include <assert.h>
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include "configuration.h"
#include "cdi_logger_api.h"
#include "cdi_os_api.h"
#include "curses.h"
#include "optarg.h"
#include "run_test.h"
#include "test_common.h"
#include "test_console.h"
Functions | |
static void | InitializeGlobalTestSettings (void) |
static void | SignalHandler (int signal_number, siginfo_t *siginfo_ptr, void *context_ptr) |
static bool | SetupSignalHandlers (void) |
static void | FreeAppLoggerResources (void) |
Free logging resources used by this test application. | |
static bool | CreateStringFromArray (const char *array_of_strings_ptr[], int num_entries, const char *separator_str, char *concat_str, int concat_max_len) |
GlobalTestSettings * | GetGlobalTestSettings (void) |
int | main (int argc, const char **argv) |
Variables | |
CdiLoggerHandle | test_app_logger_handle = NULL |
Handle to log for test. | |
static TestSettings | test_settings [CDI_MAX_SIMULTANEOUS_CONNECTIONS] = {{ 0 }} |
An array of TestSettings objects used to store settings from the command line for each requested connection. | |
static GlobalTestSettings | global_test_settings = { 0 } |
A global structure used to hold the information global to all test settings. | |
static CdiCsID | signal_handler_lock = NULL |
Critical section to lock access to the signal handler. | |
A program for testing the Cloud Digital Interface (CDI), also known as CDI SDK. This file contains the definitions of the functions used for the cdi_test program.
This test program allows users to test every aspect of the API and provides reference code for those starting out with SDK integration.
Command line options allow users to configure tests that verify sending user-specified blocks of data over multiple payloads at various frame rates from one EC2 instance to another within AWS. Test options can specify the type of pattern to use for the payload, the data type to send (Raw, AVM) as well as any configuration data needed by the chosen data type. Other options control test flow, such as logging, timeouts, distribution of payload transmission, and CPU core assignments.
Users can enable numerous unique connections simultaneously using the –new_conn (-X) option to delineate between command line options for one connections and command line options for another connection.
Each connection can be run as a receive (Rx) instance or transmit (Tx) instance.
Additionally, the SDK provides three adapter types for testing, although only the EFA adapter type is available for production applications. The socket adapter types can be used for development and debug. Command line options allow the test to be run in any of the adapter modes.
See CDI Test for block diagrams and a discussion of program flow.
|
static |
Concatenate an array of strings into a single string buffer with a user-supplied separator between each element.
array_of_strings_ptr | Pointer to the input array of strings. |
num_entries | The number of strings in the array. |
separator_str | The separator string, such as " " or ", ". |
concat_str | Pointer to the concatenation string buffer. |
concat_max_len | The maximum size of the write buffer for the concatenation string. |
GlobalTestSettings * GetGlobalTestSettings | ( | void | ) |
Return the pointer to the global test settings structure.
|
static |
Initialize global test settings.
int main | ( | int | argc, |
const char ** | argv ) |
C main entry function.
argc | Number of command line arguments. |
argv | Pointer to array of pointers to command line arguments |
|
static |
Setup signal handlers so we can catch segfaults, aborts (asserts) and Ctrl+C interrupts. This allows our application to perform some minimal cleanup (ie. flush log files) before exiting.
|
static |
Signal handler for catching segfaults and other signals that cause abnormal program termination.
signal_number | The number of the signal that was raised. |
siginfo_ptr | A pointer to the siginfo_t structure. Valid only in Linux. |
context_ptr | A pointer to the context used in sigaction. Valid only in Linux. |