Starting after #1441, which fixed #1440, there is a new failing test on Windows with GIX_TEST_IGNORE_ARCHIVES=1
, in addition to those that had failed before (#1358).
The new failing test is:
FAIL [ 9.690s] gix-diff-tests::diff tree::changes::to_obtain_tree::many_different_states
This is one of the text using the affected fixtures to which the changes in #1441 applied.
Only Windows is affected, all tests still pass on Windows when GIX_TEST_IGNORE_ARCHIVES=1
is not used, and no unexpected untracked files are created on any system (at least on Windows, Ubuntu, or macOS).
This is to say that #1441 does appear to have fully fixed #1440, but unfortunately has also produced a test suite regression, on Windows only, for tree::changes::to_obtain_tree::many_different_states
in gix-diff-tests::diff
, when the use of pre-generated archives is suppressed with GIX_TEST_IGNORE_ARCHIVES=1
.
Full output for this test run, as well as the full error summary (which otherwise lists the same tests as #1358), can be seen in this new gist.
Cleaning ignored files again, and then entering the gix-diff/tests/tree
directory and running tests from there with GIX_TEST_IGNORE_ARCHIVES=1
and RUST_BACKTRACE=full
, shows some more information about the failing test:
ek@Glub MINGW64 ~/source/repos/gitoxide/gix-diff/tests/tree (main)
$ RUST_BACKTRACE=full GIX_TEST_IGNORE_ARCHIVES=1 cargo nextest run --no-fail-fast
Compiling ...
Finished `test` profile [unoptimized + debuginfo] target(s) in 31.69s
Starting 29 tests across 1 binary (run ID: 7b4bab58-fd42-4866-8912-cf4d5d6ba678, nextest profile: default)
PASS [ 0.106s] gix-diff-tests::diff blob::pipeline::convert_to_diffable::above_large_file_threshold
PASS [ 0.100s] gix-diff-tests::diff blob::pipeline::convert_to_diffable::binary_below_large_file_threshold
PASS [ 0.081s] gix-diff-tests::diff blob::pipeline::convert_to_diffable::simple
PASS [ 0.070s] gix-diff-tests::diff blob::pipeline::convert_to_diffable::worktree_filter
PASS [ 0.088s] gix-diff-tests::diff blob::pipeline::convert_to_diffable::non_existing
PASS [ 0.223s] gix-diff-tests::diff rewrites::tracker::copy_by_similarity_reports_limit_if_encountered
PASS [ 0.243s] gix-diff-tests::diff rewrites::tracker::copy_by_id_search_in_all_sources
PASS [ 0.264s] gix-diff-tests::diff rewrites::tracker::copy_by_id
PASS [ 0.018s] gix-diff-tests::diff rewrites::tracker::rename_by_id
PASS [ 0.317s] gix-diff-tests::diff blob::platform::diff_skipped_due_to_external_command_and_enabled_option
PASS [ 0.019s] gix-diff-tests::diff rewrites::tracker::rename_by_similarity_reports_limit_if_encountered
PASS [ 0.267s] gix-diff-tests::diff rewrites::tracker::remove_only
PASS [ 0.318s] gix-diff-tests::diff blob::platform::source_and_destination_do_not_exist
PASS [ 0.325s] gix-diff-tests::diff blob::platform::resources_of_worktree_and_odb_and_check_link
PASS [ 0.332s] gix-diff-tests::diff blob::platform::invalid_resource_types
PASS [ 0.346s] gix-diff-tests::diff blob::platform::diff_performed_despite_external_command
PASS [ 0.273s] gix-diff-tests::diff rewrites::tracker::rename_by_50_percent_similarity
PASS [ 0.371s] gix-diff-tests::diff blob::platform::diff_binary
PASS [ 0.333s] gix-diff-tests::diff rewrites::tracker::add_only
PASS [ 0.406s] gix-diff-tests::diff blob::pipeline::convert_to_diffable::binary_by_buffer_inspection
PASS [ 0.328s] gix-diff-tests::diff rewrites::tracker::copy_by_50_percent_similarity
PASS [ 0.315s] gix-diff-tests::diff rewrites::tracker::copy_by_id_in_additions_only
PASS [ 1.164s] gix-diff-tests::diff blob::pipeline::convert_to_diffable::with_driver
PASS [ 3.497s] gix-diff-tests::diff tree::changes::to_obtain_tree::interesting_rename
PASS [ 7.080s] gix-diff-tests::diff tree::changes::to_obtain_tree::maximal_difference_nested
PASS [ 7.102s] gix-diff-tests::diff tree::changes::to_obtain_tree::maximal_difference
PASS [ 7.201s] gix-diff-tests::diff tree::changes::to_obtain_tree::interesting_rename_2
FAIL [ 7.550s] gix-diff-tests::diff tree::changes::to_obtain_tree::many_different_states
--- STDOUT: gix-diff-tests::diff tree::changes::to_obtain_tree::many_different_states ---
running 1 test
test tree::changes::to_obtain_tree::many_different_states ... FAILED
failures:
failures:
tree::changes::to_obtain_tree::many_different_states
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 28 filtered out; finished in 7.53s
--- STDERR: gix-diff-tests::diff tree::changes::to_obtain_tree::many_different_states ---
thread 'tree::changes::to_obtain_tree::many_different_states' panicked at gix-diff\tests\tree\mod.rs:259:13:
assertion `left == right` failed: :100644 120000 13c2aca72ab576cb5f22dc8e7f8ba8ddab553a8a 2e65efe2a145dda7ee51d1741299f848e5bf752e T f/f
left: [Modification { previous_entry_mode: EntryMode(16384), previous_oid: Sha1(849bd76db90b65ebbd2e6d3970ca70c96ee5592c), entry_mode: EntryMode(16384), oid: Sha1(3b287f8730c81d0b763c2d294618a5e32b67b4f8), path: "f" }, Modification { previous_entry_mode: EntryMode(33188), previous_oid: Sha1(13c2aca72ab576cb5f22dc8e7f8ba8ddab553a8a), entry_mode: EntryMode(33188), oid: Sha1(e69de29bb2d1d6434b8b29ae775ad8c2e48c5391), path: "f/f" }]
right: [Modification { previous_entry_mode: EntryMode(16384), previous_oid: Sha1(849bd76db90b65ebbd2e6d3970ca70c96ee5592c), entry_mode: EntryMode(16384), oid: Sha1(7e26dba59b6336f87d1d4ae3505a2da302b91c76), path: "f" }, Modification { previous_entry_mode: EntryMode(33188), previous_oid: Sha1(13c2aca72ab576cb5f22dc8e7f8ba8ddab553a8a), entry_mode: EntryMode(40960), oid: Sha1(2e65efe2a145dda7ee51d1741299f848e5bf752e), path: "f/f" }]
stack backtrace:
0: 0x7ff60ad88558 - std::backtrace_rs::backtrace::dbghelp64::trace
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:91
1: 0x7ff60ad88558 - std::backtrace_rs::backtrace::trace_unsynchronized
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
2: 0x7ff60ad88558 - std::sys_common::backtrace::_print_fmt
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\sys_common\backtrace.rs:68
3: 0x7ff60ad88558 - std::sys_common::backtrace::_print::impl$0::fmt
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\sys_common\backtrace.rs:44
4: 0x7ff60adaa6d9 - core::fmt::rt::Argument::fmt
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\core\src\fmt\rt.rs:165
5: 0x7ff60adaa6d9 - core::fmt::write
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\core\src\fmt\mod.rs:1157
6: 0x7ff60ad838e1 - std::io::Write::write_fmt<std::sys::pal::windows::stdio::Stderr>
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\io\mod.rs:1832
7: 0x7ff60ad88336 - std::sys_common::backtrace::print
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\sys_common\backtrace.rs:34
8: 0x7ff60ad8b2a8 - std::panicking::default_hook::closure$1
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\panicking.rs:271
9: 0x7ff60ad8af17 - std::panicking::default_hook
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\panicking.rs:298
10: 0x7ff60ad8b7d8 - std::panicking::rust_panic_with_hook
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\panicking.rs:795
11: 0x7ff60ad8b697 - std::panicking::begin_panic_handler::closure$0
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\panicking.rs:664
12: 0x7ff60ad88ecf - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\sys_common\backtrace.rs:171
13: 0x7ff60ad8b348 - std::panicking::begin_panic_handler
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\panicking.rs:652
14: 0x7ff60adb4c34 - core::panicking::panic_fmt
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\core\src\panicking.rs:72
15: 0x7ff60adb50a5 - core::panicking::assert_failed_inner
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\core\src\panicking.rs:404
16: 0x7ff60a905af2 - core::panicking::assert_failed<alloc::vec::Vec<enum2$<gix_diff::tree::recorder::Change>,alloc::alloc::Global>,alloc::vec::Vec<enum2$<gix_diff::tree::recorder::Change>,alloc::alloc::Global> >
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081\library\core\src\panicking.rs:364
17: 0x7ff60a92352c - diff::tree::changes::to_obtain_tree::many_different_states
at C:\Users\ek\source\repos\gitoxide\gix-diff\tests\tree\mod.rs:259
18: 0x7ff60a8f6c88 - diff::tree::changes::to_obtain_tree::many_different_states::closure$0
at C:\Users\ek\source\repos\gitoxide\gix-diff\tests\tree\mod.rs:156
19: 0x7ff60a91bc52 - core::ops::function::FnOnce::call_once<diff::tree::changes::to_obtain_tree::many_different_states::closure_env$0,tuple$<> >
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081\library\core\src\ops\function.rs:250
20: 0x7ff60a991810 - core::ops::function::FnOnce::call_once
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\core\src\ops\function.rs:250
21: 0x7ff60a991810 - test::__rust_begin_short_backtrace<enum2$<core::result::Result<tuple$<>,alloc::string::String> >,enum2$<core::result::Result<tuple$<>,alloc::string::String> > (*)()>
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\test\src\lib.rs:623
22: 0x7ff60a990732 - test::run_test::closure$0
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\test\src\lib.rs:569
23: 0x7ff60a94f26b - test::run_test::closure$1
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\test\src\lib.rs:597
24: 0x7ff60a94f26b - std::sys_common::backtrace::__rust_begin_short_backtrace<test::run_test::closure_env$1,tuple$<> >
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\sys_common\backtrace.rs:155
25: 0x7ff60a954bfd - std::thread::impl$0::spawn_unchecked_::closure$2::closure$0
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\thread\mod.rs:542
26: 0x7ff60a954bfd - core::panic::unwind_safe::impl$25::call_once
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\core\src\panic\unwind_safe.rs:272
27: 0x7ff60a954bfd - std::panicking::try::do_call
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\panicking.rs:559
28: 0x7ff60a954bfd - std::panicking::try
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\panicking.rs:523
29: 0x7ff60a954bfd - std::panic::catch_unwind
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\panic.rs:149
30: 0x7ff60a954bfd - std::thread::impl$0::spawn_unchecked_::closure$2
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\thread\mod.rs:541
31: 0x7ff60a954bfd - core::ops::function::FnOnce::call_once<std::thread::impl$0::spawn_unchecked_::closure_env$2<test::run_test::closure_env$1,tuple$<> >,tuple$<> >
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\core\src\ops\function.rs:250
32: 0x7ff60ad9943d - alloc::boxed::impl$48::call_once
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\alloc\src\boxed.rs:2022
33: 0x7ff60ad9943d - alloc::boxed::impl$48::call_once
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\alloc\src\boxed.rs:2022
34: 0x7ff60ad9943d - std::sys::pal::windows::thread::impl$0::new::thread_start
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\sys\pal\windows\thread.rs:52
35: 0x7ff99a4f7374 - BaseThreadInitThunk
36: 0x7ff99a63cc91 - RtlUserThreadStart
PASS [ 7.550s] gix-diff-tests::diff tree::changes::to_obtain_tree::many_different_states_nested
------------
Summary [ 7.934s] 29 tests run: 28 passed, 1 failed, 0 skipped
FAIL [ 7.550s] gix-diff-tests::diff tree::changes::to_obtain_tree::many_different_states
error: test run failed
I've omitted compilation details from that run, which are probably not interesting, but the full unedited output can, if wanted, be seen in this other gist.
I showed the full traceback above, but only to confirm that it seems unremarkable. It seems the key information is in the assertion failure message itself:
thread 'tree::changes::to_obtain_tree::many_different_states' panicked at gix-diff\tests\tree\mod.rs:259:13:
assertion `left == right` failed: :100644 120000 13c2aca72ab576cb5f22dc8e7f8ba8ddab553a8a 2e65efe2a145dda7ee51d1741299f848e5bf752e T f/f
left: [Modification { previous_entry_mode: EntryMode(16384), previous_oid: Sha1(849bd76db90b65ebbd2e6d3970ca70c96ee5592c), entry_mode: EntryMode(16384), oid: Sha1(3b287f8730c81d0b763c2d294618a5e32b67b4f8), path: "f" }, Modification { previous_entry_mode: EntryMode(33188), previous_oid: Sha1(13c2aca72ab576cb5f22dc8e7f8ba8ddab553a8a), entry_mode: EntryMode(33188), oid: Sha1(e69de29bb2d1d6434b8b29ae775ad8c2e48c5391), path: "f/f" }]
right: [Modification { previous_entry_mode: EntryMode(16384), previous_oid: Sha1(849bd76db90b65ebbd2e6d3970ca70c96ee5592c), entry_mode: EntryMode(16384), oid: Sha1(7e26dba59b6336f87d1d4ae3505a2da302b91c76), path: "f" }, Modification { previous_entry_mode: EntryMode(33188), previous_oid: Sha1(13c2aca72ab576cb5f22dc8e7f8ba8ddab553a8a), entry_mode: EntryMode(40960), oid: Sha1(2e65efe2a145dda7ee51d1741299f848e5bf752e), path: "f/f" }]
The failing assertion is:
#1441 included these changes to gix-diff/tree/mod.rs
, specifically in the many_different_states
test function, that removed Windows-specific expected values of some hexadecimal Git object IDs. It changed what was previously:
It was changed to just:
These changes are to expected values used in the specific assertion that failed. So it seems like this is the cause of the new failure.
That change was originally not included in #1441, but was added in the force push from https://github.com/Byron/gitoxide/commit/2f693892196306ba4503d0b79166a9d2647f0f0a to https://github.com/Byron/gitoxide/commit/f5a9884006b0ea8d22cc51a119ae87ce10cd3484. It seems it was added to fix this many_different_states
test failure on Windows, and that it was effective at fixing that.
CI does not currently run Windows tests with GIX_TEST_IGNORE_ARCHIVES=1
. So the mismatch between the generated repo's object IDs is--as one one would expect given that it doesn't look like there is a problem in the gitoxide code under test--a real mismatch that occurs across operating systems when the test fixture script is run.
It looks like the test suite bug described in #1440 was actually inadvertently protecting against a condition where assertions were dependent on which operating system ran the test fixture script. Because the archive was always regenerated, the OIDs specific to the current operating system were always used, and thus correct. Fixing the bug created a situation where the committed archive would be usable but contain OIDs differing from those on Windows. Then, the test case would either:
- Assert OS-specific OIDs and fail on Windows when
GIX_TEST_IGNORE_ARCHIVES=1
is not used, as was the case prior to the PR force push cited above. - Assert non-Windows OIDs on all systems and fail on Windows when
GIX_TEST_IGNORE_ARCHIVES=1
is used, as is the case now.