From patchwork Wed Mar 11 00:05:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Hudson-Doyle X-Patchwork-Id: 38529 Return-Path: X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by sourceware.org (Postfix) with ESMTPS id B2D27395B006 for ; Wed, 11 Mar 2020 00:05:36 +0000 (GMT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id AEA8522293; Tue, 10 Mar 2020 20:05:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 10 Mar 2020 20:05:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=MkqVBagLW+64esvY3 k4sW/qqnHUFvQsDKVU0FvDPFZs=; b=aM6IIOdht70EXiO4FZT4eRGXs1Pl+e8zp ufRIs66x9Ad4druIT36jP/O2Qa+LtLme+AbThd5wOVhvLD/AArjcxPfXHsoS2vlH F1F7iwKwGUsUU+v3eG8cIZ6jfaoNoHjSTVOmUEHScJb7xc+d7mFAdaSDhdGPbw/j B7d1YPIa4/TrxeBwQSa4x4GtP8QkogU7NmHYAda6HAkenkLknj2FIwmQbXAiM9E/ iByRIpz9qvYOk2013qeuXJ9WjnFnI5gv2g8anjCf0fIxhz2kTtNIZDfGtavyXnwF raOH99ZWxMdlJkNPLGGohhTtibW2Varw381R+LJqRUtKfpaMQLURQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedruddvuddgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepofhitghhrggvlhcujfhuughsohhnqdffohihlhgvuceomhhitghh rggvlhdrhhhuughsohhnsegtrghnohhnihgtrghlrdgtohhmqeenucfkphepuddtfedrvd effedrvddvtddrudekleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehmfihhuhgushhonhesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Received: from localhost (unknown [103.233.220.189]) by mail.messagingengine.com (Postfix) with ESMTPA id 02F433280068; Tue, 10 Mar 2020 20:05:33 -0400 (EDT) From: Michael Hudson-Doyle To: libc-alpha@sourceware.org Cc: Michael Hudson-Doyle Subject: [PATCH] test-container: print errno when execvp fails Date: Wed, 11 Mar 2020 13:05:25 +1300 Message-Id: <20200311000525.918662-1-michael.hudson@canonical.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-Spam-Status: No, score=-27.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2020 00:05:37 -0000 I'm debugging a situation where lots of tests using test-container fail and it's possible knowing errno would help understand why. --- support/test-container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/test-container.c b/support/test-container.c index e970eb2c18..dff2ff379e 100644 --- a/support/test-container.c +++ b/support/test-container.c @@ -1145,7 +1145,7 @@ main (int argc, char **argv) execvp (new_child_exec, new_child_proc); /* Or don't run the child? */ - FAIL_EXIT1 ("Unable to exec %s\n", new_child_exec); + FAIL_EXIT1 ("Unable to exec %s: %s\n", new_child_exec, strerror (errno)); /* Because gcc won't know error () never returns... */ exit (EXIT_UNSUPPORTED);