File: private_data-common.h

package info (click to toggle)
rpma 1.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,040 kB
  • sloc: ansic: 27,313; sh: 1,805; perl: 1,148; makefile: 8
file content (35 lines) | stat: -rw-r--r-- 877 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* SPDX-License-Identifier: BSD-3-Clause */
/* Copyright 2020, Intel Corporation */
/* Copyright 2021, Fujitsu */

/*
 * private_data-common.h -- the private_data unit tests common functions
 */

#ifndef PRIVATE_DATA_COMMON
#define PRIVATE_DATA_COMMON

#include <rdma/rdma_cma.h>
#include <stdlib.h>
#include <string.h>

#include "cmocka_headers.h"
#include "private_data.h"
#include "librpma.h"
#include "test-common.h"

/*
 * Both RDMA_CM_EVENT_CONNECT_REQUEST and RDMA_CM_EVENT_ESTABLISHED are valid.
 * After the event type check, the behavior should not differ.
 */
#define CM_EVENT_VALID	RDMA_CM_EVENT_CONNECT_REQUEST

#define DEFAULT_VALUE	"The default one"
#define DEFAULT_LEN	(strlen(DEFAULT_VALUE) + 1)

int setup__cm_event(void **edata_ptr);

int setup__private_data(void **pdata_ptr);
int teardown__private_data(void **pdata_ptr);

#endif /* PRIVATE_DATA_COMMON */