Re: The Case for Rust (in the base system)

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Sun, 21 Jan 2024 17:13:57 UTC
--------
Alan Somers writes:

> > Why would such a test-tool live in src rather than ports ?
>
> I initially considered putting it in ports just for that reason.  But
> it's too tightly coupled to src.  The tests need to change with every
> feature addition or bug fix to src.

I know exactly where you come from there:  I had that exact
problem in Varnish too.

My solution was to separate the "test-running tool" from the
"test-case description", by writing the latter in a DSL interpreted
by the former.

One very big advantage was the almost total elimination of
"boiler-plate" in the test-case descriptions.

You can see a typical "complex" test-case here:

	https://github.com/varnishcache/varnish-cache/blob/master/bin/varnishtest/tests/c00016.vtc

But there are so many other advantages that I could talk about this
for hours, but we can do that in private email if you are interested :-)

I'm not saying that the exact same idea can be used to test FUSE,
but IMO you should /really/ try to find a solution along those
lines.

So yes, I feel your plight, but it does not convince me that we need
to pay the huge cost of Rust in src.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.