diff options
author | Carlos O'Donell <carlos@redhat.com> | 2013-04-06 16:22:47 -0400 |
---|---|---|
committer | Carlos O'Donell <carlos@redhat.com> | 2013-04-06 16:22:47 -0400 |
commit | 26510bdda1ab999041292737d1fad6aa25f9e06d (patch) | |
tree | 71297531eeb946e15b07748b7ad4fab6de816228 /math/README.libm-test | |
parent | a01f19c8fb12eef419d4112879bc715e2ab6f6d7 (diff) | |
download | glibc-26510bdda1ab999041292737d1fad6aa25f9e06d.tar glibc-26510bdda1ab999041292737d1fad6aa25f9e06d.tar.gz glibc-26510bdda1ab999041292737d1fad6aa25f9e06d.tar.bz2 glibc-26510bdda1ab999041292737d1fad6aa25f9e06d.zip |
New Makefile target `regen-ulps'.
The wiki "Regeneration" page has this to say about update ULPs.
"The libm-test-ulps files are semiautomatically updated. To
update an ulps baseline, run each of the failing tests (test-float,
test-double, etc.) with -u; this will generate a file called ULPs;
concatenate each of those files with the existing libm-test-ulps
file, after removing any entries for particularly huge numbers of
ulps that you do not want to mark as expected. Then run
gen-libm-test.pl -n -u FILE where FILE is the concatenated file
produced in the previous step. This generates a file called
NewUlps which is the new sorted version of libm-test-ulps."
The same information is listed in math/README.libm-test, and is a
lot of manual work that you often want to run over-and-over again
while working on a particular test.
The `regen-ulps' convenience target does this automatically for
developers.
We strictly assume the source tree is readonly and add a
new --output-dir option to libm-test.inc to allow for writing
out ULPs to $(objpfx).
When run the new target does the following:
* Starts with the baseline ULPs file.
* Runs each of the libm math tests with -u.
* Adds new changes seen with -u to the baseline.
* Sorts and prepares the test output with gen-libm-test.pl.
* Leaves math/NewUlps in your build tree to copy to your source
tree, cleanup, and checkin.
The math test documentation in math/README.libm-test is updated
document the new Makefile target.
---
2013-04-06 Carlos O'Donell <carlos@redhat.com>
* Makefile.in (regen-ulps): New target.
* math/Makefile [ifneq (no,$(PERL)]: Declare regen-ulps with .PHONY.
[ifneq (no,$(PERL)] (run-regen-ulps): New variable.
[ifneq (no,$(PERL)] (regen-ulps): New target.
[ifeq (no,$(PERL)] (regen-ulps): New target.
* math/libm-test.inc (ulps_file_name): Define.
(output_dir): New variable.
(options): Add "output-dir" option.
(parse_opt): Handle 'o' case.
(main): If output_dir is non-NULL use it as a prefix
otherwise use "".
* math/README.libm-test: Update `How can I generate "libm-test-ulps"?'
Diffstat (limited to 'math/README.libm-test')
-rw-r--r-- | math/README.libm-test | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/math/README.libm-test b/math/README.libm-test index 7a461551cb..29294993fe 100644 --- a/math/README.libm-test +++ b/math/README.libm-test @@ -39,24 +39,33 @@ platform specific sysdep directory. How can I generate "libm-test-ulps"? ==================================== -The test drivers have an option "-u" to output an unsorted list of all -epsilons that the functions have. The output can be read in directly -but it's better to pretty print it first. "gen-libm-test.pl" has an option -to generate a pretty-printed and sorted new ULPs file from the output -of the test drivers. - -To generate a new "libm-test-ulps" file, first remove "ULPs" file in the -current directory, then you can execute for example: -test-double -u --ignore-max-ulp=yes +To automatically generate a new "libm-test-ulps" run "make regen-ulps". +This generates the file "math/NewUlps" in the build directory. The file +contains the sorted results of all the tests. You can use the "NewUlps" +file as the machine's updated "libm-test-ulps" file. Copy "NewUlps" to +"libm-test-ulps" in the appropriate machine sysdep directory. Verify +the changes, post your patch, and check it in after review. + +To manually generate a new "libm-test-ulps" file, first remove "ULPs" +file in the current directory, then you can execute for example: + /build/elf/ld.so --library--path /build/:/build/elf:/build/math \ + test-double -u --ignore-max-ulp=yes This generates a file "ULPs" with all double ULPs in it, ignoring any -previous calculated ULPs. -Now generate the ULPs for all other formats, the tests will be appending -the data to the "ULPs" file. As final step run "gen-libm-test.pl" with the -file as input and ask to generate a pretty printed output in the file "NewUlps": +previously calculated ULPs, and running with the newly built dynamic +loader and math library (assumes you didn't install your build). Now +generate the ULPs for all other formats, the tests will be appending the +data to the "ULPs" file. As final step run "gen-libm-test.pl" with the +file as input and ask to generate a pretty printed output in the file +"NewUlps": gen-libm-test.pl -u ULPs -n - -Now you can rename "NewUlps" to "libm-test-ulps" and move it into -sysdeps. +Copy "NewUlps" to "libm-test-ulps" in the appropriate machine sysdep +directory. + +Note that the test drivers have an option "-u" to output an unsorted +list of all epsilons that the functions have. The output can be read +in directly but it's better to pretty print it first. +"gen-libm-test.pl" has an option to generate a pretty-printed and +sorted new ULPs file from the output of the test drivers. Contents of libm-test-ulps ========================== |