From: Stefan Sperling Subject: Re: gotd crash while requesting non-existent commit id To: Mikhail Cc: gameoftrees@openbsd.org Date: Sun, 4 Dec 2022 13:44:38 +0100 On Sun, Dec 04, 2022 at 03:15:58PM +0300, Mikhail wrote: > On Fri, Nov 04, 2022 at 01:47:43PM +0100, Stefan Sperling wrote: > > On Fri, Nov 04, 2022 at 03:37:12PM +0300, Mikhail wrote: > > > While doing some kind of "manual stress testing" with gotd it crashed > > > for me. Crashes are repeatable. > > > > Thanks, there was a simple coding error. > > Should be fixed by commit 36c7cfbb2a9b646bfb1658fca4e34bc63a46ec42 > > Here is a test case for this bug. > > Can it be useful? Yes, more test cases are always good to have, thanks! A question below: > --- /dev/null > +++ regress/gotd/repo_req_wrong_commit.sh > + # Before 36c7cfbb2a gotd was crashing after invalid commit in "want" > + # line, here we check that we can successfully stop working gotd. > + $GOTD_STOP_CMD > + ret=$? GOTD_STOP_CMD requires root privileges to succeed, but gotd test scripts run as GOTD_TEST_USER. So this command should always fail. If it does not fail then there is a problem. I am wondering if this check could be done in the Makefile instead, where GOTD_STOP_CMD runs as root?