|
Motr
M0
|
#include <sys/ioctl.h>#include <sys/stat.h>#include <fcntl.h>#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include "lib/uuid.h"#include "motr/init.h"#include "module/instance.h"#include "lib/arith.h"#include "lib/errno.h"#include "lib/memory.h"#include "net/lnet/lnet_core_types.h"#include "net/lnet/lnet_ioctl.h"#include "net/lnet/ut/lnet_drv_ut.h"
Go to the source code of this file.
Macros | |
| #define | LUT_PO2_SHIFT(n) |
| #define | LUT_ALLOC_PTR(ptr) |
| #define | LUT_FREE_PTR(ptr) lut_mem_free((ptr), sizeof ((ptr)[0]), LUT_PO2_SHIFT(sizeof ((ptr)[0]))) |
| #define | UT_LNET_INVALID |
Enumerations | |
| enum | { MAX_PROC_TRIES = 120, PROC_DELAY_SEC = 2, FAIL_UID_GID = 99, UT_TM_UPVT = 0xdeadbeaf } |
Functions | |
| static void * | lut_mem_alloc (size_t size, unsigned shift) |
| static void | lut_mem_free (void *data, size_t size, unsigned shift) |
| int | test_dev_exists (void) |
| int | test_open_close (void) |
| int | test_read_write (void) |
| int | test_invalid_ioctls (void) |
| int | test_dom_init (void) |
| int | test_tms (bool force_cleanup) |
| int | test_duptm (void) |
| int | main (int argc, char *argv[]) |
Variables | |
| const char | lnet_xprt_dev [] = "/dev/" M0_LNET_DEV |
| const char | lnet_ut_proc [] = "/proc/" UT_PROC_NAME |
| #define LUT_ALLOC_PTR | ( | ptr | ) |
Definition at line 60 of file lut_main.c.
| #define LUT_FREE_PTR | ( | ptr | ) | lut_mem_free((ptr), sizeof ((ptr)[0]), LUT_PO2_SHIFT(sizeof ((ptr)[0]))) |
Definition at line 63 of file lut_main.c.
| #define LUT_PO2_SHIFT | ( | n | ) |
Round up a number n to the next power of 2, min 1<<3, works for n <= 1<<9. If n is a power of 2, returns n. Requires a constant input, allowing compile-time computation.
Definition at line 56 of file lut_main.c.
| #define UT_LNET_INVALID |
Definition at line 146 of file lut_main.c.
| anonymous enum |
| Enumerator | |
|---|---|
| MAX_PROC_TRIES | |
| PROC_DELAY_SEC | |
| FAIL_UID_GID | |
| UT_TM_UPVT | |
Definition at line 44 of file lut_main.c.
|
static |
|
static |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
| int test_dev_exists | ( | void | ) |
| int test_dom_init | ( | void | ) |
Definition at line 184 of file lut_main.c.


| int test_duptm | ( | void | ) |
| int test_invalid_ioctls | ( | void | ) |
| int test_open_close | ( | void | ) |
| int test_read_write | ( | void | ) |
| int test_tms | ( | bool | force_cleanup | ) |
| const char lnet_ut_proc[] = "/proc/" UT_PROC_NAME |
Definition at line 42 of file lut_main.c.
| const char lnet_xprt_dev[] = "/dev/" M0_LNET_DEV |
Definition at line 41 of file lut_main.c.