From nobody Wed Mar 13 22:40:42 2024 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tw57w5z59z5DZFx for ; Wed, 13 Mar 2024 22:40:44 +0000 (UTC) (envelope-from henrichhartzer@tuta.io) Received: from w1.tutanota.de (w1.tutanota.de [81.3.6.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.tutanota.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tw57w1N7sz3xD8; Wed, 13 Mar 2024 22:40:44 +0000 (UTC) (envelope-from henrichhartzer@tuta.io) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tuta.io header.s=s1 header.b=LvwdWwN2; dmarc=pass (policy=quarantine) header.from=tuta.io; spf=pass (mx1.freebsd.org: domain of henrichhartzer@tuta.io designates 81.3.6.162 as permitted sender) smtp.mailfrom=henrichhartzer@tuta.io Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w1.tutanota.de (Postfix) with ESMTP id 4B142FBFB32; Wed, 13 Mar 2024 22:40:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1710369642; s=s1; d=tuta.io; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=aXxbxahhZasLLcwQs3KEVQ8hxyU73QWbq8Ts+5Xnh3g=; b=LvwdWwN2LEDUMLLWhIxPSOf8Msl7wNryqSq5p/wvY1zsix4i9BoQYRPqtHvS8j9i ydYWVlA5lLI4WbjfDgokFrz/G8EsZAcu3PMktm16cuB+COeAeLdnuYoLB7VzO48i8HO earz3rPqsWZ4OIKy4HhP8NxYUYAwzrqYmB1eavNEIwSuTt9YVcBmtqC+q8ADMuNCCwk EyZmQLFhR9Y97ZB4r/kjFrcjgXbQhqS8LMRwxwM3WYtJTPLpIZtVcffmWyy8HQ964k1 c3SNlcLk4+0OJ09ldg/czRIoxftnyNgVZvC0eP9zQi9/GxGZO+o3gD7uARzBmjO5WMA qlMd97S2cg== Date: Wed, 13 Mar 2024 23:40:42 +0100 (CET) From: henrichhartzer@tuta.io To: Alan Somers Cc: Freebsd Stable Message-ID: In-Reply-To: References: Subject: Re: Running tests for a single program in src/bin, src/usr.bin, etc List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.07 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.969]; DMARC_POLICY_ALLOW(-0.50)[tuta.io,quarantine]; R_SPF_ALLOW(-0.20)[+ip4:81.3.6.160/28]; R_DKIM_ALLOW(-0.20)[tuta.io:s=s1]; RWL_MAILSPIKE_VERYGOOD(-0.20)[81.3.6.162:from]; MIME_GOOD(-0.10)[text/plain]; ONCE_RECEIVED(0.10)[]; ASN(0.00)[asn:24679, ipnet:81.3.0.0/18, country:DE]; FROM_NO_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[freebsd-stable@freebsd.org]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[tuta.io:+] X-Rspamd-Queue-Id: 4Tw57w1N7sz3xD8 Hi Alan, That worked. Thank you! I do still think it would be nice to be able to run tests in isolation, lik= e `make test`. It seems like ideally you could test the individual binary w= ithout installing it to the system, in case there are issues. -Henrich Mar 5, 2024, 14:06 by asomers@freebsd.org: > On Mon, Mar 4, 2024 at 5:55=E2=80=AFPM wrote: > >> >> Hi everyone, >> >> Not sure if this is the best list for this. Maybe hackers@ would be bett= er? >> >> I wanted to tinker with utilities in /usr/src/bin and /usrsrc/usr.bin. I= noticed that rmdir exits 1 for usage, which is a pet peeve of mine. I upda= ted it to exit 2 and then wanted to alter the tests to ensure it's exiting = 2. >> >> At this point, I'm unsure of how to run tests for this single component.= Is there a way I can be in /usr/src/bin/rmdir and just run a succesful `ma= ke test` (or equivalent) without some combination of `make install` + kyua = out of /usr/tests? Seems like for self-contained tests, simple testing shou= ld be possible. >> >> I did find `make check`, but I'm having issues with checkdir sticking ar= ound. >> >> Thank you! >> >> -Henrich >> > > If you don't like the fact that checkdir disappears, then you'll have > to do "make install". But you don't need to run Kyua on the entire > test suite. You can do it just on a subdir, like this: > > sudo kyua test --kyuafile /usr/tests/bin/rmdir/Kyuafile >