From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114791 invoked by alias); 20 May 2016 21:37:42 -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 114703 invoked by uid 89); 20 May 2016 21:37:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=i1, 855 X-HELO: e33.co.us.ibm.com X-IBM-Helo: d03dlp01.boulder.ibm.com X-IBM-MailFrom: murphyp@linux.vnet.ibm.com X-IBM-RcptTo: libc-alpha@sourceware.org From: "Paul E. Murphy" To: libc-alpha@sourceware.org Subject: [PATCHv2 00/14] Refactor libm-test.inc and friends Date: Fri, 20 May 2016 21:38:00 -0000 Message-Id: In-Reply-To: References: X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16052021-0009-0000-0000-0000378D2688 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused X-SW-Source: 2016-05/txt/msg00482.txt.bz2 On this second spin, I now fixup the awkward MIN_EXP and MANT_DIG macros to be more sensible. Patch 3 starts the true refactoring by defining a set of format specific macros and updates some of the logic controlling the macros to use them. Patch 4 replaces the bulk of the TEST_ macros with the new format specific macros via a series of sed commands. Patch 5 through 10 update various glibc specific constants to be more readable, less type specific, and more consistent with the other macros used throughout libm-test.inc test cases. Patch 11 modifies the gen-libm-test.pl to strip suffixes for FP values and wrap them with LIT() Patch 12 removes the CHOOSE macro and remaining usage of TEST_ macros in favor of a fully generated file. Patch 13 and 14 refactor the auto generated test inputs to replace type specific conditions with format specific ones. NOTE: patches 4, 13, and 14 require some extra steps after applying. This keeps the patch size down. After building the sources, I ran the following for PPC64le and x86_64: 'BUILD_DIR=/path/to/build git rebase -i --exec ./path/to/test.sh HEAD~15' then from BUILD_DIR: for j in "" "ulps."; do echo "checking test.${j}\$i.txt"; \ for i in `seq 2 14`; do \ diff -u test.${j}$((i-1)).txt test.${j}${i}.txt; done; done; To verify nothing changed during or after these commits. Contents of test.sh: #!/bin/bash cd $BUILD_DIR i=1 while [ -e test.$i.txt ]; do let i+=1; done; tests="math/test-float.out math/test-double.out math/test-ldouble.out math/test-float-finite.out math/test-double-finite.out math/test-ldouble-finite.out math/test-ifloat.out math/test-idouble.out math/test-ildoubl.out" echo "Removing stale test output." rm -f $tests echo "Testing commit $i" make subdirs=math -j8 check &> /dev/null echo "Collating results of commit $i" # Use this as heuristic to verify check # didn't crash and burn. for test in ${tests}; do if [ ! -f $test ]; then echo "ERROR: $test missing"; exit 1; fi done for test in ${tests}; do cat $test; done > test.$i.txt echo "Regenerating ULPS for commit $i" make regen-ulps > test.ulps.$i.txt # end of test.sh Paul E. Murphy (14): Fixup usage of MANT_DIG in libm-test.inc Fixup usage of MIN_EXP in libm-test.inc Begin refactor of libm-test.inc Refactor type specific macros using regexes Refactor M_ macros defined in libm-test.inc Replace M_PI2l with pi_2_d in libm-test.inc Replace M_PIl with pi in libm-test.inc Replace M_PI_4l with pi_4_d in libm-test.inc Replace M_El with exp1 in libm-test.inc Add note about nexttoward test cases in libm-test.inc Apply LIT(x) to floating point literals in libm-test.c Remove CHOOSE() macro from libm-tests.inc Remove type specific information from auto-libm-test-in Generate new format names in auto-libm-test-out math/auto-libm-test-in | 115 ++-- math/gen-auto-libm-tests.c | 24 +- math/gen-libm-test.pl | 90 ++- math/libm-test.inc | 1536 ++++++++++++++++++++++---------------------- math/test-double-finite.c | 1 - math/test-double-vlen2.h | 1 - math/test-double-vlen4.h | 1 - math/test-double-vlen8.h | 1 - math/test-double.c | 1 - math/test-double.h | 6 +- math/test-float-finite.c | 1 - math/test-float-vlen16.h | 1 - math/test-float-vlen4.h | 1 - math/test-float-vlen8.h | 1 - math/test-float.c | 1 - math/test-float.h | 6 +- math/test-idouble.c | 1 - math/test-ifloat.c | 1 - math/test-ildoubl.c | 1 - math/test-ldouble-finite.c | 1 - math/test-ldouble.c | 1 - math/test-ldouble.h | 6 +- 22 files changed, 943 insertions(+), 855 deletions(-) -- 2.4.11