On Thu, Jan 16, 2025 at 11:41:45AM +0900, Kunihiko Hayashi wrote:
There are two variables that indicate the interrupt type to be used
in the next test execution, global "irq_type" and test->irq_type.
The former is referenced from pci_endpoint_test_get_irq() to preserve
the current type for ioctl(PCITEST_GET_IRQTYPE).
In pci_endpoint_test_request_irq(), since this global variable is
referenced when an error occurs, the unintended error message is
displayed.
Apparently this test fails (with an error message) when it shouldn't?
Please include the error message here. >
"... since this global variable is referenced ..." is not quite enough
explanation of how this causes a spurious test failure or under what
circumstances the failure occurs.
And the type set in pci_endpoint_test_set_irq() isn't reflected inprevious
the global "irq_type", so ioctl(PCITEST_GET_IRQTYPE) returns the
type. As a result, the wrong type will be displayed in "pcitest".
The global "irq_type" seems a little suspect. Is it possible to run
multiple tests concurrently? If so, is this usage safe from races?