From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 16 16:28:09 2020 Received: (at submit) by debbugs.gnu.org; 16 Feb 2020 21:28:09 +0000 Received: from localhost ([127.0.0.1]:37780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3RSS-00084N-Vn for submit@debbugs.gnu.org; Sun, 16 Feb 2020 16:28:09 -0500 Received: from lists.gnu.org ([209.51.188.17]:46859) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3RSR-00084G-NU for submit@debbugs.gnu.org; Sun, 16 Feb 2020 16:28:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45730) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3RSQ-0008Iz-DW for bug-guix@gnu.org; Sun, 16 Feb 2020 16:28:07 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3RSP-0001o0-Au for bug-guix@gnu.org; Sun, 16 Feb 2020 16:28:06 -0500 Received: from minsky.hcoop.net ([104.248.1.95]:44090) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j3RSP-0001mr-7b for bug-guix@gnu.org; Sun, 16 Feb 2020 16:28:05 -0500 Received: from marsh.hcoop.net ([45.55.52.66]) by minsky.hcoop.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1j3RSO-0001al-6d for bug-guix@gnu.org; Sun, 16 Feb 2020 16:28:04 -0500 Date: Sun, 16 Feb 2020 16:28:04 -0500 (EST) From: Jack Hill X-X-Sender: jackhill@marsh.hcoop.net To: bug-guix@gnu.org Subject: mongo-tools test fail with Go 1.13 Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 104.248.1.95 X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Hi Guix, After the recent Go 1.13 update, the test for mongo-tools package (currently at vervsion 3.4.0) fails with: ``` flag provided but not defined: -test.testlogfile Usage of /tmp/guix-build-mongo-tools-3.4.24.drv-0/go-build972699285/b001/mongofiles.test: -convey-json When true, emits results in JSON blocks. Default: 'false' -convey-silent When true, all output from GoConvey is suppressed. -convey-story When true, emits story output, otherwise emits dot output. When not provided, this flag mirros the value of the '-test.v' flag -test.types string Comma-separated list of the types of tests to be run (default "unit") FAIL github.com/mongodb/mongo-tools/mongofiles 0.002s FAIL command "go" "test" "-v" "github.com/mongodb/mongo-tools/mongofiles" failed with status 1 ``` I believe that this is related to a change in Go's testing module with 1.13: https://golang.org/doc/go1.13#testing For more information, also see the Go bug report: https://github.com/golang/go/issues/31859 Note that mongo-tools provides a number of tools in different Go packages, and the mongofiles tool is the only one that has this error. I have tried to adding a call to flag.Parse() in TestMain, which I added, as described in the documentation [0], but that did not resolve the problem. I'm not exactly sure why. The same fix worked for containerd [1]. [0] https://golang.org/pkg/testing/#hdr-Main [1] http://git.savannah.gnu.org/cgit/guix.git/commit/?id=13c8e747e86e39c0a8c6ec7da8c812d9bbcb682b I wonder if the difference is that mongofiles does not use the flag package directly, but flag.Parse() is being called in the wrong place in one of its dependencies. A note on versions: the problem persists in the latest release of mongo-tools in the 3.4 series, 3.4.24. I have not tried the other release series, 3.6, 4.0, and 4.2 because those require dependencies not yet packaged in Guix. I have opened a bug report upstream: https://jira.mongodb.org/browse/TOOLS-2482 Thoughts or suggestions? Best, Jack