Date: Mon, 8 Jun 2020 17:22:16 +0200 From: Daniel Ebdrup Jensen <debdrup@FreeBSD.org> To: "freebsd-hackers@freebsd.org" <hackers@freebsd.org> Subject: Re: How to test modification to a userland program (e.g., sed)? Message-ID: <20200608152216.7ihcflq2ixlgjui2@nerd-thinkpad.local> In-Reply-To: <db7e9854-bf55-06bf-d058-909be7318628@FreeBSD.org> References: <db7e9854-bf55-06bf-d058-909be7318628@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--vxpmxgvvuvkknec6 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 08, 2020 at 05:11:55PM +0200, Mateusz Piotrowski wrote: >Hello hackers@, > >What is your preferred way to test local modifications to userland >programs such as sed(1)? > >It feels like the correct way would be to create a jail, enter that >jail, get the modified version of the src tree inside the jail and then >run "make install check" in an appropriate subdirectory within that src >tree (e.g., usr.sbin/sed). > >There must be a simpler way, not involving a jail, right? > >I've tried to experiment with the something along the following sequence >of commands as well but it feels hacky and makes some of the tests fail: > > export DESTDIR=3D/test > SRCTREE=3D/src > make -C $SRCTREE hierarchy > make -C $SRCTREE/usr.bin/sed install > export PATH=3D"$DESTDIR/usr/bin:$PATH" > make -C $SRCTREE/usr.bin/sed check > >Cheers, >Mateusz >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >https://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" Hi Matreusz, I think using ephemeral jails with nullfs mounts for /usr/src and /usr/obj = for=20 this is a perfectly valid way to test, as it gives you a clean environment. The only improvement I can think of is to ensure that your source tree is u= sing=20 metamode [1], so that when you're rebuilding a single application, only the= =20 files you changed are rebuilt between each build. If you're using zfs snapshots and clones, creating the base filesystem for = the=20 ephemeral jail also becomes incredibly quick. Do let us know what you settle on, though - I'm sure there are people other= than=20 me, who would be interested to learn if you're doing anything that we might= =20 learn from. :) Yours, Daniel Ebdrup Jensen [1]: https://wiki.freebsd.org/MetaMode --vxpmxgvvuvkknec6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEEDonNJPbg/JLIMoS6Ps5hSHzN87oFAl7eV6hfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDBF ODlDRDI0RjZFMEZDOTJDODMyODRCQTNFQ0U2MTQ4N0NDREYzQkEACgkQPs5hSHzN 87rZ2Af/e3qW2QafcDeHqTBWveVO6SIwEIVBy1bwYRFvjOtQE4k49lkSa7YzRWkS TDAgpl1iGCZY9BVP0QONU6pqcn07QDMFwPE+Lx2kxQt/nKcfRf8TdyT+HwSjMPji 0pWCPx+WfWD86Pc+GNpspNs1s8PDduSULaV74tGaddvJzCLllsMbaq0xGTIpJxw/ aYdqFYltCqYFV76fEHwvlqwe6fP7cYtx5Qj88APRoJmD80i3Ym4OkSovD9MHx/W8 YKtglYRThaIB8aywWy8XGE9V/ig4t/kaKUMr7oFADJpMVuBDxioSQg5dbHutlrla kbUfkqZO030pvH0clWaiRwI58iZTqQ== =fSJG -----END PGP SIGNATURE----- --vxpmxgvvuvkknec6--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200608152216.7ihcflq2ixlgjui2>