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

From:
Mark Jamsek <mark@jamsek.com>
Subject:
Re: got-build-regress.sh regress failure
To:
Omar Polo <op@omarpolo.com>
Cc:
stsp@stsp.name, gameoftrees@openbsd.org
Date:
Fri, 21 Apr 2023 21:01:43 +1000

Download raw body.

Thread
On 23-04-21 12:40PM, Omar Polo wrote:
> : ===> regress/tog
> : ==== log ====
> : ./log.sh -q -r "/home/chiaki/tmp/"
> : tog: standard input is not a tty
> : diff: /home/chiaki/tmp/tog-test-log_hsplit_diff-6oaPkUmX/view: No such file or directory
> : test failed; leaving test data in /home/chiaki/tmp/tog-test-log_hsplit_diff-6oaPkUmX
> : tog: standard input is not a tty
> 
> I missed that now if ran from cron it dies because stdin is not a
> tty.  ok?

Ah, I forgot about that check! Yes, ok for me. Thanks, op :)

> diff /home/op/w/gotacl
> commit - 906c73f69f5ab088561e8f1378c27d852a022e37
> path + /home/op/w/gotacl
> blob - ce6df683d22ae7ee7dcf845076a046795faad31d
> file + tog/tog.c
> --- tog/tog.c
> +++ tog/tog.c
> @@ -9805,7 +9805,8 @@ main(int argc, char *argv[])
>  			fprintf(stderr, "%s: %s\n", getprogname(), error->msg);
>  			return 1;
>  		}
> -	}
> +	} else if (!isatty(STDIN_FILENO))
> +		errx(1, "standard input is not a tty");
>  
>  #if !defined(PROFILE)
>  	if (pledge("stdio rpath wpath cpath flock proc tty exec sendfd unveil",
> @@ -9813,9 +9814,6 @@ main(int argc, char *argv[])
>  		err(1, "pledge");
>  #endif
>  
> -	if (!isatty(STDIN_FILENO))
> -		errx(1, "standard input is not a tty");
> -
>  	while ((ch = getopt_long(argc, argv, "+hV", longopts, NULL)) != -1) {
>  		switch (ch) {
>  		case 'h':
> 

-- 
Mark Jamsek <fnc.bsdbox.org|got.bsdbox.org>
GPG: F2FF 13DE 6A06 C471 CA80  E6E2 2930 DC66 86EE CF68