bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make test errata (part 3)


From: Martin D Kealey
Subject: Re: make test errata (part 3)
Date: Thu, 2 Jan 2025 12:06:47 +1000

tests/run-all goes to some trouble to unset and/or unexport SHELLOPTS, but
it ignores BASHOPTS, which seems equally problematic.

This can be demonstrated by running « env
BASHOPTS=dotglob:extglob:gnu_errfmt:lastpipe:login_shell:nocaseglob:nocasematch:nullglob:shift_verbose:compat31
make tests »
(I tests this on commit 49c2670226b045746d66765b23af37c1c7ba5597)

(see first two parts for background)

On Sun, 15 Dec 2024 at 00:35, Martin D Kealey <martin@kurahaupo.gen.nz>
wrote:

> I've patched Bash to merge “shopt” and “set -o”, and now ...
>

Just to be clear, my new "options" module handles:
(1) getting and setting option values on behalf of “set”, “shopt”, and
unwinding “local -”;
(2) updating BASHOPTS and SHELLOPTS when option values change;
(3) setting options based on what's in BASHOPTS and SHELLOPTS;
(4) resetting options to their default values when restarting or
reinitialising the shell.

In order to get (2) and (3) to both work cleanly, I've slightly re-ordered
the initialisation, so that reading settings from BASHOPTS and SHELLOPTS
occurs before anything else can affect the settings. This means that « bash
+o foo » would override « BASHOPTS=foo » but that seems more like a bug-fix
than a bug.

Do you see any downsides to this approach?

-Martin


reply via email to

[Prev in Thread] Current Thread [Next in Thread]