fish-shell / fish-shell Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Wrong color in test at index 3 in text (expected 0x104, actual 0x1): cd test/fish_highlight_test #5458
Comments
The line of code this applies to (from src/fish_tests.cpp): {L"test/fish_highlight_test/foo", highlight_spec_param | highlight_modifier_valid_path}, This is supposed to be highlighted as a parameter and valid path (usually via underlining). Instead, it is highlighted as an error. Compare #5436, in which the issue was a missing Here, the issue is probably that the "test/fish_highlight_test" directory doesn't exist or isn't readable ( How are you running the test? Is it possible that it's not set up correctly (i.e. run "fish_tests" from another directory that doesn't include the test directory)? |
As part of the build infrastructure the
with the same result. Is there a way for me to gather more information? |
So... that means $PWD is fish-3.0.0/build, so "test/fish_highlight_test" would refer to fish-3.0.0/build/test/fish_highlight_test. But, apparently it is at:
See that "amd64"? That means the path the test is highlighting indeed does not exist, because that doesn't have the "amd64/" component. |
Basically, the most important bit is this: From the directory from where you are running the tests, after you have run them, as the user running the tests, does If it doesn't, the highlighting is correct and the test setup went wrong. If it does, the highlighting is wrong. |
I am sorry we are conflating two situations. The first one in your comment comes from my run in the sources, where I created 'build' directory. The other one is our build environment. Anyway, this is how it looks when 'test' target is run in out build env:
The directory from which test is run is
Hence the latter? |
Okay, did you try that in fish, or a different shell? What is your $CDPATH? Because I can get the highlighting test to fail in this manner if I set $CDPATH to something that doesn't include a component that is either "." or "", though in that case that is how fish behaves, so the highlighting is correct. Which would basically make this a duplicate of #4484. |
I tried in Bash. As far as I see, $ echo "<$CDPATH>"
<> |
Okay, so I've installed the vagrant thing, and I can reproduce the test failure. Additionally, I also get failures for some other directory tests:
However, actually running the freshly compiled fish, it highlights |
Okay, so the And what those failures all have in common, and what separates them from the tests that apparently succeed, is that they all have paths that don't end in "/" and PATH_REQUIRE_DIR set. Which means they all take the path that features this nice bit of code: } else if ((dir = wopendir(dir_name))) {
// Check if we're case insensitive.
const bool do_case_insensitive =
fs_is_case_insensitive(dir_name, dirfd(dir), case_sensitivity_cache);
wcstring matched_file;
// We opened the dir_name; look for a string where the base name prefixes it Don't
// ask for the is_dir value unless we care, because it can cause extra filesystem
// access.
wcstring ent;
bool is_dir = false;
while (wreaddir_resolving(dir, dir_name, ent, require_dir ? &is_dir : NULL)) { In which we have |
Okay, inside Apparently readdir_r has been known to be bad on Solaris for some time, e.g. rust uses plain readdir there (rust-lang/rust#31078 (comment)). We might want to re-check switching away from it - #4183. |
It's deprecated in glibc, and does not work properly on Solaris. Fixes fish-shell#5458.
Can't help much with |
It works, @faho. Thank you! |
@faho thanks for this fix! If it's not too much trouble can you cherry-pick into 3.0.1 and verify your fix there? |
It's deprecated in glibc, and does not work properly on Solaris. Fixes fish-shell#5458.
I port fish 3.0.0 to OpenIndiana 2018.10 (illumos kernel, an OpenSolaris fork) and I get following errors when I run the test suite in MATE Terminal (
TERM=xterm
), which runsBash 4.4.23(1)-release
:Let me know should you need more information. You can also get OpenIndiana as a Vagrant Box: https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/doc/vagrant.md.
The text was updated successfully, but these errors were encountered: