bug-coreutils
[Top][All Lists]
Advanced

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

Test failure in tac (coreutils-5.92) on Solaris


From: Peter Fales
Subject: Test failure in tac (coreutils-5.92) on Solaris
Date: Mon, 24 Oct 2005 10:43:26 -0500
User-agent: Mutt/1.4.2.1i

On Solaris, tac is failing when reading from stdin and stdin is a terminal.  
(it works on Linux)  E.g. a command like this works:

        $ echo 'a\nb' | tac
        b
        a

But simply running tac from the command line results in getting a shell
prompt back (no chance to type anything):

        $ tac
        $

        
The problem seems to be around line 548 in tac.c

        548    file_size = lseek (fd, (off_t) 0, SEEK_END);
        549
        550    ok = (0 <= file_size
        551          ? tac_seekable (fd, filename)
        552          : tac_nonseekable (fd, filename));

On linux lseeking on stdin returns -1, resulting in a call to
tac_nonseekable.  But, on Solaris, lseek returns 0.

This was detected by a "make check" failure:

        $ env DEBUG=yes VERBOSE=yes make check -C tests/misc TESTS=tty-eof 
        make: Entering directory 
`/opt/exp/expmake/build/gnucoresrc/build/coreutils/tests/misc'
        make  check-TESTS
        make[1]: Entering directory 
`/opt/exp/expmake/build/gnucoresrc/build/coreutils/tests/misc'
        tty-eof: tac didn't produce expected output
        FAIL: tty-eof
        ======================================
        1 of 1 tests failed
        Please report to address@hidden
        ======================================
        make[1]: *** [check-TESTS] Error 1
        make[1]: Leaving directory 
`/opt/exp/expmake/build/gnucoresrc/build/coreutils/tests/misc'
        make: *** [check-am] Error 2
        make: Leaving directory 
`/opt/exp/expmake/build/gnucoresrc/build/coreutils/tests/misc'

-- 
Peter Fales                       Lucent Technologies, Room 1C-436
N9IYJ                             2000 Lucent Ln, PO Box 3033
internet: address@hidden          Naperville, IL 60566-7033
                                  work: (630) 979-8031




reply via email to

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