// SPDX-License-Identifier: GPL-2.0+
/*
 * Tests that the PCI Maximum Payload Size (MPS) command can set the sandbox
 * PCI Express device to safe mode and determine the correct payload size.
 *
 * Copyright 2023 Microsoft
 * Written by Stephen Carlson <stcarlso@linux.microsoft.com>
 */

#include <console.h>
#include <test/suites.h>
#include <test/ut.h>

#define PCI_MPS_TEST(_name, _flags) UNIT_TEST(_name, _flags, pci_mps_test)

/* Test "pci_mps" command in safe "s" mode */
static int test_pci_mps_safe(struct unit_test_state *uts)
{
	/* Enumerate PCI Express first */
	ut_assertok(run_command("pci e", 0));
	ut_assert_console_end();

	/* Test pci_mps s */
	ut_assertok(run_command("pci_mps s", 0));
	ut_assert_nextline("Setting MPS of all devices to 256B");
	ut_assert_console_end();

	return 0;
}
PCI_MPS_TEST(test_pci_mps_safe, UTF_CONSOLE);

int do_ut_pci_mps(struct cmd_tbl *cmdtp, int flag, int argc,
		  char * const argv[])
{
	struct unit_test *tests = UNIT_TEST_SUITE_START(pci_mps_test);
	const int n = UNIT_TEST_SUITE_COUNT(pci_mps_test);

	return cmd_ut_category("cmd_pci_mps", "pci_mps_test_", tests, n,
			       argc, argv);
}
