Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 May 2026 18:37:21 -0700
From:      Enji Cooper <yaneurabeya@gmail.com>
To:        dev-commits-src-main@freebsd.org
Subject:   =?US-ASCII?Q?Re=3A_git=3A_3e845b109056_-_main_-_ping=3A_fix_li?= =?US-ASCII?Q?sting_test_cases_when_scapy_is_not_installed?=
Message-ID:  <B005BA25-DF72-4555-B498-35CE8EBEFCE2@gmail.com>
In-Reply-To: <865x55yfe7.fsf@ltc.des.dev>
References:  <69f61649.1c022.73b2a773@gitrepo.freebsd.org> <afYXOsKk5jouvCZ2@cell.glebi.us> <865x55yfe7.fsf@ltc.des.dev>

index | next in thread | previous in thread | raw e-mail



On May 2, 2026 8:56:00 AM PDT, "Dag-Erling Smørgrav" <des@FreeBSD.org> wrote:
>Gleb Smirnoff <glebius@freebsd.org> writes:
>> I don't think Kyua expects a test program to be able to list the test
>> cases, but then fail to run them.
>
>Yes it does.  We have literally hundreds of cases like that.  See
>require.* in atf-test-case(4) for more information.
>
>DES

+1 to what asomers and des said.
If a test fails when listing testcases with a nonzero exit code or if no tests are listed when requested, the list operation will be marked broken by kyua.

If you really want to go this route with pure pytest, pytest.importorskip is the best way to go (generally) as it doesn't completely hide the import issue, but skips one or more testcases or tests suites at whichever level failed to import the targeted module. I don't know if this route would work through with our mutant ATF/pytest integration though; making module-level skipping work would require making pytest a first class citizen like pure ATF, TAP, googletest, etc test suites are today [1].

Cheers,
-Enji

1. Doing this isn't hard; it's just tedious and there's already a fairly large delta between what's in freebsd :main vs kyua :master (it boils down to me not having the time to resolve some issues with atf :master since stuff is so tightly coupled in earlier versions. I untangled it in later versions, but the latest release of atf still has "memory leaks" which need resolving.. I might just throw the problem at Claude and see if it comes up with any reasonable suggestions...



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B005BA25-DF72-4555-B498-35CE8EBEFCE2>