Content-Type: multipart/mixed; boundary="===============8833270187845634817==" MIME-Version: 1.0 From: ramesh.thomas at intel.com Subject: [Accel-config] [PATCH 4/5] accel-config/test: Skip tests if device is not configurable Date: Mon, 05 Apr 2021 23:34:10 -0400 Message-ID: <20210406033411.464362-5-ramesh.thomas@intel.com> In-Reply-To: 20210406033411.464362-1-ramesh.thomas@intel.com To: accel-config@lists.01.org List-ID: --===============8833270187845634817== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Ramesh Thomas None of the tests can be run if the devices are not configurable so skip. Signed-off-by: Ramesh Thomas --- test/libaccfg.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/libaccfg.c b/test/libaccfg.c index 0257ddb..951985d 100644 --- a/test/libaccfg.c +++ b/test/libaccfg.c @@ -1116,7 +1116,7 @@ int test_libaccfg(int loglevel, struct accfg_test *te= st, = /* * iterate to check the state of each device, skip entire test if any of - * them is active + * them is active or not configurable */ accfg_device_foreach(ctx, device) { if (accfg_device_is_active(device)) { @@ -1134,6 +1134,12 @@ int test_libaccfg(int loglevel, struct accfg_test *t= est, fprintf(stderr, "device has no pasid support, skipping tests\n"); return EXIT_SKIP; } + + if (!accfg_device_get_configurable(device)) { + accfg_test_skip(test); + fprintf(stderr, "device is not configuratble, skipping tests\n"); + return EXIT_SKIP; + } } = for (i =3D 0; i < ARRAY_SIZE(test_cases); i++) { -- = 2.26.3 --===============8833270187845634817==--