#include <kunit/static_stub.h>
#include <kunit/test.h>
#include <kunit/test-bug.h>
#include "xe_device.h"
#include "xe_kunit_helpers.h"
#include "xe_pci_test.h"
#define TEST_RID …
#define TEST_VFID …
#define TEST_LEN …
#define TEST_ACTION …
#define TEST_DATA(n) …
static int replacement_relay_get_totalvfs(struct xe_guc_relay *relay)
{ … }
static int relay_test_init(struct kunit *test)
{ … }
static const u32 TEST_MSG[TEST_LEN] = …;
static int replacement_xe_guc_ct_send_recv_always_fails(struct xe_guc_ct *ct,
const u32 *msg, u32 len,
u32 *response_buffer)
{ … }
static int replacement_xe_guc_ct_send_recv_expects_pf2guc_relay(struct xe_guc_ct *ct,
const u32 *msg, u32 len,
u32 *response_buffer)
{ … }
static const u32 test_guc2pf[GUC2PF_RELAY_FROM_VF_EVENT_MSG_MAX_LEN] = …;
static const u32 test_guc2vf[GUC2VF_RELAY_FROM_PF_EVENT_MSG_MAX_LEN] = …;
static void pf_rejects_guc2pf_too_short(struct kunit *test)
{ … }
static void pf_rejects_guc2pf_too_long(struct kunit *test)
{ … }
static void pf_rejects_guc2pf_no_payload(struct kunit *test)
{ … }
static void pf_fails_no_payload(struct kunit *test)
{ … }
static void pf_fails_bad_origin(struct kunit *test)
{ … }
static void pf_fails_bad_type(struct kunit *test)
{ … }
static void pf_txn_reports_error(struct kunit *test)
{ … }
static void pf_txn_sends_pf2guc(struct kunit *test)
{ … }
static void pf_sends_pf2guc(struct kunit *test)
{ … }
static int replacement_xe_guc_ct_send_recv_loopback_relay(struct xe_guc_ct *ct,
const u32 *msg, u32 len,
u32 *response_buffer)
{ … }
static void test_requires_relay_testloop(struct kunit *test)
{ … }
static void pf_loopback_nop(struct kunit *test)
{ … }
static void pf_loopback_echo(struct kunit *test)
{ … }
static void pf_loopback_fail(struct kunit *test)
{ … }
static void pf_loopback_busy(struct kunit *test)
{ … }
static void pf_loopback_retry(struct kunit *test)
{ … }
static struct kunit_case pf_relay_test_cases[] = …;
static struct kunit_suite pf_relay_suite = …;
static void vf_rejects_guc2vf_too_short(struct kunit *test)
{ … }
static void vf_rejects_guc2vf_too_long(struct kunit *test)
{ … }
static void vf_rejects_guc2vf_no_payload(struct kunit *test)
{ … }
static struct kunit_case vf_relay_test_cases[] = …;
static struct kunit_suite vf_relay_suite = …;
static void xe_drops_guc2pf_if_not_ready(struct kunit *test)
{ … }
static void xe_drops_guc2vf_if_not_ready(struct kunit *test)
{ … }
static void xe_rejects_send_if_not_ready(struct kunit *test)
{ … }
static struct kunit_case no_relay_test_cases[] = …;
static struct kunit_suite no_relay_suite = …;
kunit_test_suites(…);