From nobody Tue Mar 5 14:06:06 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 4Tpy641n12z5Cldl for ; Tue, 5 Mar 2024 14:06:20 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tpy636WH7z4v92 for ; Tue, 5 Mar 2024 14:06:19 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ot1-f52.google.com with SMTP id 46e09a7af769-6e4e952467fso947577a34.2 for ; Tue, 05 Mar 2024 06:06:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709647578; x=1710252378; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Uuc0JLyECrMtQjrCBTQzC7TCi04291YrRdN9LIY9wPQ=; b=Hhnd3AxdFPTXjibKTv2O/ETWnp9nH30yJMeDAyMKKR2zKCdIKhslq37Z/C6siad0bi vmlZMQl2Qey5aiSvmICwzYnPIOn5F/DXhBrNcjqWZAbfj6L9ABNu8+SjwFxHCz0HSZ8g TsNoAZj0+KKxmC5+4LTtN5queBa69oQ0JD1P0SAZJWaaPL8gubcNmKIlOgkqqfo2EX6l QTiJxJ7ZC80njg4916T+iqGIw003Q2Q2NsXz/37Abh2GQLbT98d43ydup7kHj9g3y5RM LVY73gc0Mwy0ZxKmL3nrYDpilP1riXvqJA+7XgM/bFulFo1sM+XaHONaMi8aAnBm7xxh igqw== X-Gm-Message-State: AOJu0YyzY5ZRcpg1TNvHFrecylf/2DOo5mY0X3K2Vgi42EMYW7c6e3XM lXqDr2ItmMURkrBNsp+Kk2/39dgtaT/y3LwAoemJAPVekbORrXpHqiu1yAu6Bc3sSA9+AuLvDlX 3xdJBggKvf+Ej7FH7iVMzAH9/yJU= X-Google-Smtp-Source: AGHT+IE4PI48bXG+DYZCOezxxVGIXO4lu9/2vqKnPpRVeWivkgU+/Rpor0aGnrv1dZ5NLnL4e0YAjH88MmRoWPGWqk4= X-Received: by 2002:a05:6808:200d:b0:3c1:d903:fd40 with SMTP id q13-20020a056808200d00b003c1d903fd40mr2343599oiw.55.1709647578561; Tue, 05 Mar 2024 06:06:18 -0800 (PST) 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 References: In-Reply-To: From: Alan Somers Date: Tue, 5 Mar 2024 07:06:06 -0700 Message-ID: Subject: Re: Running tests for a single program in src/bin, src/usr.bin, etc To: henrichhartzer@tuta.io Cc: Freebsd Stable Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4Tpy636WH7z4v92 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 bette= r? > > 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 updat= ed 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 `mak= e test` (or equivalent) without some combination of `make install` + kyua o= ut of /usr/tests? Seems like for self-contained tests, simple testing shoul= d be possible. > > I did find `make check`, but I'm having issues with checkdir sticking aro= und. > > 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