A fair bit of setup / teardown code was being duplicated in many test cases in the socketpair testsuite. Take advantage of the `setup()`, `before()`, and `after()` functions in the new ZTest API. Signed-off-by: Christopher Friedt <cfriedt@meta.com>
26 lines
526 B
C
26 lines
526 B
C
/*
|
|
* Copyright (c) 2020 Friedt Professional Engineering Services, Inc
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef TEST_SOCKETPAIR_THREAD_H_
|
|
#define TEST_SOCKETPAIR_THREAD_H_
|
|
|
|
#include <errno.h>
|
|
#include <string.h>
|
|
|
|
#include <zephyr/logging/log.h>
|
|
#include <zephyr/net/socket.h>
|
|
#include <zephyr/posix/fcntl.h>
|
|
#include <zephyr/sys/util.h>
|
|
#include <zephyr/ztest.h>
|
|
|
|
LOG_MODULE_DECLARE(net_test, CONFIG_NET_SOCKETS_LOG_LEVEL);
|
|
|
|
struct net_socketpair_fixture {
|
|
int sv[2];
|
|
};
|
|
|
|
#endif /* TEST_SOCKETPAIR_THREAD_H_ */
|