Menu

#7 gawk-select: outputfd and nonblock tests fail on macOS

v1.0_(example)
closed
nobody
None
1
2024-01-26
2022-01-13
No

On macOS 10.15.7 with Xcode 12.4, gawk-select 1.1.2 encounters these errors when running the tests:

======== Starting select tests ========
kill
inputfd
outputfd
./outputfd.ok _outputfd differ: char 397, line 13
make[1]: [outputfd] Error 1 (ignored)
nonblock
./nonblock.ok _nonblock differ: char 187, line 13
make[1]: [nonblock] Error 1 (ignored)
select
signal
timeout_parse
======== Done with select tests ========
2 TESTS FAILED
make[2]: *** [pass-fail] Error 1
for i in _* ; \
    do  \
        if [ "$i" != "_*" ]; then \
        echo ============== $i ============= ; \
        if [ -r ${i#_}.ok ]; then \
        diff -c ${i#_}.ok $i ; \
        else \
        diff -c ./${i#_}.ok  $i ; \
        fi ; \
        fi ; \
    done | more
============== _nonblock =============
*** nonblock.ok 2015-03-28 09:48:41.000000000 -0500
--- _nonblock   2022-01-13 13:46:11.000000000 -0600
***************
*** 10,14 ****
--- 10,15 ----
  1 would block; pausing...
  2 would block; pausing...
  3 would block; pausing...

+ 4 would block; pausing...
  goodbye
  0
============== _outputfd =============
*** outputfd.ok 2017-12-18 08:02:18.000000000 -0600
--- _outputfd   2022-01-13 13:46:06.000000000 -0600
***************
*** 10,14 ****
  -1
  see how output_fd actually launches the command
  rc 1
! 0
  0
--- 10,14 ----
  -1
  see how output_fd actually launches the command
  rc 1
!        0
  0
make[1]: *** [check] Error 1

Discussion

  • Andrew J. Schorr

    Sorry for the long delay. The first "nonblock" error looks like a weird timing issue. Is the system extremely sluggish?

    The second issue seems to be caused by unexpected output formatting from "wc -l".

    In both cases, I think it's not important, and the extension is in fact working properly.

    Is this still a concern? If so, we can try to fix these nits, but it's probably not important.

    Regards,
    Andy

     
  • Andrew J. Schorr

    • status: open --> closed
     
  • Andrew J. Schorr

    I got access to a MacOS system on the GCC compile farm. I am unable to depulicate the "nonblock" error. As best I can tell, that must have been caused by an extremely sluggish system. Are you able to replicate the problem?

    I patched the "outputfd" test case to use "cksum" instead of "wc -l", since "cksum" seems to have a more consistent output format. Please try gawk-select-1.1.4.

    Regards,
    Andy

     
  • Ryan Carsten Schmidt

    Whether test failures are a concern is up to you! I just wanted to make sure you were aware of them.

    I can't recall whether the system I was using when I reported this initially was sluggish.

    Today I'm on a different Mac running macOS 12.7.2 and with gawk-select 1.1.4 I get some different test failures:

    ======== Starting select tests ========
    kill
    inputfd
    outputfd
    nonblock
    Files ./nonblock.ok and _nonblock differ
    make[1]: [nonblock] Error 1 (ignored)
    select
    Files ./select.ok and _select differ
    make[1]: [select] Error 1 (ignored)
    signal
    Files ./signal.ok and _signal differ
    make[1]: [signal] Error 1 (ignored)
    timeout_parse
    Files ./timeout_parse.ok and _timeout_parse differ
    make[1]: [timeout_parse] Error 1 (ignored)
    ======== Done with select tests ========
    4 TESTS FAILED
    make[2]: *** [pass-fail] Error 1
    for i in _* ; \
        do  \
            if [ "$i" != "_*" ]; then \
            echo ============== $i ============= ; \
            if [ -r ${i#_}.ok ]; then \
            diff -c ${i#_}.ok $i ; \
            else \
            diff -c ./${i#_}.ok  $i ; \
            fi ; \
            fi ; \
        done
    ============== _nonblock =============
    *** nonblock.ok 2023-11-14 10:01:30.000000000 -0600
    --- _nonblock   2024-01-26 10:34:48.000000000 -0600
    ***************
    *** 5,14 ****
      1
    
      With non-blocking I/O
      set_non_blocking 0
      hello
    ! 1 would block; pausing...
    ! 2 would block; pausing...
    ! 3 would block; pausing...
    ! goodbye
    ! 0
    --- 5,12 ----
      1
    
      With non-blocking I/O
    
    + gawk: ./nonblock.awk:22: warning: set_non_blocking: could not install PROCINFO array; unable to configure PROCINFO RETRY for `echo hello; sleep 1; echo goodbye'
      set_non_blocking 0
      hello
    ! -1 1 1
    ! 1
    ============== _select =============
    *** select.ok   2023-11-14 10:01:30.000000000 -0600
    --- _select 2024-01-26 10:34:51.000000000 -0600
    ***************
    *** 1,7 ****
      0 [echo A:msg1; sleep 2; echo A:msg2; echo A:msg3; sleep 2; echo A:msg4] -> A:msg1
    ! 1 [sleep 1; echo B:msg1; echo B:msg2; sleep 2; echo B:msg3] -> B:msg1
    ! 1 [sleep 1; echo B:msg1; echo B:msg2; sleep 2; echo B:msg3] -> B:msg2
    ! 2 [echo A:msg1; sleep 2; echo A:msg2; echo A:msg3; sleep 2; echo A:msg4] -> A:msg2
    ! 2 [echo A:msg1; sleep 2; echo A:msg2; echo A:msg3; sleep 2; echo A:msg4] -> A:msg3
    ! 3 [sleep 1; echo B:msg1; echo B:msg2; sleep 2; echo B:msg3] -> B:msg3
    ! 4 [echo A:msg1; sleep 2; echo A:msg2; echo A:msg3; sleep 2; echo A:msg4] -> A:msg4
    --- 1,10 ----
    + gawk: ./select.awk:8: warning: set_non_blocking: could not install PROCINFO array; unable to configure PROCINFO RETRY for `echo A:msg1; sleep 2; echo A:msg2; echo A:msg3; sleep 2; echo A:msg4'
    + gawk: ./select.awk:8: warning: set_non_blocking: could not install PROCINFO array; unable to configure PROCINFO RETRY for `sleep 1; echo B:msg1; echo B:msg2; sleep 2; echo B:msg3'
      0 [echo A:msg1; sleep 2; echo A:msg2; echo A:msg3; sleep 2; echo A:msg4] -> A:msg1
    ! Error: getline(echo A:msg1; sleep 2; echo A:msg2; echo A:msg3; sleep 2; echo A:msg4) returned -1, errno = Resource temporarily unavailable
    ! Error: close(echo A:msg1; sleep 2; echo A:msg2; echo A:msg3; sleep 2; echo A:msg4) failed with rc 269, ERRNO 
    ! 2 [sleep 1; echo B:msg1; echo B:msg2; sleep 2; echo B:msg3] -> B:msg1
    ! 2 [sleep 1; echo B:msg1; echo B:msg2; sleep 2; echo B:msg3] -> B:msg2
    ! Error: getline(sleep 1; echo B:msg1; echo B:msg2; sleep 2; echo B:msg3) returned -1, errno = Resource temporarily unavailable
    ! Error: close(sleep 1; echo B:msg1; echo B:msg2; sleep 2; echo B:msg3) failed with rc 269, ERRNO 
    ! EXIT CODE: 1
    ============== _signal =============
    *** signal.ok   2023-11-14 10:01:30.000000000 -0600
    --- _signal 2024-01-26 10:34:52.000000000 -0600
    ***************
    *** 1,8 ****
      previous sighup disposition: default
      0 [echo hello; sleep 1; echo midway; sleep 2; echo goodbye] -> hello
    ! 0 kill 0
    ! 0 Caught signal 1 (HUP)
    ! 1 [echo hello; sleep 1; echo midway; sleep 2; echo goodbye] -> midway
    ! 1 kill 0
    ! 1 Caught signal 1 (HUP)
    ! 3 [echo hello; sleep 1; echo midway; sleep 2; echo goodbye] -> goodbye
    --- 1,6 ----
      previous sighup disposition: default
    + gawk: ./signal.awk:11: warning: set_non_blocking: could not install PROCINFO array; unable to configure PROCINFO RETRY for `echo hello; sleep 1; echo midway; sleep 2; echo goodbye'
      0 [echo hello; sleep 1; echo midway; sleep 2; echo goodbye] -> hello
    ! Error: getline(echo hello; sleep 1; echo midway; sleep 2; echo goodbye) returned -1, errno = Resource temporarily unavailable
    ! Error: close(echo hello; sleep 1; echo midway; sleep 2; echo goodbye) failed with rc 269, ERRNO 
    ! EXIT CODE: 1
    ============== _timeout_parse =============
    *** timeout_parse.ok    2023-11-14 10:01:30.000000000 -0600
    --- _timeout_parse  2024-01-26 10:34:56.000000000 -0600
    ***************
    *** 1,16 ****
    
        Testing timeout 2 type number
      0 [echo before sleep; sleep 1; echo after sleep #] -> before sleep
    ! 1 [echo before sleep; sleep 1; echo after sleep #] -> after sleep
    
        Testing timeout 2 type strnum
      0 [echo before sleep; sleep 1; echo after sleep #] -> before sleep
    ! 1 [echo before sleep; sleep 1; echo after sleep #] -> after sleep
    
        Testing timeout 2 type string
      0 [echo before sleep; sleep 1; echo after sleep #] -> before sleep
    ! 1 [echo before sleep; sleep 1; echo after sleep #] -> after sleep
    
        Testing timeout apple type string
      0 [echo before sleep; sleep 1; echo after sleep #] -> before sleep
    ! 1 [echo before sleep; sleep 1; echo after sleep #] -> after sleep
    --- 1,25 ----
    
        Testing timeout 2 type number
    
    + gawk: ./timeout_parse.awk:6: warning: set_non_blocking: could not install PROCINFO array; unable to configure PROCINFO RETRY for `echo before sleep; sleep 1; echo after sleep #'
      0 [echo before sleep; sleep 1; echo after sleep #] -> before sleep
    ! Error: getline(echo before sleep; sleep 1; echo after sleep #) returned -1, errno = Resource temporarily unavailable
    ! Error: close(echo before sleep; sleep 1; echo after sleep #) failed with rc 269, ERRNO 
    
        Testing timeout 2 type strnum
    
    + gawk: ./timeout_parse.awk:6: warning: set_non_blocking: could not install PROCINFO array; unable to configure PROCINFO RETRY for `echo before sleep; sleep 1; echo after sleep #'
      0 [echo before sleep; sleep 1; echo after sleep #] -> before sleep
    ! Error: getline(echo before sleep; sleep 1; echo after sleep #) returned -1, errno = Resource temporarily unavailable
    ! Error: close(echo before sleep; sleep 1; echo after sleep #) failed with rc 269, ERRNO 
    
        Testing timeout 2 type string
    
    + gawk: ./timeout_parse.awk:6: warning: set_non_blocking: could not install PROCINFO array; unable to configure PROCINFO RETRY for `echo before sleep; sleep 1; echo after sleep #'
      0 [echo before sleep; sleep 1; echo after sleep #] -> before sleep
    ! Error: getline(echo before sleep; sleep 1; echo after sleep #) returned -1, errno = Resource temporarily unavailable
    ! Error: close(echo before sleep; sleep 1; echo after sleep #) failed with rc 269, ERRNO 
    
        Testing timeout apple type string
    
    + gawk: ./timeout_parse.awk:6: warning: set_non_blocking: could not install PROCINFO array; unable to configure PROCINFO RETRY for `echo before sleep; sleep 1; echo after sleep #'
      0 [echo before sleep; sleep 1; echo after sleep #] -> before sleep
    ! Error: getline(echo before sleep; sleep 1; echo after sleep #) returned -1, errno = Resource temporarily unavailable
    ! Error: close(echo before sleep; sleep 1; echo after sleep #) failed with rc 269, ERRNO 
    ! EXIT CODE: 1
    make[2]: *** [diffout] Error 1
    make[1]: *** [check] Error 1
    
     

Log in to post a comment.

MongoDB Logo MongoDB