Skip to content

fedoradev CI fail in test_unit_filedir #1435

@yedayak

Description

@yedayak

Since the update-docker-images job updated the fedoradev test container image, test_26 in test/t/unit/test_unit_compgen_filedir.py started failing there, with these errors:

=========================== short test summary info ============================
FAILED ../../../../test/t/unit/test_unit_compgen_filedir.py::TestUnitCompgenFiledir::test_26[f] - assert <CompletionResult ['\x08\x08\x08\x08$b/h"']> == 'h"'
FAILED ../../../../test/t/unit/test_unit_compgen_filedir.py::TestUnitCompgenFiledir::test_26[f2] - assert <CompletionResult ['\x08\x08\x08\x08$b/h"']> == 'h"'
= 2 failed, 2028 passed, 113 skipped, 23 xfailed, 6 xpassed in 1096.06s (0:18:16) =

Looking at it, this seems to have been an issue in the past since the test, they were disabled for Centos 6 in a1a4eb8, and seem to have been fixed in 726e4c0:

-        # endswith: in CentOS 6 container we get something like this, accept it:
-        #     a\$b/\x08\x08\x08\x08\x08/work/test/fixtures/_filedir/a\$b/h
-        assert completion == r"a$b/h" or completion.output.strip().endswith(
-            "\b\b\b\b%s/_filedir/a\\$b/h" % bash.cwd
-        )
+        assert completion == "h"

Basically the issue as I understand it is that bash "de-quotes" the arguments be removing slashes and double quotes.
Running in the fedoradev test container:

$ f "a\$<TAB>
$ f "a$b"/<TAB>
$ f a\$b/h 

Presumably bash sends backspaces in order to de-quote the arguments.

This test also failed in #1339 which installs bash from homebrew, bash--5.3.3.arm64_sequoia.bottle.1.tar.gz
I can reproduce the behavior locally (but not the failing test) with bash 5.3.3, but not 5.2.37, so presumably something in a bash 5,3 changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions