Skip to content

Tests fails in environments where XDG_DATA_HOME is set #285400

@mizdra

Description

@mizdra

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.108.0 (main branch)
  • OS Version: macOS 26.1

Steps to Reproduce:

  1. cd vscode; git checkout 93d270ffb8c
  2. export XDG_DATA_HOME="/Users/mizdra/.local/share"; ./scripts/test.sh --run 'vs/workbench/contrib/terminalContrib/history/test/common/history.test.js' --grep fetchFishHistory

Actual behavior

$ export XDG_DATA_HOME="/Users/mizdra/.local/share"; ./scripts/test.sh --run 'vs/workbench/contrib/terminalContrib/history/test/common/history.test.js' --grep fetchFishHistory

> code-oss-dev@1.108.0 electron
> node build/lib/electron.ts

Found --crash-reporter-directory argument. Setting crashDumps directory to be '/Users/mizdra/src/github.com/microsoft/vscode/.build/crashes'
[25827:1230/171505.523859:INFO:CONSOLE:2] "The vm module of Node.js is unsupported in Electron's renderer process due to incompatibilities with the Blink rendering engine. Crashes are likely and avoiding the module is highly recommended. This module may be removed in a future release.", source: node:electron/js2c/renderer_init (2)
[25827:1230/171505.601638:INFO:CONSOLE:2] "Platform browser has already been set. Overwriting the platform with [object Object].", source: /Users/mizdra/src/github.com/microsoft/vscode/node_modules/@vscode/vscode-languagedetection/dist/lib/index.js (2)
(node:25832) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `Code - OSS Helper (Renderer) --trace-deprecation ...` to show where the warning was created)
(node:25832) [DEP0025] DeprecationWarning: sys is deprecated. Use util instead.
(node:25832) ExperimentalWarning: WASI is an experimental feature and might change at any time


  Terminal history
    fetchFishHistory
      local
        1) current OS
      local (overriden path)
        ✔ current OS
      remote
        ✔ Windows
        2) macOS
        3) Linux
      remote (overriden path)
        ✔ Windows
        ✔ macOS
        ✔ Linux
      sanitizeFishHistoryCmd
        ✔ valid new-lines
        ✔ invalid new-lines


  7 passing (8ms)
  3 failing

  1) Terminal history
       fetchFishHistory
         local
           current OS:


      + expected - actual

      -/Users/mizdra/.local/share/fish/fish_history
      +/home/user/.local/share/fish/fish_history

  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  actual expected

  '/Uhome/users/mizdra/.local/share/fish/fish_history'

      at Object.readFile (file:///Users/mizdra/src/github.com/microsoft/vscode/out/vs/workbench/contrib/terminalContrib/history/test/common/history.test.js:453:21)
      at fetchFileContents (file:///Users/mizdra/src/github.com/microsoft/vscode/out/vs/workbench/contrib/terminalContrib/history/common/history.js:477:37)
      at fetchFishHistory (file:///Users/mizdra/src/github.com/microsoft/vscode/out/vs/workbench/contrib/terminalContrib/history/common/history.js:404:32)
      at async Context.<anonymous> (file:///Users/mizdra/src/github.com/microsoft/vscode/out/vs/workbench/contrib/terminalContrib/history/test/common/history.test.js:485:38)

  2) Terminal history
       fetchFishHistory
         remote
           macOS:


      + expected - actual

      -/Users/mizdra/.local/share/fish/fish_history
      +/home/user/.local/share/fish/fish_history

  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  actual expected

  '/Uhome/users/mizdra/.local/share/fish/fish_history'

      at Object.readFile (file:///Users/mizdra/src/github.com/microsoft/vscode/out/vs/workbench/contrib/terminalContrib/history/test/common/history.test.js:453:21)
      at fetchFileContents (file:///Users/mizdra/src/github.com/microsoft/vscode/out/vs/workbench/contrib/terminalContrib/history/common/history.js:477:37)
      at fetchFishHistory (file:///Users/mizdra/src/github.com/microsoft/vscode/out/vs/workbench/contrib/terminalContrib/history/common/history.js:404:32)
      at async Context.<anonymous> (file:///Users/mizdra/src/github.com/microsoft/vscode/out/vs/workbench/contrib/terminalContrib/history/test/common/history.test.js:534:34)

  3) Terminal history
       fetchFishHistory
         remote
           Linux:


      + expected - actual

      -/Users/mizdra/.local/share/fish/fish_history
      +/home/user/.local/share/fish/fish_history

  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  actual expected

  '/Uhome/users/mizdra/.local/share/fish/fish_history'

      at Object.readFile (file:///Users/mizdra/src/github.com/microsoft/vscode/out/vs/workbench/contrib/terminalContrib/history/test/common/history.test.js:453:21)
      at fetchFileContents (file:///Users/mizdra/src/github.com/microsoft/vscode/out/vs/workbench/contrib/terminalContrib/history/common/history.js:477:37)
      at fetchFishHistory (file:///Users/mizdra/src/github.com/microsoft/vscode/out/vs/workbench/contrib/terminalContrib/history/common/history.js:404:32)
      at async Context.<anonymous> (file:///Users/mizdra/src/github.com/microsoft/vscode/out/vs/workbench/contrib/terminalContrib/history/test/common/history.test.js:538:34)


Expected Behavior

$ export XDG_DATA_HOME="/Users/mizdra/.local/share"; ./scripts/test.sh --run 'vs/workbench/contrib/terminalContrib/history/test/common/history.test.js' --grep fetchFishHistory

> code-oss-dev@1.108.0 electron
> node build/lib/electron.ts

Found --crash-reporter-directory argument. Setting crashDumps directory to be '/Users/mizdra/src/github.com/microsoft/vscode/.build/crashes'
[24609:1230/171359.724314:INFO:CONSOLE:2] "The vm module of Node.js is unsupported in Electron's renderer process due to incompatibilities with the Blink rendering engine. Crashes are likely and avoiding the module is highly recommended. This module may be removed in a future release.", source: node:electron/js2c/renderer_init (2)
[24609:1230/171359.844300:INFO:CONSOLE:2] "Platform browser has already been set. Overwriting the platform with [object Object].", source: /Users/mizdra/src/github.com/microsoft/vscode/node_modules/@vscode/vscode-languagedetection/dist/lib/index.js (2)
(node:24614) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `Code - OSS Helper (Renderer) --trace-deprecation ...` to show where the warning was created)
(node:24614) [DEP0025] DeprecationWarning: sys is deprecated. Use util instead.
(node:24614) ExperimentalWarning: WASI is an experimental feature and might change at any time


  Terminal history
    fetchFishHistory
      local
        ✔ current OS
      local (overriden path)
        ✔ current OS
      remote
        ✔ Windows
        ✔ macOS
        ✔ Linux
      remote (overriden path)
        ✔ Windows
        ✔ macOS
        ✔ Linux
      sanitizeFishHistoryCmd
        ✔ valid new-lines
        ✔ invalid new-lines


  10 passing (6ms)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions