"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: got-build-regress.sh regress failure
To:
op@omarpolo.com
Cc:
gameoftrees@openbsd.org
Date:
Mon, 25 Mar 2024 11:21:38 +0100

Download raw body.

Thread
On Fri, Mar 22, 2024 at 12:27:07AM +0100, op@omarpolo.com wrote:
> got-build-regress.sh for branch 'main' on Thu Mar 21 21:12:03 UTC 2024
 
> ==== test_repo_read_denied_group ====
> test_clone_basic_access_denied --- /tmp/gotd-test-clone_basic_access_denied-haofycmSyE/stderr.expected	Fri Mar 22 00:22:37 2024
> +++ /tmp/gotd-test-clone_basic_access_denied-haofycmSyE/stderr	Fri Mar 22 00:22:37 2024
> @@ -1,2 +1,3 @@
>  got-fetch-pack: test-repo: Permission denied
>  got: fetch failed
> +got-fetch-pack: error 118 "test-repo: Permission denied": poll: unexpected end of file
> test failed; leaving test data in /tmp/gotd-test-clone_basic_access_denied-haofycmSyE
> 

The patch below should fix the above test failure.
It seems to me that ignoring this error is harmless since it is just
an artifact of the entire program winding down for exit(2).

ok?

diff /home/stsp/src/got
commit - e8d451cc39fa03a3fd56b95b86c820491d399550
path + /home/stsp/src/got
blob - 857c09bbb3a5d9425176ed93727a912b2242aac6
file + lib/privsep.c
--- lib/privsep.c
+++ lib/privsep.c
@@ -178,8 +178,9 @@ got_privsep_send_error(struct imsgbuf *ibuf, const str
 
 	poll_err = got_poll_fd(ibuf->fd, POLLOUT, INFTIM);
 	if (poll_err) {
-		fprintf(stderr, "%s: error %d \"%s\": poll: %s\n",
-		    getprogname(), err->code, err->msg, poll_err->msg);
+		if (poll_err->code != GOT_ERR_EOF)
+			fprintf(stderr, "%s: error %d \"%s\": poll: %s\n",
+			    getprogname(), err->code, err->msg, poll_err->msg);
 		return;
 	}