Jeremy Kerr | 3d36ee2 | 2019-05-30 11:15:37 +0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ |
| 2 | |
Jeremy Kerr | 1892511 | 2019-03-13 15:43:08 +0800 | [diff] [blame] | 3 | #ifndef _MCTP_TESTS_TEST_UTILS_H |
| 4 | #define _MCTP_TESTS_TEST_UTILS_H |
| 5 | |
| 6 | #include <libmctp.h> |
| 7 | |
| 8 | /* test binding implementation */ |
| 9 | |
| 10 | /* standard binding interface */ |
| 11 | struct mctp_binding_test *mctp_binding_test_init(void); |
| 12 | void mctp_binding_test_register_bus(struct mctp_binding_test *binding, |
| 13 | struct mctp *mctp, mctp_eid_t eid); |
| 14 | |
| 15 | /* internal test binding interface */ |
| 16 | void mctp_binding_test_rx_raw(struct mctp_binding_test *test, |
| 17 | void *buf, size_t len); |
| 18 | |
| 19 | /* gerneral utility functions */ |
| 20 | |
| 21 | /* create a MCTP stack, and add a test binding, using the specified EID */ |
| 22 | void mctp_test_stack_init(struct mctp **mctp, |
| 23 | struct mctp_binding_test **binding, |
| 24 | mctp_eid_t eid); |
| 25 | |
| 26 | #endif /* _MCTP_TESTS_TEST_UTILS_H */ |