From 0b87f63548f524365a7e1c39635fdb05bfb3fb42 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 22 Sep 2015 10:09:42 +0000 Subject: t/nntpd.t: fix fcntl test to ensure no failures We need to run the syscall before testing for its failure :x --- t/nntpd.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/nntpd.t b/t/nntpd.t index d30ed63f..d886e3c6 100644 --- a/t/nntpd.t +++ b/t/nntpd.t @@ -88,8 +88,8 @@ EOF } ok(defined $pid, 'forked nntpd process successfully'); $! = 0; - ok(! $!, 'no error from fcntl(F_SETFD)'); fcntl($sock, F_SETFD, $fl |= FD_CLOEXEC); + ok(! $!, 'no error from fcntl(F_SETFD)'); my $n = Net::NNTP->new($sock->sockhost . ':' . $sock->sockport); my $list = $n->list; is_deeply($list, { $group => [ qw(1 1 n) ] }, 'LIST works'); -- cgit v1.2.3-24-ge0c7