summaryrefslogtreecommitdiffstats
path: root/tests/fp
Commit message (Collapse)AuthorAgeFilesLines
* tests/fp/fp-test: Replace the word 'blacklist'Philippe Mathieu-Daudé2021-03-091-4/+4
| | | | | | | | | | | | | | | Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately. [*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md Acked-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20210303184644.1639691-6-philmd@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
* meson: adjust timeouts for some slower testsPaolo Bonzini2021-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Adjust the timeouts for the benchmarks (Meson 0.57 allows 0 to mean infinite) and for the longest running tests. These are the times that I measured and the corresponding timeouts. For generic qtests, the target that reported the longest runtime is included. unit tests: test-crypto-tlscredsx509 13.15s 45s test-crypto-tlssession 14.12s 45s qtests: qos-test 21.26s 60s (i386) ahci-test 22.18s 60s pxe-test 26.51s 60s boot-serial-test 28.02s 60s (sparc) prom-env-test 28.86s 60s bios-tables-test 50.17s 120s (aarch64) test-hmp 57.15s 120s (aarch64) npcm7xx_pwm-test 71.27s 150s migration-test 97.09s 150s (aarch64) qom-test 139.20s 240s (aarch64) Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* tests/fp: Do not emit implicit-fallthrough warnings in the softfloat testsThomas Huth2020-12-181-0/+2
| | | | | | | | | | | The softfloat tests are external repositories, so we do not care about implicit fallthrough warnings in this code. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Chen Qun <kuhn.chenqun@huawei.com> Message-Id: <20201211152426.350966-12-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* do not use colons in test namesPaolo Bonzini2020-10-221-3/+3
| | | | | | | Starting with meson 0.56, colons are used to separate the subproject name from the test name. Use dash or slash depending on what looks nicer. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Remove superfluous .gitignore filesThomas Huth2020-10-131-2/+0Star
| | | | | | | | Since we are now always doing out-of-tree builds, these gitignore files should not be necessary anymore. Message-Id: <20200919133637.72744-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* meson: clean up build_by_defaultPaolo Bonzini2020-09-301-2/+0Star
| | | | | | | | | | | Build all executables by default except for the known-broken ones. This also allows running qemu-iotests without manually building socket_scm_helper. Reported-by: Max Reitz <mreitz@redhat.com> Tested-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* meson: convert tests/fp and check-softfloatPaolo Bonzini2020-08-212-600/+636
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* meson: rename included C source files to .c.incPaolo Bonzini2020-08-212-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | With Makefiles that have automatically generated dependencies, you generated includes are set as dependencies of the Makefile, so that they are built before everything else and they are available when first building the .c files. Alternatively you can use a fine-grained dependency, e.g. target/arm/translate.o: target/arm/decode-neon-shared.inc.c With Meson you have only one choice and it is a third option, namely "build at the beginning of the corresponding target"; the way you express it is to list the includes in the sources of that target. The problem is that Meson decides if something is a source vs. a generated include by looking at the extension: '.c', '.cc', '.m', '.C' are sources, while everything else is considered an include---including '.inc.c'. Use '.c.inc' to avoid this, as it is consistent with our other convention of using '.rst.inc' for included reStructuredText files. The editorconfig file is adjusted. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* softfloat: Change tininess_before_rounding to boolRichard Henderson2020-05-191-1/+1
| | | | | | | | Slightly tidies the usage within softfloat.c and the representation in float_status. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* testing: don't nest build for fp-testAlex Bennée2020-01-091-8/+6Star
| | | | | | | | | | Re-calling the main make is counter-productive and really messes up with parallel builds. Just ensure we have built the pre-requisites before we build the fp-test bits. If the user builds manually just complain if the parent build hasn't got the bits we need. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Emilio G. Cota <cota@braap.org>
* softfloat: Support float_round_to_odd more placesRichard Henderson2019-02-261-9/+34
| | | | | | | | | | | | | | | Previously this was only supported for roundAndPackFloat64. New support in round_canonical, round_to_int, float128_round_to_int, roundAndPackFloat32, roundAndPackInt32, roundAndPackInt64, roundAndPackUint64. This does not include any of the floatx80 routines, as we do not have users for that rounding mode there. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20190215170225.15537-1-richard.henderson@linaro.org> Tested-by: David Hildenbrand <david@redhat.com> [AJB: add missing break] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/fp: add wrapping for f128_to_ui32Alex Bennée2019-02-262-1/+3
| | | | | | | Needed to test: softfloat: Implement float128_to_uint32 Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
* tests/fp/platform.h: include config-host.hEmilio G. Cota2019-01-221-0/+1
| | | | | | | | | | | We get HOST_WORDS_BIGENDIAN from config-host.h, but the include is missing. Fix it. This fixes `make check-softfloat' on big endian hosts. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* fp-test: fix signature of slow_clear_flags and qemu_clear_flagsEmilio G. Cota2019-01-221-2/+2
| | | | | | | To match the type in testfloat. Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/fp/Makefile: do not use gcc-only -W flagsEmilio G. Cota2019-01-221-2/+1Star
| | | | | | | The build now completes in both gcc and clang. Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* berkeley-testfloat-3: pull changesEmilio G. Cota2019-01-221-0/+0
| | | | | | | - fail: constify fail_programName Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* fp-bench: remove wrong exponent raise in fill_randomEmilio G. Cota2019-01-221-4/+0Star
| | | | | | | | | | | At this point random_ops[] only contains normals, so there's no need to do anything to them. In fact, raising the exponent here can make the output !normal, which is precisely what the comment says we want to avoid. Signed-off-by: Emilio G. Cota <cota@braap.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* fp-bench: fix update_random_opsEmilio G. Cota2019-01-221-3/+8
| | | | | | | | | | The second test in the branches is wrong; fix while converting to a switch statement, which is easier to get right. Signed-off-by: Emilio G. Cota <cota@braap.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* Clean up includesMarkus Armbruster2018-12-201-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes, with the changes to the following files manually reverted: contrib/libvhost-user/libvhost-user-glib.h contrib/libvhost-user/libvhost-user.c contrib/libvhost-user/libvhost-user.h linux-user/mips64/cpu_loop.c linux-user/mips64/signal.c linux-user/sparc64/cpu_loop.c linux-user/sparc64/signal.c linux-user/x86_64/cpu_loop.c linux-user/x86_64/signal.c target/s390x/gen-features.c tests/migration/s390x/a-b-bios.c tests/test-rcu-simpleq.c tests/test-rcu-tailq.c Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20181204172535.2799-1-armbru@redhat.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Halil Pasic <pasic@linux.ibm.com> Acked-by: Yuval Shaia <yuval.shaia@oracle.com> Acked-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
* tests/fp: add fp-benchEmilio G. Cota2018-12-173-1/+635
| | | | | | | | | | | These microbenchmarks will allow us to measure the performance impact of FP emulation optimizations. Note that we can measure both directly the impact on the softfloat functions (with "-t soft"), or the impact on an emulated workload (call with "-t host" and run under qemu user-mode). Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* fp-test: pick TARGET_ARM to get its specializationEmilio G. Cota2018-12-171-0/+3
| | | | | | | | | | | | | | | | | | | This gets rid of the muladd errors due to not raising the invalid flag. - Before: Errors found in f64_mulAdd, rounding near_even, tininess before rounding: +000.0000000000000 +7FF.0000000000000 +7FF.FFFFFFFFFFFFF => +7FF.FFFFFFFFFFFFF ..... expected -7FF.FFFFFFFFFFFFF v.... [...] - After: In 6133248 tests, no errors found in f64_mulAdd, rounding near_even, tininess before rounding. [...] Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/fp/fp-test: add floating point testsEmilio G. Cota2018-10-055-0/+2284
| | | | | | | | | | | | | | | | | | | | | | | | | By leveraging berkeley's softfloat and testfloat. With this we get decent coverage of softfloat.c: $ ./fp-test -r even: 67.22% coverage $ ./fp-test -r all: 73.11% coverage Note that we do not yet test parts of softfloat.c that aren't in the original softfloat library, namely: - denormal inputs - *_to_int16/uint16 conversions - scalbn for fixed point - muladd variants - min/max - exp2 - log2 - float*_compare (except float16_compare) Signed-off-by: Emilio G. Cota <cota@braap.org> [rth: Add the new modules to git_submodules.] Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* gitmodules: add berkeley's softfloat + testfloat version 3Emilio G. Cota2018-10-052-0/+0
These are BSD-licensed so we can add them as submodules. Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>