GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — test_venv.test_special_chars_csh fails on NetBSD · Issue #139308 · python/cpython Closed Labels OS-netbsdtestsTests in the Lib/test dirTests in the Lib/test dirtopic-venvRelated to the venv moduleRelated to the venv moduletype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description:The Configuration./configure --with-pydebug Testhome$ ./python -m test test_venv -m test_special_chars_csh -v == CPython 3.15.0a0 free-threading build (heads/main:e8382e55c57, Sep 23 2025, 21:04:49) [GCC 10.5.0] == NetBSD-10.1-amd64-x86_64-64bit-ELF little-endian == Python build: free_threading debug == cwd: /home/orange/cpython/build/test_python_worker_6821æ == CPU count: 16 == encodings: locale=UTF-8 FS=utf-8 == resources: all test resources are disabled, use -u option to unskip tests Using random seed: 3517063575 0:00:00 load avg: 0.08 Run 1 test sequentially in a single process 0:00:00 load avg: 0.08 [1/1] test_venv test_special_chars_csh (test.test_venv.BasicTest.test_special_chars_csh) Test that the template strings are quoted properly (csh) ... prompt: Undefined variable. ERROR ====================================================================== ERROR: test_special_chars_csh (test.test_venv.BasicTest.test_special_chars_csh) Test that the template strings are quoted properly (csh) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/orange/cpython/Lib/test/test_venv.py", line 544, in test_special_chars_csh out, err = check_output([csh, test_script]) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ File "/home/orange/cpython/Lib/test/test_venv.py", line 58, in check_output raise subprocess.CalledProcessError( p.returncode, cmd, out, err) subprocess.CalledProcessError: Command '['/bin/csh', '/tmp/tmp82wovfyk/test_special_chars.csh']' returned non-zero exit status 1. ---------------------------------------------------------------------- Ran 1 test in 1.969s FAILED (errors=1) test test_venv failed 0:00:02 load avg: 0.15 [1/1/1] test_venv failed (1 error) == Tests result: FAILURE == 1 test failed: test_venv Total duration: 2.3 sec Total tests: run=1 (filtered) Total test files: run=1/1 (filtered) failed=1 Result: FAILURE home$ Reproduceimport os import tempfile import shutil import subprocess import shlex from venv import EnvBuilder def test_original_test_case(): print("\n=== Reproducing original test case ===") csh = shutil.which('tcsh') or shutil.which('csh') if not csh: print("No csh/tcsh found, skipping test") return with tempfile.TemporaryDirectory() as tmpdir: env_name = '";&&$e|"' env_dir = os.path.join(os.path.realpath(tmpdir), env_name) try: builder = EnvBuilder(clear=True) builder.create(env_dir) activate = os.path.join(env_dir, 'bin', 'activate.csh') test_script = os.path.join(tmpdir, 'test_special_chars.csh') with open(test_script, "w") as f: f.write(f'source {shlex.quote(activate)}\n' 'python -c \'import sys; print(sys.executable)\'\n' 'python -c \'import os; print(os.environ["VIRTUAL_ENV"])\'\n' 'deactivate\n') print(f"\nRunning test script with {csh}:") try: result = subprocess.run([csh, test_script], capture_output=True, text=True, timeout=10) print(f"Return code: {result.returncode}") if result.returncode == 0: print(f"Output: {result.stdout}") else: print(f"Error: {result.stderr}") except Exception as e: print(f"Error running test: {e}") except Exception as e: print(f"Error in test case: {e}") if __name__ == "__main__": test_original_test_case() Output: home: {5} ./python reproducer.py
=== Reproducing original test case ===
Running test script with /bin/csh:
Return code: 1
Error: prompt: Undefined variable.
home: {6} echo $SHELL
/bin/csh# This FAILS with "Unmatched ." error /bin/csh -c 'echo "Testing: \";&&$e|\""' # This FAILS with "e: Undefined variable." error /bin/csh -c 'echo "Testing: '\'';&&$e|'\''"' # This WORKS correctly /bin/csh -c 'echo '\''";&&$e|"'\''' CPython versions tested on:CPython main branch, 3.15, 3.14, 3.13 Operating systems tested on:Other Linked PRs
Activity
MetadataMetadataAssigneesLabelsOS-netbsdtestsTests in the Lib/test dirTests in the Lib/test dirtopic-venvRelated to the venv moduleRelated to the venv moduletype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue 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. |