git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: [BUG] Git 2.42.0-rc2 t1092.57 script error

From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
Date
Aug 18, 2023, 19:38 UTC
Message-ID
<01a101d9d20b$836f1a30$8a4d4e90$@nexbridge.com>
In-Reply-To
<xmqqedk0uq6r.fsf@gitster.g>
On Friday, August 18, 2023 3:05 PM, Junio C Hamano wrote:
Show 30 quoted lines
><rsbecker@nexbridge.com> writes:
>
>> I'm getting the following error when running t1092.57 in Git
>> 2.42.0-rc2 on NonStop ia64:
>>
>> + ensure_not_expanded status
>> test_region[8]: test: argument expected
>> grep: ensure_full_index: No such file or directory
>> error: last command exited with $?=1
>> not ok 57 - sparse-index is not expanded
>>
>> Any suggestions?
>
>Sorry for not coming up with anything concrete.
>
>"ensure_not_expanded status" should be running as its second step
>
>	test_region ! index ensure_full_index trace2.txt
>
>Which should do this:
>
>    test_region () {
>            local expect_exit=0
>            if test "$1" = "!"
>            then
>                    expect_exit=1
>                    shift
>            fi
>
>            grep -e
'"region_enter".*"category":"'"$1"'","label":"'"$2"\" "$3"
Show 7 quoted lines
>            exitcode=$?
>
>            if test $exitcode != $expect_exit
>            then
>
>
>As "grep" complains that ensure_full_index is not a file, when the command
runs
Show 8 quoted lines
>there the file name is "$3".
>
>So it appears to me that the first
>
>	test "$1" = "!"
>
>is not firing and failing to set expect_exit to 1 and shift the "!"
>out of $@.  Why?  I dunno.  Perhaps your shell has quirks around "local"?
I dunno.

Is this new test code? The local qualified appears to be a bash extension, not available across all shells - from what I can determine. Is it really required here or just fancy?

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 6 in “[BUG] Git 2.42.0-rc2 t1092.57 script error”
  1. rsbecker@nexbridge.comAug 18, 2023
  2. Junio C HamanoAug 18, 2023
  3. rsbecker@nexbridge.comAug 18, 2023
  4. Junio C HamanoAug 18, 2023
  5. rsbecker@nexbridge.comAug 18, 2023
  6. rsbecker@nexbridge.comAug 18, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.