Hi,
On 2026/01/18 18:08, [email protected] wrote:
> Author: brane
> Date: Sun Jan 18 09:08:13 2026
> New Revision: 1931402
>
> Log:
> Add another test for the Adler-32 implementation. All code branches
> should now be covered with tests, even if this new test is a bit
> contrived.
>
> * subversion/libsvn_subr/adler32.c
> (SVN__ADLER32_SIZE_MAX): Do not define this constant if SVN__ADLER32_STATIC
> is defined. This allows adler32-test.c to locally override the maximum
> block size.
>
> * subversion/tests/libsvn_subr/adler32-test.c: Add a comment about sorting
> the constant arrays that contain test inputs.
> (do_random_test): Move common code from the dependent test functions
> that call to here.
> (test_magic_length, test_prime_length, test_power2_length): Rename from
> test_random_magic, test_random_prime and test_random_power2,
> respectively; and just call do_random_test.
> (local_adler32): New, defined implicitly by including adler32.c
> with a modified maximum block size.
> (test_large_size): New test case; exercises the unlikely code branch in
> our Adler-32 implementation.
> (test_funcs): Update the whole array.
>
> Modified:
> subversion/trunk/build/generator/gen_base.py
> subversion/trunk/subversion/libsvn_subr/adler32.c
> subversion/trunk/subversion/tests/libsvn_subr/adler32-test.c
>
> Modified: subversion/trunk/build/generator/gen_base.py
> ==============================================================================
> --- subversion/trunk/build/generator/gen_base.py Sun Jan 18 08:30:14
> 2026 (r1931401)
> +++ subversion/trunk/build/generator/gen_base.py Sun Jan 18 09:08:13
> 2026 (r1931402)
> @@ -1288,6 +1288,9 @@ class IncludeDependencyInfo:
> if os.sep.join(['libsvn_subr', 'cmdline.c']) in fname \
> and 'config_keys.inc' == include_param:
> continue # generated by GeneratorBase.write_config_keys
> + if os.sep.join(['tests', 'libsvn_subr', 'adler32-test.c']) in fname \
> + and '../../libsvn_subr/adler32.c' == include_param:
> + continue # adler32-test.c inludes the source file on purpose
> elif direct_possibility_fname in domain_fnames:
> self._upd_dep_hash(hdrs, direct_possibility_fname, type_code)
> elif (len(domain_fnames) == 1
>
After r1931402, the following warning occurs from gen-make.py on Windows [1].
[[[
Run python ./gen-make.py -t cmake
WARNING: "..\..\libsvn_subr\adler32.c" header not found, file
subversion\tests\libsvn_subr\adler32-test.c
Wrote: subversion/libsvn_subr/errorcode.inc
Wrote: subversion/libsvn_subr/config_keys.inc
]]]
Proposed fix:
[[[
diff --git a/build/generator/gen_base.py b/build/generator/gen_base.py
index db844710f..daa9474ef 100644
--- a/build/generator/gen_base.py
+++ b/build/generator/gen_base.py
@@ -1289,7 +1289,7 @@ class IncludeDependencyInfo:
and 'config_keys.inc' == include_param:
continue # generated by GeneratorBase.write_config_keys
if os.sep.join(['tests', 'libsvn_subr', 'adler32-test.c']) in fname \
- and '../../libsvn_subr/adler32.c' == include_param:
+ and native_path('../../libsvn_subr/adler32.c') == include_param:
continue # adler32-test.c inludes the source file on purpose
elif direct_possibility_fname in domain_fnames:
self._upd_dep_hash(hdrs, direct_possibility_fname, type_code)
]]]
[1]
https://github.com/apache/subversion/actions/runs/21109244883/job/60705323113#step:11:192
--
Jun Omae <[email protected]> (大前 潤)