Skip to content

Conversation

@w0xlt
Copy link
Contributor

@w0xlt w0xlt commented Jan 8, 2026

Currently, the wallet_multiwallet.py and feature_unsupported_utxo_db.py functional tests are disabled on CI because they rely on legacy wallet binaries that do not correctly handle Unicode paths.

This is tracked as a TODO in .github/workflows/ci.yml. The limitation also blocks efforts to expand ancient wallet test coverage (e.g. #33186).

This PR restores functional test coverage on Windows CI by addressing two root causes:

  1. Skip Windows-incompatible tests in wallet_multiwallet: Several test cases depend on Unix-specific filesystem behavior that is not supported on Windows:

    • Directory permission tests using chmod (Windows ignores os.chmod(path, 0))
    • Recursive directory symlink tests (unsupported by listwalletdir)
    • File symlink detection tests (Windows handles file symlinks differently)
  2. Use ASCII-only tmpdir for old binary tests: When running tests against previous releases (feature_unsupported_utxo_db, wallet_multiwallet) on Windows, an ASCII-only temporary directory name (test_runner_btc_run_) is used instead of test_runner_₿_🏃_. This avoids failures caused by older binaries lacking proper Unicode path support.

@DrahtBot DrahtBot added the Tests label Jan 8, 2026
@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 8, 2026

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34233.

Reviews

See the guideline for information on the review process.
A summary of reviews will appear here.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #34168 (qa: Require --exclude for each excluded test by hebasto)
  • #31410 (qa: Fix wallet_multiwallet.py by hebasto)
  • #19461 (multiprocess: Add bitcoin-gui -ipcconnect option by ryanofsky)
  • #19460 (multiprocess: Add bitcoin-wallet -ipcconnect option by ryanofsky)
  • #10102 (Multiprocess bitcoin by ryanofsky)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

# Create base test directory
# Use ASCII-only path when running tests with old binaries (e.g. v0.14.3) that
# don't handle Unicode on Windows. Only affects runs that include such tests.
old_binary_tests = ('feature_unsupported_utxo_db', 'wallet_multiwallet')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fail to see where wallet_multiwallet loads an old 14.3 binary (or any old binary), so this comment seems to be wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Thanks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this is still globally disabling unicode tests on Windows, just to run a single edge-case test feature_unsupported_utxo_db.py. I'd say unicode tests are more important than this test, and this test could trivially be run sequentially after the other tests, if there was need to.

It seems a bit invasive to change the test framework to work around a single prev-releases test on a single platform.

My preference would be to leave this as-is for now, and either leave the test excluded, or just run it sequentially with a tmpdir overridden for just this test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated test_runner.py to use an ASCII-only tmpdir path specifically for feature_unsupported_utxo_db.py on Windows.
Everything else remains unchanged.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, there's no change to the Unicode path. The PR still adds both feature_unsupported_utxo_db.py and wallet_multiwallet.py to CI.

Skip several tests that don't work correctly on Windows:

1. chmod-based no_access test: Windows does not support Unix-style
   file permissions via os.chmod(). Setting chmod(path, 0) doesn't
   actually make the directory inaccessible.

2. recursive_dir_symlink test: Skip recursive directory symlink test
   on Windows as directory symlinks behave differently.

3. w8_symlink test: File symlinks behave differently on Windows and
   don't trigger the expected "Invalid -wallet path" error.

4. Error message check: Use "filesystem error:" for all platforms
   since the cross-compiled MinGW build produces the same error
   format as Linux/macOS.
@w0xlt w0xlt force-pushed the ascii-only-tmpdir branch from dc3f958 to ed816f8 Compare January 8, 2026 20:28
…indows

On Windows, use an ASCII-only tmpdir path specifically for
feature_unsupported_utxo_db.py, which uses old v0.14.3 binaries that
don't handle Unicode paths properly. All other tests continue to use
the Unicode path (test_runner_₿_🏃_) to preserve Unicode path testing.
@fanquake
Copy link
Member

fanquake commented Jan 9, 2026

Note that re-enabling wallet_multiwallet was also attempted in #31410, but progress there seemed to stall.

# On Windows, use ASCII-only path for tests that use old binaries (e.g. v0.14.3)
# which don't handle Unicode paths properly.
if platform.system() == 'Windows' and test_argv[0] == 'feature_unsupported_utxo_db.py':
ascii_tmpdir = "{}/test_runner_ascii_{}".format(tempfile.gettempdir(), datetime.datetime.now().strftime("%Y%m%d_%H%M%S"))
Copy link
Member

@maflcko maflcko Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will now silently (and without any way to change it), pick a different tmpdirprefix.

I understand that this only happens on Windows, and only for a single test, and only when the previous releases have been downloaded.

However, this feels a bit like a layer violation, and all of this temporary code will have to be maintained and removed later on.

I've implemented my alternative in https://www.github.com/bitcoin/bitcoin/pull/34240/changes/671303af2e2bad2bda992ad783654d06c3a1d36e

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this assessment. We can move forward with #34240.

@w0xlt
Copy link
Contributor Author

w0xlt commented Jan 9, 2026

Closing it in favor of #34240

@w0xlt w0xlt closed this Jan 9, 2026
@w0xlt w0xlt deleted the ascii-only-tmpdir branch January 9, 2026 16:14
@hebasto
Copy link
Member

hebasto commented Jan 9, 2026

@w0xlt

Closing it in favor of #34240

The #34240 only addresses an issue with feature_unsupported_utxo_db.py. Why closing this PR with the rest of your patch?

@maflcko
Copy link
Member

maflcko commented Jan 9, 2026

Yeah, I haven't looked at the other commit, but it may be fine.

Seems fine to re-open this and put in draft for now. Once it conflicts with master, you can just rebase it, and move it out of draft again.

@w0xlt w0xlt restored the ascii-only-tmpdir branch January 16, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants