From patchwork Tue Apr 6 22:39:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arjun Shankar X-Patchwork-Id: 42925 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E10C63857823; Tue, 6 Apr 2021 22:39:54 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from aloka.lostca.se (aloka.lostca.se [178.63.46.202]) by sourceware.org (Postfix) with ESMTPS id 224173858012 for ; Tue, 6 Apr 2021 22:39:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 224173858012 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lostca.se Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arjun.is@lostca.se Received: from aloka.lostca.se (aloka [127.0.0.1]) by aloka.lostca.se (Postfix) with ESMTP id 6C90DEC0F for ; Tue, 6 Apr 2021 22:39:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=lostca.se; h=date:from:to :subject:message-id:mime-version:content-type; s=howrah; bh=V2DM cFLysR6pwTsnguHXMCHWXJ8=; b=DtEnASx12iJRFLLG5dXTX+EITjrK5SvlRz7U cER+dP26ZzIdat//lAEgKxWmT4u2TeUHQYx+kEeo6fZ2kwltnzYDkKUwiK5NVJAM YdKDG1b0JfE1MDzifaXqbmjPEP2dCmHNXdQJuk4j2YzuPQ31Je4bWOkV0QozWIuX zLivd9U= Received: from localhost (unknown [IPv6:2a01:4f8:120:624c::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: spectre) by aloka.lostca.se (Postfix) with ESMTPSA id 2F14EEC0E for ; Tue, 6 Apr 2021 22:39:50 +0000 (UTC) Date: Tue, 6 Apr 2021 22:39:48 +0000 From: Arjun Shankar To: libc-alpha@sourceware.org Subject: [PATCH] malloc: Run tst-malloc-stats-cancellation via test-driver.c Message-ID: <20210406223947.GA39160@aloka.lostca.se> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP 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: , Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" From: Arjun Shankar This allows the test to time out in case it hangs. Reviewed-by: Carlos O'Donell --- I ran into an instance of this test hanging when building glibc on Fedora Rawhide for armv7hl. I am still investigating the cause of that but, in the meanwhile, this change is still worth making. malloc/tst-malloc-stats-cancellation.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/malloc/tst-malloc-stats-cancellation.c b/malloc/tst-malloc-stats-cancellation.c index 9a8f475830..725cad6498 100644 --- a/malloc/tst-malloc-stats-cancellation.c +++ b/malloc/tst-malloc-stats-cancellation.c @@ -91,8 +91,8 @@ buffer_threadproc (void *argp) } -int -main (void) +static int +do_test (void) { int result = 0, err, real_stderr_fd, bufpipe[2]; pthread_t t_thr, b_thr; @@ -214,3 +214,5 @@ main (void) } return result; } + +#include