From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id BDF621F424 for ; Tue, 22 Sep 2015 10:09:51 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/7] t/nntpd.t: fix fcntl test to ensure no failures Date: Tue, 22 Sep 2015 10:09:42 +0000 Message-Id: <20150922100948.8160-2-e@80x24.org> In-Reply-To: <20150922100948.8160-1-e@80x24.org> References: <20150922100948.8160-1-e@80x24.org> List-Id: 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 d30ed63..d886e3c 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'); -- EW