[PATCH v3] kselftest: kvm/arm64: Skip tests if we can't create a vgic-v3

Mark Brown broonie at kernel.org
Wed Jan 26 12:13:18 PST 2022


On Wed, Jan 26, 2022 at 01:03:44PM -0700, Shuah Khan wrote:
> On 1/26/22 12:52 PM, Mark Brown wrote:

> > If the function fails for any reason other than the system not
> > supporting vgic-v3 it will abort rather than return.

> Hmm. vgic_v3_setup() return gic_fd looks like and the interface says
> Return: GIC file-descriptor or negative error code upon failure

Yes, but in reality the only return other than a valid file descriptor
is just -1 rather than a useful error code.

> I don't follow the abort part.

All the TEST_ASSERTS() in the code (including those in the functions
called) are calls to test_assert() in assert.c which if the test
asserted isn't true will print some diagnostics and call exit(), the
general idiom is to give up immediately on error.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220126/56ad478e/attachment-0001.sig>


More information about the linux-arm-kernel mailing list