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: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id EF97A1F453 for ; Thu, 2 May 2019 20:54:55 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; q=dns; s=default; b=KGW MHSq30pICVcyroQoji9r7KmFQ67ScO1fdHENgZi3yn4fYlGHc2p7IvwBP4zzr9wm Hh5Ya8T+VelIynwHPvhlaTonq8ORrkZRcw2yjzCMLxX37GwZzk4vLpbElhKXEaDC oBNhlzEaEehtxX0bs4vURyCYvgV03yE+Plki2qaM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=default; bh=VKkljlsvN Z1To2pc5QUMbFGQdYU=; b=ioxFc7FC1mLNdiFXZakucWKHO9cuQfAmFi0WSma0V 2x9AcftfmWMCr4DChn9NETVE1vW+NQFjR0IqgI84FnVf/Nk/TY+Xonv70fzUguyL 0+W86e6RGyx5yEcxcnJF71f7346RsIB0mPeUdTC5mjmuZTTjfJNmYgMhky8rZm9C jY= Received: (qmail 120930 invoked by alias); 2 May 2019 20:54:53 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 120916 invoked by uid 89); 2 May 2019 20:54:53 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: avasout02.plus.net X-CM-Score: 0.00 From: Mike Crowe To: libc-alpha@sourceware.org Cc: Mike Crowe Subject: [PATCH 0/5] Add new helper functions+macros to libsupport and use them in some nptl tests Date: Thu, 2 May 2019 21:54:30 +0100 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In preparation for adding support for the _clockwait family of functions, modify various tests to: 1. use struct timespec rather than struct timeval 2. use libsupport. This requires adding a new support/timespec.h and support/xtime.h containing helper functions and macros along with timespec_sub and timespec_add implementations from gnulib. Thanks to Adhemerval Zanella for providing lots of help and advice with these patches. Changes since v2[2]: * A few more whitespace fixes * Reformat copyright notices in timespec-add.c and timespec-sub.c to match those used in posix/getopt.c which also comes from gnulib. * xclock_gettime use FAIL_EXIT1 rather than xpthread_check_return. * timespec.c: stop preserving errno. * tst-sem5: Reinstate comment describing length of wait. * Fix change log in commit message to match actual ChangeLog addition. * Use xpthread_join in tst-abstime.c. Changes since v1[1]: * Many whitespace fixes. * The check macros in timespec.h now call out-of-line functions rather than containing the code themselves. * Take better timespec_add and timespec_sub implementations from gnulib. * Use xclock_gettime in more places. * Split addition of support/timespec.h into a separate patch. * Combine two separate rwlock patches into one to hopefully make review easier. * Use even more x* wrapper functions. [1] https://lwn.net/ml/libc-alpha/cover.13c2d68f411f9010956e8e52edfbe168964e1e5c.1553797867.git-series.mac%40mcrowe.com/ [2] https://lwn.net/ml/libc-alpha/cover.418ef3e533dac34f464166a596c7f6adeeb5d5d1.1554665560.git-series.mac%40mcrowe.com/ Mike Crowe (5): support: Add xclock_gettime nptl: Convert tst-cond11.c to use libsupport nptl: Use recent additions to libsupport in tst-sem5 nptl: Convert some rwlock tests to use libsupport nptl/tst-abstime: Use libsupport ChangeLog | 49 ++++++++++++- nptl/tst-abstime.c | 70 ++++------------- nptl/tst-cond11.c | 169 ++++++++-------------------------------- nptl/tst-rwlock14.c | 122 ++++------------------------- nptl/tst-rwlock6.c | 146 ++++++----------------------------- nptl/tst-rwlock7.c | 119 ++++++---------------------- nptl/tst-rwlock9.c | 96 +++++------------------ nptl/tst-sem5.c | 21 +---- support/Makefile | 4 +- support/README | 6 +- support/timespec-add.c | 71 +++++++++++++++++- support/timespec-sub.c | 71 +++++++++++++++++- support/timespec.c | 58 ++++++++++++++- support/timespec.h | 79 +++++++++++++++++++- support/xclock_gettime.c | 31 +++++++- support/xtime.h | 33 ++++++++- 16 files changed, 558 insertions(+), 587 deletions(-) create mode 100644 support/timespec-add.c create mode 100644 support/timespec-sub.c create mode 100644 support/timespec.c create mode 100644 support/timespec.h create mode 100644 support/xclock_gettime.c create mode 100644 support/xtime.h base-commit: 7dfde28a211400dc3b52610198478325a487e02b -- git-series 0.9.1