blob: 5b89790d0e4d6c00ca19c81c3233d8fff3a0a5ed [file] [log] [blame]
Andrew Jeffery4fe996c2018-02-27 12:16:48 +10301/* SPDX-License-Identifier: Apache-2.0 */
2/* Copyright (C) 2018 IBM Corp. */
Andrew Jeffery5ab4e3e2017-04-12 14:23:24 +09303
4#ifndef TEST_MBOX_H
5#define TEST_MBOX_H
6
7#include <stddef.h>
8#include <stdint.h>
9
10#include "../common.h"
11#include "../mbox.h"
12
13#include "tmpf.h"
14
15struct mbox_context *mbox_create_test_context(int n_windows, size_t len);
16
17int mbox_set_mtd_data(struct mbox_context *context, const void *data,
18 size_t len);
19
20void mbox_dump(struct mbox_context *context);
21
22int mbox_cmp(struct mbox_context *context, const uint8_t *expected, size_t len);
23
24int mbox_command_write(struct mbox_context *context, const uint8_t *command,
25 size_t len);
26
27int mbox_command_dispatch(struct mbox_context *context, const uint8_t *command,
28 size_t len);
29
30/* Helpers */
Andrew Jefferyee7af882018-03-01 11:57:50 +103031void dump_buf(const void *buf, size_t len);
Andrew Jeffery5ab4e3e2017-04-12 14:23:24 +093032
33#endif /* TEST_MBOX_H */