test: remove unicode from tmp test_runner dir #21502

pull jamesob wants to merge 1 commits into bitcoin:master from jamesob:2021-03-testrunner-tmp-no-unicode changing 1 files +2 −1
  1. jamesob commented at 1:50 PM on March 22, 2021: member

    image

    The unicode characters in the temporary test directory paths, while cute, cause inconvenience on remote systems which are not configured to display unicode over tty. Specifically this makes debugging functional test failures on some of the bitcoinperf systems difficult.

  2. test: remove unicode from tmp test_runner dir
    The unicode characters, while cute, cause inconveniences on remote systems
    which are not configured to display unicode over tty.
    c5c57ef937
  3. fanquake added the label Tests on Mar 22, 2021
  4. vasild approved
  5. vasild commented at 2:00 PM on March 22, 2021: member

    ACK c5c57ef93708cf2a63ea37bc0aec4838a3beface

    I see squares when running locally too.

  6. kiminuo commented at 3:24 PM on March 22, 2021: contributor

    The unicode characters in the temporary test directory paths, while cute, cause inconvenience on remote systems which are not configured to display unicode over tty.

    Correct me if I'm wrong but it's not about cuteness but rather about testing that unicode paths are properly supported on all supported platforms, isn't it? There are https://github.com/bitcoin/bitcoin/blob/master/src/test/fs_tests.cpp tests but I still miss information whether we test the same things with this PR as we do on master or not.

  7. jamesob commented at 3:51 PM on March 22, 2021: member

    but rather about testing that unicode paths are properly supported on all supported platforms, isn't it?

    If that is indeed the case, and there are codepaths not covered by fs_tests that are somehow covered by the existing test_runner, then I'm happy to change this to be parameterized by some test_runner.py flag.

  8. vasild commented at 3:56 PM on March 22, 2021: member

    ... but rather about testing that unicode paths are properly supported on all supported platforms ...

    It would be strange to hook tests in the testing framework itself instead of having ordinary proper unit or functional tests that run with e.g. -datadir=foo💣bar.

  9. MarcoFalke commented at 6:33 PM on March 22, 2021: member

    The reason that the test framework path (and not the datadir) includes unicode is because wallet files can reside outside the datadir and we want to check that unicode is properly supported for them as well.

    I don't understand why this is causing so much trouble. Shouldn't autocomplete be able to skip over those chars anyway?

    If you still want to make the changes here, it would be good to overwrite the tmpdirprefix for our ci system, so that at least all ci configs tests unicode paths. Otherwise I'd be less confident about changes like #20744 (which had several failures due to mishandling unicode).

  10. in test/functional/test_runner.py:355 in c5c57ef937
     350 | @@ -351,7 +351,8 @@ def main():
     351 |      logging.basicConfig(format='%(message)s', level=logging_level)
     352 |  
     353 |      # Create base test directory
     354 | -    tmpdir = "%s/test_runner_₿_🏃_%s" % (args.tmpdirprefix, datetime.datetime.now().strftime("%Y%m%d_%H%M%S"))
     355 | +    tmpdir = "%s/test_runner_bitcoincore_%s" % (
     356 | +        args.tmpdirprefix, datetime.datetime.now().strftime("%Y%m%d_%H%M%S"))
    


    MarcoFalke commented at 6:34 PM on March 22, 2021:

    Might be a good time to use f-strings?

  11. kiminuo commented at 6:48 PM on March 22, 2021: contributor

    It would be strange to hook tests in the testing framework itself instead of having ordinary proper unit or functional tests that run with e.g. -datadir=foo💣bar.

    I think Marco answered the question. Using unicode paths instead of ASCII paths is a form of test too and no one needs to write a specific test then for current and future needs - it is somewhat elegant. Anyway, if it were up to me I would have a default unicode path and to make life of @jamesob easier, I would try to add a way to modify that path so that James is happy with an ASCII path.

    The unicode characters in the temporary test directory paths, while cute, cause inconvenience on remote systems which are not configured to display unicode over tty.

    btw: Isn't it possible to configure it properly? I mean that would be an ideal solution.

  12. jamesob commented at 6:52 PM on March 22, 2021: member

    Was able to get what I need with find /tmp -name '*test_runner*' | grep ..., then copy/paste. Auto completion fails given the primitive bash config.

  13. jamesob closed this on Mar 22, 2021

  14. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-27 21:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me