From patchwork Tue Feb 13 15:44:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 772538 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA84D5DF3E; Tue, 13 Feb 2024 15:44:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707839059; cv=none; b=AIxQcayzKXvQx02R0/F4akwrL57ViIf4iE1aVoEjTHzK8O6RR7YVGpPiRX2RCOjWZSQ9B8RgAi9nlmNanUnxYE0z/vlYlVGCDp9SlWZ0cCtIJX9iKhWyFLOz0CxriUdPsbaTF1OpJg/m52LoLBUEFkwONRj7bny8gQ66KQicWBw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707839059; c=relaxed/simple; bh=A4stWhVYZw83iY951xolcCHwnpmC0wLzkKsYX7l+EgU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Cqt+qiyWcsAA1ekCczgAKeUOjXHBoxPhHxfiVNCaLfB+Wth78QV2CkUvuDu+1TdzSmpJJn/8L7dH5sZvrOVHe56DsEGrWRxHUEOVLoeJYzYz5nIXkvP0EByHLE0AEiHeD/RKXfS4amuJKflGJpamglkEq6ofgwcuvRrebHg5fKI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pHYIjHv5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pHYIjHv5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47AC4C433B2; Tue, 13 Feb 2024 15:44:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707839059; bh=A4stWhVYZw83iY951xolcCHwnpmC0wLzkKsYX7l+EgU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pHYIjHv5yYJjOSKCB8TbQ30wTTvdbat9SCuyaqHEU78BQYJq8iC6r6w3tYD1npxEU BxS0ddfBJRVe0095ZG1EEpDKlhYzF3nzF3DgzHxjX7pOZgAD499mQauT737ozyI4Y5 zcKBhoK+kCQAljKeLS69jftXJ5DSWUTL9zaWs05SbCwtNRc7xzJ2p+PpKwkuFYNEVX HOIrxz90XBEbYijO6hRI9VlFc6iL2gVC4sPbmV6NQhKFRfGHzCKG840lpVmcDLYft8 7cNcMwttGlXbEDGDLsI9RYYD2aj0MNsfq7A8z0yDXOVOBEQFEQb+KY9t9S8onxBlYZ wgffBoZjhTRYw== From: Jakub Kicinski To: shuah@kernel.org, keescook@chromium.org Cc: linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, jakub@cloudflare.com, Jakub Kicinski Subject: [PATCH net-next 1/4] selftests: kselftest_harness: pass step via shared memory Date: Tue, 13 Feb 2024 07:44:13 -0800 Message-ID: <20240213154416.422739-2-kuba@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240213154416.422739-1-kuba@kernel.org> References: <20240213154416.422739-1-kuba@kernel.org> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Commit 0ef67a888375 ("selftests/harness: Report skip reason") added shared memory to communicate between harness and test. Use that instead of exit codes to send the failing step back to the harness. The exit codes are limited and because of the step passing we can't use the full range of KSFT_* exit codes. Signed-off-by: Jakub Kicinski --- tools/testing/selftests/kselftest_harness.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h index e05ac8261046..98bdedf9a53a 100644 --- a/tools/testing/selftests/kselftest_harness.h +++ b/tools/testing/selftests/kselftest_harness.h @@ -101,8 +101,8 @@ * ASSERT_* number for which the test failed. This behavior can be enabled by * writing `_metadata->no_print = true;` before the check sequence that is * unable to print. When an error occur, instead of printing an error message - * and calling `abort(3)`, the test process call `_exit(2)` with the assert - * number as argument, which is then printed by the parent process. + * and calling `abort(3)`, the test process call `_exit(2)` and pass the error + * to be printed to the parent process via shared memory. */ #define TH_LOG(fmt, ...) do { \ if (TH_LOG_ENABLED) \ @@ -695,9 +695,8 @@ __bail(_assert, _metadata)) #define __INC_STEP(_metadata) \ - /* Keep "step" below 255 (which is used for "SKIP" reporting). */ \ - if (_metadata->passed && _metadata->step < 253) \ - _metadata->step++; + if (_metadata->passed) \ + _metadata->results->step++; #define is_signed_type(var) (!!(((__typeof__(var))(-1)) < (__typeof__(var))1)) @@ -784,6 +783,7 @@ struct __test_results { char reason[1024]; /* Reason for test result */ + unsigned int step; /* Test step reached without failure */ }; struct __test_metadata; @@ -837,7 +837,6 @@ struct __test_metadata { int trigger; /* extra handler after the evaluation */ int timeout; /* seconds to wait for test timeout */ bool timed_out; /* did this test timeout instead of exiting? */ - __u8 step; bool no_print; /* manual trigger when TH_LOG_STREAM is not available */ bool aborted; /* stopped test due to failed ASSERT */ bool setup_completed; /* did setup finish? */ @@ -875,7 +874,7 @@ static inline void __test_check_assert(struct __test_metadata *t) { if (t->aborted) { if (t->no_print) - _exit(t->step); + _exit(1); abort(); } } @@ -960,7 +959,7 @@ void __wait_for_test(struct __test_metadata *t) fprintf(TH_LOG_STREAM, "# %s: Test failed at step #%d\n", t->name, - WEXITSTATUS(status)); + t->results->step); } } } else if (WIFSIGNALED(status)) { @@ -1114,9 +1113,9 @@ void __run_test(struct __fixture_metadata *f, t->passed = 1; t->skip = 0; t->trigger = 0; - t->step = 1; t->no_print = 0; memset(t->results->reason, 0, sizeof(t->results->reason)); + t->results->step = 1; ksft_print_msg(" RUN %s%s%s.%s ...\n", f->name, variant->name[0] ? "." : "", variant->name, t->name); @@ -1137,8 +1136,8 @@ void __run_test(struct __fixture_metadata *f, /* Pass is exit 0 */ if (t->passed) _exit(0); - /* Something else happened, report the step. */ - _exit(t->step); + /* Something else happened. */ + _exit(1); } else { __wait_for_test(t); } From patchwork Tue Feb 13 15:44:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 773235 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 507485EE82; Tue, 13 Feb 2024 15:44:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707839060; cv=none; b=XjNls2E2flRdaoFSu2hCls0EUAfpS3do4W4zKKwCH4co7qBM4HoXZzj46bfOT/I6s7owV/7335kIfpCApkXIfok29dzYh8C9SyCyvA0BFQr+byPFk1B9qTgifdEvjUUNOEOH/+foUA/s+s1SIwD0S33cHJ7KTZ9mmSN8wZUX0Js= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707839060; c=relaxed/simple; bh=ni3kaZ33B9N7PvNrBmt3HWRonPw71BUalFJvli7cMmo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IbU16lU9mgFr3MErT8kgXTmeY46EDXwaXJ1U+KZ+5Zt17tNeqyX/fItz05zIVveH/1al0pO2lLyDiX2fzdvk4rbondnZEeeiuUReBCNi++2pEbdNWuvFznpfAW/wGRSyJ8S+fIbvfl1XBjK+zuSqNV0TAXvdrDoXyrDIfivfbZc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Jq9LsccR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Jq9LsccR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAC5DC43330; Tue, 13 Feb 2024 15:44:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707839059; bh=ni3kaZ33B9N7PvNrBmt3HWRonPw71BUalFJvli7cMmo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jq9LsccRvJGCwCR4IWBFVuKngp56ORqhkoLsWQAcka8Tq5LCwg3JyE+/JFUJnA+cZ /D3/LRr3lot176/nNl8aa1Rd+vk4ac2yVYgqLwqyMz2UT/RBo1fRiZ1ZIdNELepoBj aPQQd22Vp/nY8DUsUrdBLbb29D+5Suv+fdS0MCqBOcAg5QU6vzL4amw+6gTu+gAIWQ 9iDy1f7W44D5LZJllewa0cajS5Hz558c/bdse6oLZf6b5NdAo0Xv7Tx4VcePAjvEh8 l5CX7B/kv7WYzOlrRKqrimMIign/JAPbP4ewqDM+NkO8o8PAo2wSbcZ4FWhIb8kT9T 11sSadK3/+9cA== From: Jakub Kicinski To: shuah@kernel.org, keescook@chromium.org Cc: linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, jakub@cloudflare.com, Jakub Kicinski Subject: [PATCH net-next 2/4] selftests: kselftest_harness: use KSFT_* exit codes Date: Tue, 13 Feb 2024 07:44:14 -0800 Message-ID: <20240213154416.422739-3-kuba@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240213154416.422739-1-kuba@kernel.org> References: <20240213154416.422739-1-kuba@kernel.org> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Now that we no longer need low exit codes to communicate assertion steps - use normal KSFT exit codes. Signed-off-by: Jakub Kicinski --- tools/testing/selftests/kselftest_harness.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h index 98bdedf9a53a..618b41eac749 100644 --- a/tools/testing/selftests/kselftest_harness.h +++ b/tools/testing/selftests/kselftest_harness.h @@ -874,7 +874,7 @@ static inline void __test_check_assert(struct __test_metadata *t) { if (t->aborted) { if (t->no_print) - _exit(1); + _exit(KSFT_FAIL); abort(); } } @@ -937,7 +937,7 @@ void __wait_for_test(struct __test_metadata *t) fprintf(TH_LOG_STREAM, "# %s: Test terminated by timeout\n", t->name); } else if (WIFEXITED(status)) { - if (WEXITSTATUS(status) == 255) { + if (WEXITSTATUS(status) == KSFT_SKIP) { /* SKIP */ t->passed = 1; t->skip = 1; @@ -950,7 +950,7 @@ void __wait_for_test(struct __test_metadata *t) } else { switch (WEXITSTATUS(status)) { /* Success */ - case 0: + case KSFT_PASS: t->passed = 1; break; /* Other failure, assume step report. */ @@ -1132,12 +1132,11 @@ void __run_test(struct __fixture_metadata *f, setpgrp(); t->fn(t, variant); if (t->skip) - _exit(255); - /* Pass is exit 0 */ + _exit(KSFT_SKIP); if (t->passed) - _exit(0); + _exit(KSFT_PASS); /* Something else happened. */ - _exit(1); + _exit(KSFT_FAIL); } else { __wait_for_test(t); } From patchwork Tue Feb 13 15:44:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 772537 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8ABCD5EE99; Tue, 13 Feb 2024 15:44:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707839060; cv=none; b=m1g9LwPJ64pVwyRWBqDsFwpGE7vDkBkBT7rw4UkeV/4eBjAT5niGNnPgMafbUDrRaxdq+gS/J8ioo/chc7LBKcKxR3wTOLmPjgN03Xsl3MrMIaCXa5In/GC+QEzG4pyV7hhceuUZXDe9js4tIM50b0IBjZhaSDanmVT+Pi/CANk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707839060; c=relaxed/simple; bh=66lbYemSeo/z/BA8V+4KaUAc3y7UkVFfQzDup/HIMJE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hjB3gDAuFN1wHVHgWvL5pzQ0a3gVMieKRqFt8zaEDhSDD/DWVvwkwZTPE3aCVHIiPWDkFn8nyK+Lhu3/GCKFggMChNgWHp7VvPLrTEWu8K95vqeaGGxJjPXRGrxwN8quEVV/X48u2eLFhNjKd8Dhtuwbrl/MI7dp57V/yoi6//4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HobfjhiS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HobfjhiS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2041EC43142; Tue, 13 Feb 2024 15:44:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707839060; bh=66lbYemSeo/z/BA8V+4KaUAc3y7UkVFfQzDup/HIMJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HobfjhiSo8VKk5y5IdW6aAAbsAQEg5yVBwQ7647ntZ2lQS3/UxNEwRbo7Oco7Kow4 job6poI0rvA+ghR7LU9CqOmAZPKpnV0LUowNHfiGEMV72zW5xfKQd5h/0xSDGbhUUj DzeO3hPy+EWR55EricgzS4BWqUz8VK1Relm8DuE0a3QsLrNV7h40Jn4WqMwA9UHHAT ur4bhu+2nqqrfluXM7J1aSDK+HFB+gzKpZIVR1Lj5n3+qhOXWUSTEKoyE8mpm2xWlT zM37YebpdBJ4um8aZFSeGEK9pF7s77OHNf5w6y/ynjE53xt1RHvxDfcT02XAtH1D8g DkkQ2OuhxQcxQ== From: Jakub Kicinski To: shuah@kernel.org, keescook@chromium.org Cc: linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, jakub@cloudflare.com, Jakub Kicinski Subject: [PATCH net-next 3/4] selftests: kselftest_harness: support using xfail Date: Tue, 13 Feb 2024 07:44:15 -0800 Message-ID: <20240213154416.422739-4-kuba@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240213154416.422739-1-kuba@kernel.org> References: <20240213154416.422739-1-kuba@kernel.org> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Selftest summary includes XFAIL but there's no way to use it from within the harness. Support it in a similar way to skip. Currently tests report skip for things they expect to fail e.g. when given combination of parameters is known to be unsupported. This is confusing because in an ideal environment and fully featured kernel no tests should be skipped. Signed-off-by: Jakub Kicinski --- tools/testing/selftests/kselftest_harness.h | 37 +++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h index 618b41eac749..561a817117f9 100644 --- a/tools/testing/selftests/kselftest_harness.h +++ b/tools/testing/selftests/kselftest_harness.h @@ -141,6 +141,33 @@ statement; \ } while (0) +/** + * XFAIL() + * + * @statement: statement to run after reporting XFAIL + * @fmt: format string + * @...: optional arguments + * + * .. code-block:: c + * + * XFAIL(statement, fmt, ...); + * + * This forces a "pass" after reporting why something is expected to fail, + * and runs "statement", which is usually "return" or "goto skip". + */ +#define XFAIL(statement, fmt, ...) do { \ + snprintf(_metadata->results->reason, \ + sizeof(_metadata->results->reason), fmt, ##__VA_ARGS__); \ + if (TH_LOG_ENABLED) { \ + fprintf(TH_LOG_STREAM, "# XFAIL %s\n", \ + _metadata->results->reason); \ + } \ + _metadata->passed = 1; \ + _metadata->xfail = 1; \ + _metadata->trigger = 0; \ + statement; \ +} while (0) + /** * TEST() - Defines the test function and creates the registration * stub @@ -834,6 +861,7 @@ struct __test_metadata { int termsig; int passed; int skip; /* did SKIP get used? */ + int xfail; /* did XFAIL get used? */ int trigger; /* extra handler after the evaluation */ int timeout; /* seconds to wait for test timeout */ bool timed_out; /* did this test timeout instead of exiting? */ @@ -941,6 +969,9 @@ void __wait_for_test(struct __test_metadata *t) /* SKIP */ t->passed = 1; t->skip = 1; + } else if (WEXITSTATUS(status) == KSFT_XFAIL) { + t->passed = 1; + t->xfail = 1; } else if (t->termsig != -1) { t->passed = 0; fprintf(TH_LOG_STREAM, @@ -1112,6 +1143,7 @@ void __run_test(struct __fixture_metadata *f, /* reset test struct */ t->passed = 1; t->skip = 0; + t->xfail = 0; t->trigger = 0; t->no_print = 0; memset(t->results->reason, 0, sizeof(t->results->reason)); @@ -1133,6 +1165,8 @@ void __run_test(struct __fixture_metadata *f, t->fn(t, variant); if (t->skip) _exit(KSFT_SKIP); + if (t->xfail) + _exit(KSFT_XFAIL); if (t->passed) _exit(KSFT_PASS); /* Something else happened. */ @@ -1146,6 +1180,9 @@ void __run_test(struct __fixture_metadata *f, if (t->skip) ksft_test_result_skip("%s\n", t->results->reason[0] ? t->results->reason : "unknown"); + else if (t->xfail) + ksft_test_result_xfail("%s\n", t->results->reason[0] ? + t->results->reason : "unknown"); else ksft_test_result(t->passed, "%s%s%s.%s\n", f->name, variant->name[0] ? "." : "", variant->name, t->name); From patchwork Tue Feb 13 15:44:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 773234 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F1ED15F494; Tue, 13 Feb 2024 15:44:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707839061; cv=none; b=Z4PZQQnDDfyjVW0LGKt45pozGD+mZ5f9u0hqSmly22YmfBJ32h/dRMjSit6AmqfB1QWbffMUyMROXT5DW+5OEvtoYXL0UOe4JMtaSOHrxEI46vtjHvazW7WkDgwK1F1x9Jxdmru4FMH0Ojr0ExF/6+RY5cG/tp7BpgO+LcnazgU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707839061; c=relaxed/simple; bh=xW5A2I/k9RP8EcmefPFdWvTRd4kQer+/1FTXxQHibCk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lYVYn9jMKdKNv2GudyC8hcsZw3U9DzpWpzbVuBjTuYx+XT5ypbLgc9z4sQYbKBkOZbkGeTY/ebE6c38ijGNhfaa1NBPFgUCk+v0sNO246n85BpJv3uT4cjCF651eNDfeOQruU7CVeDxCH4Q30GYUmBo4D3PgjM1v1v0Gu0BPw/Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=doRIfSNo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="doRIfSNo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84B60C41613; Tue, 13 Feb 2024 15:44:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707839060; bh=xW5A2I/k9RP8EcmefPFdWvTRd4kQer+/1FTXxQHibCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=doRIfSNoAPlXgJeaV9hMpFBAbZJXlFxu+iGQRV3f68fUtQ73DfVhL8NnKlL02ZsXB 3ohYzE/WPqsRgXOIVtCg64ZmQbzTPEWL9oDEji7OkJWzWmr50b66BeoyA4ytln560c XVrEjXxhbPHK1jncPCa/AvSZ1MnJw7qlooW8gy0j/bvBe0jWpP+HdGfke10noS9QIh jQX9yhrTtxq9eLk2iQF2SgtMV4TSoyloqEnIM5f6qGURrk8pK+tBEy6TdorzsLMLdd IL3EQBO01s+IVzEQoIR/tGGRvJC/pqRQwHkp2MNT5DxkJTM3aTaPOyE6d/DffGcuM0 i/uKr+SIWMZ5Q== From: Jakub Kicinski To: shuah@kernel.org, keescook@chromium.org Cc: linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, jakub@cloudflare.com, Jakub Kicinski Subject: [PATCH net-next 4/4] selftests: ip_local_port_range: use XFAIL instead of SKIP Date: Tue, 13 Feb 2024 07:44:16 -0800 Message-ID: <20240213154416.422739-5-kuba@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240213154416.422739-1-kuba@kernel.org> References: <20240213154416.422739-1-kuba@kernel.org> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 SCTP does not support IP_LOCAL_PORT_RANGE and we know it, so use XFAIL instead of SKIP. Signed-off-by: Jakub Kicinski --- tools/testing/selftests/net/ip_local_port_range.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/ip_local_port_range.c b/tools/testing/selftests/net/ip_local_port_range.c index 0f217a1cc837..c1d3f001c240 100644 --- a/tools/testing/selftests/net/ip_local_port_range.c +++ b/tools/testing/selftests/net/ip_local_port_range.c @@ -362,7 +362,7 @@ TEST_F(ip_local_port_range, late_bind) __u16 port; if (variant->so_protocol == IPPROTO_SCTP) - SKIP(return, "SCTP doesn't support IP_BIND_ADDRESS_NO_PORT"); + XFAIL(return, "SCTP doesn't support IP_BIND_ADDRESS_NO_PORT"); fd = socket(variant->so_domain, variant->so_type, 0); ASSERT_GE(fd, 0) TH_LOG("socket failed");