PX4 Firmware
PX4 Autopilot Software http://px4.io
|
File write test. More...
#include <px4_platform_common/defines.h>
#include <sys/stat.h>
#include <dirent.h>
#include <stdio.h>
#include <stddef.h>
#include <unistd.h>
#include <fcntl.h>
#include <perf/perf_counter.h>
#include <string.h>
#include <stdlib.h>
#include <px4_platform_common/getopt.h>
#include "tests_main.h"
Go to the source code of this file.
Macros | |
#define | FLAG_FSYNC 1 |
#define | FLAG_LSEEK 2 |
#define | LOG_PATH PX4_STORAGEDIR |
Functions | |
static uint8_t | get_value (uint32_t ofs) |
static int | test_corruption (const char *filename, uint32_t write_chunk, uint32_t write_size, uint16_t flags) |
static void | usage (void) |
int | test_file2 (int argc, char *argv[]) |
File write test.
Definition in file test_file2.c.
#define FLAG_FSYNC 1 |
Definition at line 53 of file test_file2.c.
Referenced by test_corruption(), and test_file2().
#define FLAG_LSEEK 2 |
Definition at line 54 of file test_file2.c.
Referenced by test_corruption(), and test_file2().
#define LOG_PATH PX4_STORAGEDIR |
Definition at line 56 of file test_file2.c.
Referenced by test_file2().
|
static |
Definition at line 61 of file test_file2.c.
Referenced by test_corruption().
|
static |
Definition at line 71 of file test_file2.c.
References counter, fd, FLAG_FSYNC, FLAG_LSEEK, get_value(), read(), and write().
Referenced by test_file2().
int test_file2 | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 173 of file test_file2.c.
References FLAG_FSYNC, FLAG_LSEEK, LOG_PATH, test_corruption(), and usage().
|
static |
Definition at line 163 of file test_file2.c.
Referenced by test_file2().