102 Commits

Author SHA1 Message Date
Yann Collet
2d94529192 added test_alias
expected to fail due to #1013
2025-06-18 16:52:30 -07:00
Zijian
0d7465ea4f Add XXH3_initCustomSecret_rvv func 2025-06-13 18:33:13 +08:00
Zijian
2973489afa Add RISC-V RVV implementation 2025-06-11 20:27:33 +08:00
Yann Collet
5d975f2d16 fix -Og compilation with g++-14 2025-05-04 23:16:36 -07:00
Yann Collet
53dbf574da fix minor pedantic warnings 2025-05-04 21:53:28 -07:00
Yann Collet
379f7eb2c8 fixed debug target for collisionsTest 2025-05-04 19:31:03 -07:00
Yann Collet
1248dc724c collisionsTest is now compiled with multiconf.make
and multiconf.make now supports both *.cpp and *.cc C++ source files.
2025-05-04 17:33:26 -07:00
Yann Collet
0e31b789f5 make -C tests finally compatible with -j
and uses multiconf.make
2025-05-04 15:56:17 -07:00
musvaage
2be8ba6cd1 typos 2025-04-25 09:07:49 -05:00
Yann Collet
293590a7f5 faster small input tests 2025-02-04 17:24:06 -08:00
Yann Collet
dbea33e47e added benchHash_avx512 target 2024-08-17 12:32:27 -07:00
Yann Collet
282f39afc7 proper argument order for calloc()
count, then width
2024-05-13 18:07:32 -07:00
Yann Collet
a9b2f18115 Merge pull request #894 from hltj/dev
Fix a typo that cause inconsistent hash between streaming and stateless way for XXH3 128-bit variant with custom secret and seed 0
2024-05-07 16:18:32 -07:00
Yann Collet
4b5573cbc7 fix #926
code fix suggested by @tansy
2024-03-21 15:50:21 -07:00
hltj
a80064036c add test cases for that _withSecretandSeed is the same as _withSeed() when len <= XXH3_MIDSIZE_MAX 2023-11-05 00:45:59 +08:00
Yann Collet
24a05ff503 allow collision tester to run in 32-bit mode
though it's hardly useful,
but it allows CI to run runtime tests.
2023-07-24 15:59:32 +02:00
Yann Collet
284fdb14a8 fix MINGW 2023-07-24 14:25:29 +02:00
Yann Collet
90e54a21ea fixed minor conversion warning
and added runtime tests for collision tester.
2023-07-23 02:26:24 +02:00
Yann Collet
981414861b filter memory reduction
after bit tracing stage
2023-07-23 00:09:11 +02:00
Yann Collet
41b6a0a7f3 updated filter layout for faster performance 2023-07-22 23:54:43 +02:00
Yann Collet
aa255a4b7f align the filter on cache lines 2023-07-22 23:54:43 +02:00
Takayuki Matsuoka
e592478eea add: cli: --ignore-missing
- Add `--ignore-missing` option for `xxhsum`.
- Add test script `tests/cli-ignore-missing.sh` and related `Makefile` entries.
  - Note that we still don't have CLI test entry in our CI.

`xxhsum` returns failure exit code when

- `--ignore-missing` is presented.
- Checksum file is specified.
- But `XSUM_checkFile()` doesn't read actual file (may) due to `--ignore-missing`

If so, `xxhsum` reports `no file was verified` with failure exit code.

<details><summary>`--ignore-missing` related code in `digest.c`</summary>
- 2f1cffe07a/src/digest.c (L190-L191)
- 2f1cffe07a/src/digest.c (L362)
- 2f1cffe07a/src/digest.c (L380)
- 2f1cffe07a/src/digest.c (L506)
- 2f1cffe07a/src/digest.c (L978-L982)
- 2f1cffe07a/src/digest.c (L1236-L1240)
- 2f1cffe07a/src/digest.c (L1325-L1328)
- 2f1cffe07a/src/digest.c (L1429-L1431)
- 2f1cffe07a/src/digest.c (L1558-L1564)
</details>
2023-07-10 17:43:40 +09:00
Yann Collet
1b8956d8e4 fixed minor warnings 2023-07-03 14:51:57 +02:00
Takayuki Matsuoka
0691980f72 Add test for # comment lines 2023-06-17 20:37:02 +09:00
Takayuki Matsuoka
25dfa1aab7 Add Makefile entry and gitignore for sanity_test
make check
Depends (invokes) test_sanity

make test_sanity
Invokes make -C tests test_sanity

make -C tests test_sanity
Create and execute tests/sanity_test

make -C tests sanity_test_vectors.h
Create and execute tests/sanity_test_vectors_generator.
It generates tests/sanity_test_vectors.h.
2023-03-11 22:28:04 +09:00
Takayuki Matsuoka
9c377f5a20 Create sanity_test.c
Note: sanity_test.c depends sanity_test_vectors.h which has generated by sanity_test_vectors_generator.c.
2023-03-11 22:25:07 +09:00
Takayuki Matsuoka
464645e762 Create sanity_test_vectors.h 2023-03-11 22:24:17 +09:00
Takayuki Matsuoka
94ddfec147 Add sanity test vector generator
sanity_test_vectors_generator.c generates sanity_test_vectors.h
2023-03-11 22:24:03 +09:00
Haojian Zhuang
dde858b9a2 fix issues reported by cppcheck
Run command "make clean cppcheck".

---- static analyzer - cppcheck ----
cppcheck . --force --enable=warning,portability,performance,style --error-exitcode=1 > /dev/null
cli/xsum_os_specific.c:220:9: style: The scope of the variable 'ret' can be reduced. [variableScope]
    int ret;
        ^
cli/xsum_sanity_check.c:571:19: style: Condition 'len>0' is always true [knownConditionTrueFalse]
    } else if (len>0) {
                  ^
cli/xsum_sanity_check.c:569:13: note: Assuming that condition 'len==0' is not redundant
    if (len == 0) {
            ^
cli/xsum_sanity_check.c:571:19: note: Condition 'len>0' is always true
    } else if (len>0) {
                  ^
tests/bench/benchHash.c:112:55: error: Uninitialized variables: result.internal_never_ever_use_directly, result.error_result_never_ever_use_directly, result.error_tag_never_ever_use_directly [uninitvar]
    BMK_runTime_t const runTime = BMK_extract_runTime(result);
                                                      ^
tests/bench/benchHash.c:107:12: note: Assuming condition is false
    while (!BMK_isCompleted_TimedFn(txf)) {
           ^
tests/bench/benchHash.c:107:12: note: Assuming condition is false
    while (!BMK_isCompleted_TimedFn(txf)) {
           ^
tests/bench/benchHash.c:107:12: note: Assuming condition is false
    while (!BMK_isCompleted_TimedFn(txf)) {
           ^
tests/bench/benchHash.c:112:55: note: Uninitialized variables: result.internal_never_ever_use_directly, result.error_result_never_ever_use_directly, result.error_tag_never_ever_use_directly
    BMK_runTime_t const runTime = BMK_extract_runTime(result);
                                                      ^
tests/bench/benchfn.c:95:12: error: Uninitialized variable: outcome.error_result_never_ever_use_directly [uninitvar]
    return outcome;
           ^
tests/collisions/main.c:209:14: style: Same expression on both sides of '<='. [duplicateExpression]
    assert(m <= m);
             ^
make: *** [Makefile:387: cppcheck] Error 1

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2022-10-19 13:10:12 +08:00
Yann Collet
d278c2e1d4 test filename-escape
This is PR #699 from @t-mat,
which was blocked by a file permission issue.
Retrying it here.
2022-05-05 18:56:15 -07:00
Takayuki Matsuoka
f1f2ff9133 Add test script and Makefile entry for filename escape 2022-04-04 19:53:17 +09:00
Yann Collet
f035303b8a updated copyright years 2021-12-08 11:04:22 -08:00
Dimitris Apostolou
b802f53487 Fix typos 2021-11-13 11:02:14 +02:00
Takayuki Matsuoka
5616f1eb14 Add executable permission 2021-08-28 03:21:25 +09:00
Takayuki Matsuoka
eeb1cde87f Import unicode_lint.sh from lz4/lz4#1020
unicode_lint.sh is originally written by @servusdei2018
2021-08-28 03:21:25 +09:00
Yann Collet
81d343d04b check multiple inclusions of XXH_INLINE_ALL
and tidy up code.
2021-08-23 11:59:03 -07:00
Yann Collet
3231cdfb15 XXH_INLINE_ALL can be declared after XXH_NAMESPACE
It's now available again,
and tested with `multiInclude` test
2021-08-23 11:45:34 -07:00
Yann Collet
e523b457b5 blindfix for mingw32 conversion warning 2021-08-17 15:31:05 -07:00
Yann Collet
f657e87c91 fix minor conversion warnings 2021-08-17 09:08:03 -07:00
Yann Collet
c11b0b96f8 fix #563
ensure that building test tools preserves compilation flags
including -std=c99 and -std=c++11
when invoked with CFLAGS pre-set
so that it properly compiles with gcc <= 4.8 .

reported by @t-mat.
2021-08-17 08:58:09 -07:00
Yann Collet
00b7bd1243 regroup all xxhsum files into cli/ 2021-07-12 22:34:34 -07:00
P.M
34b51c52b9 Update multiInclude.c 2021-03-12 09:57:40 +02:00
Yann Collet
b23f2e19e5 simplify XXH3 reset
single function XXH3_reset_internal()
2020-12-09 15:40:03 -08:00
Yann Collet
4c881f796d fix minor warning 2020-11-26 15:04:08 -08:00
Yann Collet
758ed175ae do not display collision hash values by default 2020-11-26 15:02:33 -08:00
Yann Collet
88c11374f2 display boundaries of small tests 2020-11-26 10:19:04 -08:00
easyaspi314 (Devin)
fdf2e840cb Fix Unicode test
Now uses XXH_INLINE_ALL.
2020-09-16 22:41:36 -04:00
Yann Collet
cd59de7b58 fix altivec.h redefinition issue
fix #426
2020-07-23 16:37:57 -07:00
Yann Collet
2c992d0cc7 merge xxh3 implementation within xxhash.h
xxh3.h is no longer necessary
but remains available,
in case some programs do #include "xxh3.h" directly.

Also : bumped version number to v0.8.0
2020-07-23 10:24:51 -07:00
Yann Collet
49a4dd0c43 benchhash : removed fractional part 2020-06-20 07:52:56 -07:00