quick-lint / quick-lint-js

quick-lint-js finds bugs in JavaScript programs
https://quick-lint-js.com
GNU General Public License v3.0
1.55k stars 192 forks source link

Test failure on WSL1: test_configuration_loader.moving_ancestor_directory_containing_file_and_config_unlinks_config #1002

Open strager opened 1 year ago

strager commented 1 year ago

The test_configuration_loader.moving_ancestor_directory_containing_file_and_config_unlinks_config test is failing on WSL1 (but not WSL2):

strager@staler:~/quick-lint-js$ ./build/test/quick-lint-js-test --gtest_filter=test_configuration_loader.moving_ancestor_directory_containing_file_and_config_unlinks_config
Running main() from gmock_main.cc
Note: Google Test filter = test_configuration_loader.moving_ancestor_directory_containing_file_and_config_unlinks_config
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from test_configuration_loader
[ RUN      ] test_configuration_loader.moving_ancestor_directory_containing_file_and_config_unlinks_config
/home/strager/quick-lint-js/test/test-configuration-loader.cpp:2498: Failure
Failed
failed to move /tmp/mytmpfs/quick-lint-js.vh3DMu/olddir to /tmp/mytmpfs/quick-lint-js.vh3DMu/newdir: Permission denied
/home/strager/quick-lint-js/test/test-configuration-loader.cpp:1115: Failure
Value of: changes
Expected: has 1 element that is anything
  Actual: {}
[  FAILED  ] test_configuration_loader.moving_ancestor_directory_containing_file_and_config_unlinks_config (2009 ms)
[----------] 1 test from test_configuration_loader (2009 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (2010 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] test_configuration_loader.moving_ancestor_directory_containing_file_and_config_unlinks_config

 1 FAILED TEST
strager commented 1 year ago

This appears to be a WSL1 bug. It's documented with a workaround in VS Code: https://code.visualstudio.com/docs/remote/wsl#_i-see-eaccess-permission-denied-error-trying-to-rename-a-folder-in-the-open-workspace

strager commented 1 year ago

Possible solutions: