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

t0005-signals.sh fails with ksh

From
Eevgeny <illumsoft.org@gmail.com>
Date
May 8, 2015, 20:15 UTC
Message-ID
<31108626.20150508231514@gmail.com>
Hi,
Test t0005-signals.sh fails when I run 'make test' under ksh (on Solaris and on Linux)
$ ksh t0005-signals.sh -v
Initialized empty Git repository in /home/test/git/t/trash directory.t0005-signals/.git/
expecting success: 
        { test-sigchain >actual; ret=$?; } &&
        case "$ret" in
        143) true ;; # POSIX w/ SIGTERM=15
        271) true ;; # ksh w/ SIGTERM=15
          3) true ;; # Windows
          *) false ;;
        esac &&
        test_cmp expect actual

t0005-signals.sh[499]: eval: line 4: 23622: Terminated ok 1 - sigchain works

expecting success: 
        # we use exec here to avoid any sub-shell interpretation
        # of the exit code
        git config alias.sigterm "!exec test-sigchain" &&
        test_expect_code 143 git sigterm

three two one error: exec test-sigchain died of signal 15 ok 2 - signals are propagated using shell convention

expecting success: 
        test-genrandom foo 16384 >file &&
        git add file
ok 3 - create blob
expecting success: 
        OUT=$( ((large_git; echo $? 1>&3) | :) 3>&1 ) &&
        test "$OUT" -eq 141

t0005-signals.sh[499]: eval: syntax error at line 4: `(' unmatched Memory fault

I rather think there are two issues:
1. two adjacent parentheses
2. numeric constant (141) should be 269 for ksh, like there are two different 
constants in the test 'test-sigchain' in this file (in t0005-signals.sh)
'man ksh' reads:
  (list)
    Execute  list  in  a  separate environment.
    Note, that if two adjacent open parentheses are needed for nesting,
    a space must be inserted to avoid evaluation as an arithmetic command as
    described above.
-- 
Best regards,
 evgeny
Next: Junio C Hamano
Message 1 of 11 in “t0005-signals.sh fails with ksh”
  1. evgenyMay 8, 2015
  2. Junio C HamanoMay 8, 2015
  3. Jeff KingMay 8, 2015
  4. Jeff KingMay 8, 2015
  5. Junio C HamanoMay 8, 2015
  6. evgenyMay 8, 2015
  7. Andreas SchwabMay 9, 2015
  8. Junio C HamanoMay 8, 2015
  9. Jeff KingMay 8, 2015
  10. brian m. carlsonMay 9, 2015
  11. evgenyMay 8, 2015

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.