On 27/06/18 00:11, Pádraig Brady wrote: > On 26/06/18 04:15, Assaf Gordon wrote:
>> I believe this is a false-positive. >> The "framework_failure_" is triggered >> when testing an invalid short option on line 37: >> https://opengrok.housegordon.com/source/xref/coreutils/tests/misc/usage_vs_getopt.sh#37 >> >> Programs are tested like so: >> >> chroot -/ >> >> Then "grep" searches for "'/'" in STDERR (i.e. >> single-quote,slash-single-quote). >> >> On this system (OpenBSD 6.2 with C locale), the error message does >> not contain single-quotes and the 'grep' fails. > > Another assumption of getopt implementation. > In your patch it's probably safer to not anchor your RE to $. > I think the following `sed` also needs adjusting. > I'll apply your patch with those tweaks. Actually it would complicate the script to do that for little gain. I've commented accordingly and am working with: - grep -F "'/'" err || framework_failure_ + grep " '*/'*" err || framework_failure_ + # The following only handles the common case that has single quotes. + # as it simplifies to identify missing options only on common systems. sed -n "1s/'\/'/'OPT'/p" < err >> pat || framework_failure_ cheers, Pádraig.
