From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-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-Spam-SWARE-Status: No, score=-12.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,KAM_ASCII_DIVIDERS,KAM_SHORT,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=H*r:4.89, H*MI:mac, H*r:smtp, family 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, 02 May 2019 20:54:00 -0000 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SW-Source: 2019-05/txt/msg00031.txt.bz2 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