GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test_workspacebuilder.py won't finish - no error message · Issue #620 · tmux-python/tmuxp

test_workspacebuilder.py won't finish - no error message #620

New issue
Copy link
New issue
Copy link
Closed
#783
#774
Closed
test_workspacebuilder.py won't finish - no error message#620
#783
#774
Copy link
Assignees
tony
Labels
bugSomething isn't workingSomething isn't working
Milestone
Milestone 1.12

Description

@aRkedos
aRkedos
opened on Aug 2, 2020
Issue body actions

Step 1: Provide a summary of your problem

I was trying to run the tests with make test and the workspacebuilder_test seems to run endlessly (did have it running for more than 10 minutes, 2 times) before exiting with C-c.

Sorry if that is a bit too unspecific but I am not that expierienced with tests. So I'll gladly take advice. The reason for running the tests is that I am working on an issue / feature request.

Edit: okay I narrowed it down to the def pane_order_test(). I marked it to be skipped. All other tests pass.
Edit2: I narrowed it down further: the while loop in the test, at least for me, leads to an infinite loop because the breaking condition of if p.current_path == pane_path is never met, it always compares /usr/bin vs. /usr/sbin.

Step 2: Provide tmuxp details

  • Python version 3.8.3
  • system PATH
  • tmux version 3.1b
  • tmuxp version 1.5.5
  • tmux path
  • tmuxp path home/arkedos/Documents/git/tmuxp-dev/bin/tmuxp (virtualenv)
  • libtmux version 0.8.2
  • shell - zsh

Step 3: Describe your environment

  • Architecture: x86_64
  • OS version: Manjaro Linux 20.2 Kernel 5.8 RC

Step 4: Describe the problem:

Steps to reproduce:

  1. run make test
  2. wait...
  3. hit C-c to exit after 10+ Minutes

Observed Results:

  • What happened? This could be a description, log output, etc.
    Not sure what to provide here since I am not that expierenced with tests. So advice is needed.

Expected Results:

  • What did you expect to happen?
    To finish all tests.

Relevant Code:

Did not make changes to testing code.

Activity

Next
  1. aRkedos
    changed the title [-]workspace_builder test[/-] [+]workspacebuilder_test won't finish - no error message[/+] on Aug 2, 2020
  2. aRkedos
    changed the title [-]workspacebuilder_test won't finish - no error message[/-] [+]test_workspacebuilder.py won't finish - no error message[/+] on Aug 2, 2020
  3. tony
    self-assigned this
    on Aug 22, 2020
  4. joseph-flinn
    added
    bugSomething isn't workingSomething isn't working
    on Jan 18, 2021
  5. jerri commented on Apr 29, 2021

    @jerri
    jerri
    on Apr 29, 2021
    Contributor
    More actions

    I am not sure if I have the same problem, but I could reproduce and analyse the problem to be connected to the test test_automatic_rename_option. I am executing the tests on my mac. The test checks for the name sh for the window. But for some reasons executing sh leads to a window name of bash. At least in my case. This leads to the check to run forever(?), although the retry()-check should, as far as I understood, prevent the test to stay in an endless loop. But there we are.

    Unfortunately I am not quite sure why it is happening and therefore don't have a good idea how to fix it. One probably would have to change the test to instead of using sh, maybe should use a different shell-command (e.g. top which is also used in other tests, I saw). Maybe this would correct the problem. But I have to admit, I don't fully understand the test, as I don't fully understand what feature the rename-option actually provides.

    I still hope this little analysis helps to fix the test.

  6. Avimitin commented on Apr 19, 2022

    @Avimitin
    Avimitin
    on Apr 19, 2022
    More actions

    This bug still exist. I am running the test in QEMU environment with 1.10.1 version, and it still running in infinite loop. This is because the tmux windows in QEMU output the qemu executable name.

    I write some print statement in the test, this is the variable w.name output.

    image

    And it cause the infinite loop.

    image

  7. Avimitin
    added a commit that references this issue on Apr 19, 2022

    Update noqemu list

    5f245f6
  8. tony commented on Apr 19, 2022

    @tony
    tony
    on Apr 19, 2022
    Member
    More actions

    Perhaps if test_automatic_rename_option were skipped or we added a max retry to it.

  9. tony commented on Apr 19, 2022

    @tony
    tony
    on Apr 19, 2022
    Member
    More actions

    @avimtin @jerri @aRkedos

    Is there a common denominator between your 3 cases, maybe?

    • Your platform (if not otherwise stated)
    • which sh
    • man sh
    • sh -h
    • sh --help

    It is looking like the sh command may not be reliable for window naming.

  10. tony
    added a commit that references this issue on Apr 19, 2022

    tests: Use "man ls" instead of "sh"

    27ae500
  11. tony
    added this to tmuxpon Apr 19, 2022
  12. tony
    moved this to In Progress in tmuxpon Apr 19, 2022
  13. tony
    linked a pull request that will close this issueFix automatic rename #774on Apr 19, 2022
  14. tony
    added a commit that references this issue on Apr 19, 2022

    tests: Use "man ls" instead of "sh"

    bb51440
  15. felixonmars
    added a commit that references this issue on Apr 19, 2022

    Update noqemu list

    e1d833d
  16. 2 remaining items

  17. tony
    added a commit that references this issue on May 21, 2022

    tests: Use "man ls" instead of "sh"

    709dc43
  18. tony
    closed this as completedin #774on May 21, 2022
  19. tony
    added a commit that references this issue on May 21, 2022

    test: Fix automatic rename (#774)

    This issue will close once commit 4435de4 is merged into the 'master' branch.
    4435de4
  20. Repository owner moved this from In Progress to Done in tmuxpon May 21, 2022
  21. tony commented on May 21, 2022

    @tony
    tony
    on May 21, 2022
    Member
    More actions

    @categulario @jerri @Avimitin @aRkedos

    If you try https://github.com/tmux-python/tmuxp/tree/v1.12.0a3 / https://pypi.org/project/tmuxp/1.12.0a3/, does it work now?

  22. tony
    added this to the Milestone 1.12 milestone on May 21, 2022
  23. Avimitin commented on May 26, 2022

    @Avimitin
    Avimitin
    on May 26, 2022
    More actions

    It seems like the libtmux module doesn't have return_until yet:

    E   ImportError: cannot import name 'retry_until' from 'libtmux.test' (/usr/lib/python3.10/site-packages/libtmux/test.py)
    

    I am using python-libtmux 0.11.0.

  24. tony commented on May 26, 2022

    @tony
    tony
    on May 26, 2022
    Member
    More actions

    @Avimitin What version of tmuxp do you have? pip show tmuxp

    What command are you running?

  25. Avimitin commented on May 27, 2022

    @Avimitin
    Avimitin
    on May 27, 2022
    More actions

    I am using the pre-release 1.12.0a5 version. And this error was prompt up when I was running pytest -vv -k "not test_pane_order" command.

  26. categulario commented on May 27, 2022

    @categulario
    categulario
    on May 27, 2022
    Contributor
    More actions

    @tony just for the record. I am still experiencing this. The issue should not be closed. The symptoms are the same, the comparison /usr/bin == /usr/sbin never becomes true and it times out.

    Of course the difference now is that a proper WaitTimeout error raised.

    Reacted by Tony Narlock
  27. categulario commented on May 27, 2022

    @categulario
    categulario
    on May 27, 2022
    Contributor
    More actions

    Ok, I just debugged the problem with this test. Maybe @Avimitin can confirm. In my computer /usr/sbin is just an alias for /usr/bin. I guess the way pane.current_path is calculated resolves the real path in the filesystem, thus causing the error. Since the test is only testing for the names of the paths (the rest of them being correctly set) I propose to just use a path that is less likely to be an alias. Sending PR now

  28. tony
    reopened this on May 27, 2022
  29. tony
    closed this as completedin #783on May 27, 2022
  30. tony
    added a commit that references this issue on May 27, 2022

    fix(tests): use /etc instead of /usr/sbin which could be a symlink (#783

    This issue will close once commit e5ac2b5 is merged into the 'master' branch.
    e5ac2b5
  31. tony commented on May 27, 2022

    @tony
    tony
    on May 27, 2022
    Member
    More actions

    @Avimitin @categulario

    Released in v1.12.0a6 (github, pypi)

    Better now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @tony
    tony

Labels

bugSomething isn't workingSomething isn't working

Type

No type

Projects

  • tmuxp
    Status
    Done
    Show more project fields

Milestone

  • Milestone 1.12No due date

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.