From: Eric Wong Date: Tue, 22 Sep 2015 10:09:42 +0000 (+0000) Subject: t/nntpd.t: fix fcntl test to ensure no failures X-Git-Tag: v1.0.0~849 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=0b87f63548f524365a7e1c39635fdb05bfb3fb42;p=public-inbox.git t/nntpd.t: fix fcntl test to ensure no failures We need to run the syscall before testing for its failure :x --- 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');