Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
test_pipe_fail.c File Reference
#include <ztest.h>
#include <ztest_error_hook.h>

Macros

#define TIMEOUT   K_MSEC(100)
 
#define PIPE_LEN   8
 

Functions

static void put_fail (struct k_pipe *p)
 
void test_pipe_put_fail (void)
 Test pipe put failure scenario. More...
 
void test_pipe_user_put_fail (void)
 Test pipe put by a user thread. More...
 
static void get_fail (struct k_pipe *p)
 
void test_pipe_get_fail (void)
 Test pipe get failure scenario. More...
 
void test_pipe_user_get_fail (void)
 Test pipe get by a user thread. More...
 
void test_pipe_alloc_not_init (void)
 Test k_pipe_alloc_init() failure scenario. More...
 
void test_pipe_get_null (void)
 Test k_pipe_get() failure scenario. More...
 
void test_pipe_get_unreach_data (void)
 Test k_pipe_get() failure scenario. More...
 
void test_pipe_get_unreach_size (void)
 Test k_pipe_get() failure scenario. More...
 
void test_pipe_put_null (void)
 Test k_pipe_put() failure scenario. More...
 
void test_pipe_put_unreach_data (void)
 Test k_pipe_put() failure scenario. More...
 
void test_pipe_put_unreach_size (void)
 Test k_pipe_put() failure scenario. More...
 
void test_pipe_read_avail_null (void)
 Test k_pipe_read_avail() failure scenario. More...
 
void test_pipe_write_avail_null (void)
 Test k_pipe_write_avail() failure scenario. More...
 

Variables

static ZTEST_DMEM unsigned char data [] = "abcd1234"
 
struct k_pipe put_get_pipe
 
static unsigned char user_unreach [8]
 
static size_t unreach_byte
 

Macro Definition Documentation

◆ PIPE_LEN

#define PIPE_LEN   8

◆ TIMEOUT

#define TIMEOUT   K_MSEC(100)

Function Documentation

◆ get_fail()

static void get_fail ( struct k_pipe p)
static

TESTPOINT: pipe put returns -EIO

TESTPOINT: pipe put returns -EAGAIN

◆ put_fail()

static void put_fail ( struct k_pipe p)
static

TESTPOINT: pipe put returns -EIO

TESTPOINT: pipe put returns -EAGAIN

Variable Documentation

◆ data

ZTEST_DMEM unsigned char data[] = "abcd1234"
static

◆ put_get_pipe

struct k_pipe put_get_pipe

◆ unreach_byte

size_t unreach_byte
static

◆ user_unreach

unsigned char user_unreach[8]
static