testsuite problem with tst-cancel4

Waldemar Brodkorb wbx at openadk.org
Fri May 29 23:57:17 UTC 2015


Hi,

I think since this commit:
--------
commit 7c721d31e4b7a0bdf6f803b8e7c38996bf60b59f
Author: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
Date:   Sun Jan 29 17:48:54 2012 +0100

    tmpnam, tempnam are obsolete in SUSV4
    
    Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>

---------

the test case is broken. mkstemp opens the temporary file, mktemp
does not.

Strace shows following issue:
socket(PF_FILE, SOCK_STREAM, 0)         = 3
getpid()                                = 12607
open("/tmp/tst-cancel4-socket-1-9PTGfr", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
close(4)                                = 0
bind(3, {sa_family=AF_FILE, path="/tmp/tst-cancel4-socket-1-9PTGfr"}, 35) = -1 EADDRINUSE
(Address already in use)
open("/tmp/tst-cancel4-socket-1-cHm3px", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
close(4)                                = 0
bind(3, {sa_family=AF_FILE, path="/tmp/tst-cancel4-socket-1-cHm3px"}, 35) = -1 EADDRINUSE
(Address already in use)

mkstemp() creates the file, and bind() returns EADDRINUSE, if the 
file already exists.

Return to mktemp usage as glibc does for this testcase?

best regards
 Waldemar



More information about the uClibc mailing list