Download raw body.
implement gotwebd test harness
Stefan Sperling <stsp@stsp.name> wrote: > On Sun, Nov 24, 2024 at 04:52:18PM +1100, Mark Jamsek wrote: > > The below diff implements a test harness for gotwebd. I've tried to keep > > the test case interface consistent with the rest of our regress suite > > and think I've succeeded for the most part. stsp convinced me on IRC to > > keep the expected content in stable files and keep the markup, both of > > which I think are good ideas. > > > > I haven't written any documentation yet as I wanted to share it first, > > but, like gotd, it needs to be invoked with privileges though it drops > > to the GOTWEBD_TEST_USER (by default the doas user) where possible. > > > > To test it out, make sure you have a gotwebd binary on your path, > > and run `doas make webd-regress` from the root of your got work tree. > > > > Please review the shell bits in particular, much of the setup was lifted > > from gotd regress so should be good. And thanks to a misc@ post, I also > > realised last night that I could lift a bunch of code from base, which > > I'm much happier with than the initial implementation I wrote from the > > fastcgi spec! > > Ok by me, thanks so much! Please put it in. We can keep tweaking it. Thanks, stsp :) The below diff adds brief documentation to the README; it's purposely absent details for now. commit 8e85ff473f3ef0bd0cefb7798c85a2057b0fcef5 (main) from: Mark Jamsek <mark@jamsek.dev> date: Sun Nov 24 14:06:01 2024 UTC briefly document gotwebd test suite M README | 8+ 0- 1 file changed, 8 insertions(+), 0 deletions(-) commit - 73675c3a673715141c3872d1f25eafaffb1ac0a5 commit + 8e85ff473f3ef0bd0cefb7798c85a2057b0fcef5 blob - 9fa9da2f52a64f4adec86019d5f5a9d8b35cb2af blob + cb7d93f3202d086416078b5275bce08a29a9b2c4 --- README +++ README @@ -125,7 +125,15 @@ Documentation is available in manual pages: $ man -l gotwebd/gotwebd.8 $ man -l gotwebd/gotwebd.conf.5 +The gotwebd test suite must be started as root in order to start and stop +the gotwebd daemon. With the gotwebd binary installed, the test suite can +be run from the top-level directory: +$ doas make webd-regress + +The test suite switches to non-root users as appropriate. + + Got can be built with profiling enabled to debug performance issues. Note that profiled builds cannot make use of pledge(2). Profiling should only be enabled for one program at a time. Otherwise, -- Mark Jamsek <https://bsdbox.org> GPG: F2FF 13DE 6A06 C471 CA80 E6E2 2930 DC66 86EE CF68
implement gotwebd test harness