From patchwork Thu Jul 11 13:17:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 1959336 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WKZyt02k0z1xpd for ; Thu, 11 Jul 2024 23:17:42 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E3A8B3844040 for ; Thu, 11 Jul 2024 13:17:39 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by sourceware.org (Postfix) with ESMTP id 2A4F438708C8 for ; Thu, 11 Jul 2024 13:17:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2A4F438708C8 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=orcam.me.uk ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2A4F438708C8 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4190:8020::34 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720703839; cv=none; b=tgeeJYQI3ytTA0eI5Gvo1mzMm3E9oJGe/LNLrkdF9rsw53yGUt+F0dBPkwaBtQK6EppVl8PkXgZjiUoLecnYTV4U/C5yTw9PGTl1ih4thpKryyDBR0DIYNCUi6uIZ8t53nd9Mxg1bDpf/+7VhEmmLq0q6YQ7qfTidQ228IO2WDA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720703839; c=relaxed/simple; bh=cwPg09YEl382eNv2veuAK0Dh4lwKiUVDowiMKZLQnGU=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=oDaYnkLkcY7QxsPHRUtZ3t1OWHiE3hor742GPZqJgd1USZqS3YTDbTgXPGkieHLtXkpCn8zv5M0DUhD+nk5lGi4e7akpjWYH+OQibmO6CrP4lQyGEIwLydsvwL+40/B3N+T+P/AKzhrFwF3KeEqqTgK8+cYL+Lm6olcJlz6AczU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by angie.orcam.me.uk (Postfix, from userid 500) id A75D192009C; Thu, 11 Jul 2024 15:17:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id A1B9092009B; Thu, 11 Jul 2024 14:17:15 +0100 (BST) Date: Thu, 11 Jul 2024 14:17:15 +0100 (BST) From: "Maciej W. Rozycki" To: libc-alpha@sourceware.org cc: "Maciej W. Rozycki" Subject: [PATCH 1/2] nptl: Add copyright notice tst-sem11 and tst-sem12 tests In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 X-Spam-Status: No, score=-3487.9 required=5.0 tests=BAYES_00, KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS, KAM_INFOUSMEBIZ, KAM_LAZY_DOMAIN_SECURITY, KAM_SHORT, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: "Maciej W. Rozycki" Errors-To: libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org From: Maciej W. Rozycki Add a copyright notice to the tst-sem11 and tst-sem12 tests, observing that they have been originally contributed back in 2007, with commit 2af4e3e5668f ("Test of semaphores."). Reviewed-by: Adhemerval Zanella --- nptl/tst-sem11.c | 18 ++++++++++++++++++ nptl/tst-sem12.c | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) glibc-tst-sem11-copyright.diff Index: glibc/nptl/tst-sem11.c =================================================================== --- glibc.orig/nptl/tst-sem11.c +++ glibc/nptl/tst-sem11.c @@ -1,3 +1,21 @@ +/* Test of semaphores. + Copyright (C) 2007-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + #include #include #include Index: glibc/nptl/tst-sem12.c =================================================================== --- glibc.orig/nptl/tst-sem12.c +++ glibc/nptl/tst-sem12.c @@ -1,3 +1,21 @@ +/* Test of semaphores. + Copyright (C) 2007-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + #include #include From patchwork Thu Jul 11 13:17:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 1959337 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WKZz21Z52z1xpd for ; Thu, 11 Jul 2024 23:17:50 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 74048383E515 for ; Thu, 11 Jul 2024 13:17:48 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by sourceware.org (Postfix) with ESMTP id C559A384A050 for ; Thu, 11 Jul 2024 13:17:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C559A384A050 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=orcam.me.uk ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C559A384A050 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=78.133.224.34 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720703844; cv=none; b=klfGW3OzcNd7hwvOelUDsuC1Bnwjgpv0/rS/EMHO2P9UkWifu65WyzH5xBCDQLZGJPHNRD1QRz/Yc5fKVZM4eLU06korrVfH5poxlL8I29h3NZLEReUF8OrgiVQo85J71JOQDkk9MQbogY5aeq4UkVGsmaOSnLKbSWObMaYEuXY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720703844; c=relaxed/simple; bh=c6I39c3aEC1c6SiDvbDvEndqgYablC/YlqwrlFZSjzM=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=AU88AKJHuhFdh/LzoM1w1RsG/NbMO5KbU7kAn8v+I3OnOtxBwy97J+DB+tDLaChbCjEtBcI/LNgsPxcbld5ioidtuk1OIELTB+JHhZZoWY9tkdVt/FdDe9qR3VIEJ3gCL25UYS7dElUmXR+tsA4hZ53EZyFTGEXuBM3ozrZ2cjY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by angie.orcam.me.uk (Postfix, from userid 500) id 0BD3592009C; Thu, 11 Jul 2024 15:17:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 0694E92009B; Thu, 11 Jul 2024 14:17:20 +0100 (BST) Date: Thu, 11 Jul 2024 14:17:20 +0100 (BST) From: "Maciej W. Rozycki" To: libc-alpha@sourceware.org cc: "Maciej W. Rozycki" Subject: [PATCH 2/2] nptl: Convert tst-sem11 and tst-sem12 tests to use the test driver In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 X-Spam-Status: No, score=-1162.7 required=5.0 tests=BAYES_00, KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS, KAM_INFOUSMEBIZ, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: "Maciej W. Rozycki" Errors-To: libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org From: Maciej W. Rozycki Fix an issue with commit 2af4e3e5668f ("Test of semaphores.") by making the tst-sem11 and tst-sem12 tests use the test driver, preventing them from ever causing testing to hang forever and never complete, such as currently happening with the 'mips-linux-gnu' (o32 ABI) target. Adjust the name of the PREPARE macro, which clashes with the interpretation of its presence by the test driver, by using a TF_ prefix in reference to the name of the 'tf' function. Reviewed-by: Adhemerval Zanella --- nptl/tst-sem11.c | 8 +++++--- nptl/tst-sem12.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) glibc-tst-sem11-test-driver.diff Index: glibc/nptl/tst-sem11.c =================================================================== --- glibc.orig/nptl/tst-sem11.c +++ glibc/nptl/tst-sem11.c @@ -29,15 +29,15 @@ static void * tf (void *arg) { -#ifdef PREPARE - PREPARE +#ifdef TF_PREPARE + TF_PREPARE #endif SEM_WAIT (arg); return NULL; } int -main (void) +do_test (void) { int tries = 5; pthread_t th; @@ -101,3 +101,5 @@ main (void) return 0; } + +#include Index: glibc/nptl/tst-sem12.c =================================================================== --- glibc.orig/nptl/tst-sem12.c +++ glibc/nptl/tst-sem12.c @@ -20,7 +20,7 @@ #include -#define PREPARE \ +#define TF_PREPARE \ struct timespec ts; \ struct timeval tv; \ gettimeofday (&tv, NULL); \