From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 33D061F852; Tue, 1 Feb 2022 23:27:40 +0000 (UTC) Date: Tue, 1 Feb 2022 23:27:40 +0000 From: Eric Wong To: Julien Moutinho Cc: Dominique Martinet , meta@public-inbox.org Subject: FD_CLOEXEC w/ nix-shell [was: Test failures with 1.7.0] Message-ID: <20220201232740.M97535@dcvr> References: <20211208010730.f47xxgzj53nwgvja@sourcephile.fr> <20211208040836.GA27368@dcvr> <20211209013743.okzgim7bbrpahks7@sourcephile.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211209013743.okzgim7bbrpahks7@sourcephile.fr> List-Id: Julien Moutinho wrote: > Without Inline::C, and without Nix's sandbox > -------------------------------------------- > > I get 3 tests to fail (in addition to those currently disabled in Nixpkgs: > https://github.com/NixOS/nixpkgs/pull/104457/files#diff-77474340b38081fea7ce3b112c1bc060d3a95cc5e781915463e2f3fc5556da7bR34-R69 > ie. convert-compact, search, v2writable, www_listing, eml, hl_mod, > lei-mirror and spawn): > $ nix develop -f . public-inbox > $ doCheck= bash pkgs/development/perl-modules/generic/builder.sh > $ make -C public-inbox-1.7.0 test > > [...] > > Test Summary Report > > ------------------- > > t/nntpd-v2.t (Wstat: 256 Tests: 113 Failed: 1) > > Failed test: 102 > > Non-zero exit status: 1 > > t/nntpd.t (Wstat: 256 Tests: 110 Failed: 1) > > Failed test: 99 > > Non-zero exit status: 1 > > t/solver_git.t (Wstat: 1280 Tests: 13 Failed: 5) > > Failed tests: 9-13 > > Non-zero exit status: 5 > > Parse errors: No plan found in TAP output > > Files=149, Tests=4658, 296 wallclock secs ( 1.78 usr 0.56 sys + 116.73 cusr 165.82 csys = 284.89 CPU) > > Result: FAIL > > Failed 3/149 test programs. 7/4658 subtests failed. > > More precisely: > $ (cd public-inbox-1.7.0; perl -I$out/lib/perl5/site_perl t/nntpd-v2.t ) > > [...] > > ok 101 - new article retrieved after compact > > not ok 102 - no deleted files > > # Failed test 'no deleted files' > > # at ./t/nntpd.t line 363. > > # Structures begin differing at: > > # $got->[0] = '-nntpd 3130714 julm 4u REG 0,53 77189 2606550 /tmp/nix-shell.D0VGvX (deleted) OK, so that's a false positive for a deleted file that wasn't created by public-inbox. I suppose our tests can be altered to account for that. Is nix-shell setting FD_CLOEXEC on all FDs (>= 3) it creates? IMNSHO it should. It seems to be standard practice nowadays to set FD_CLOEXEC on all FDs (>=3) created. At least that's my experience with Perl 5.6+ and Ruby 2.0+; I'll let experts in other languages chime in for other stuff... More on the rest in a separate email(s).