mirror of
https://github.com/neovim/neovim.git
synced 2026-04-22 07:15:34 +00:00
Merge #38542 fix/skip s390x failures
This commit is contained in:
@@ -471,6 +471,9 @@ local function format_candidate(path, psect)
|
||||
return ''
|
||||
end
|
||||
local name, sect = parse_path(path)
|
||||
if not name or not sect then
|
||||
return ''
|
||||
end
|
||||
if sect == psect then
|
||||
return name
|
||||
elseif sect:match(psect .. '.+$') then -- invalid extensions
|
||||
@@ -642,11 +645,13 @@ function M.goto_tag(pattern, _, _)
|
||||
|
||||
for _, path in ipairs(paths) do
|
||||
local pname, psect = parse_path(path)
|
||||
ret[#ret + 1] = {
|
||||
name = pname,
|
||||
filename = ('man://%s(%s)'):format(pname, psect),
|
||||
cmd = '1',
|
||||
}
|
||||
if pname and psect then
|
||||
ret[#ret + 1] = {
|
||||
name = pname,
|
||||
filename = ('man://%s(%s)'):format(pname, psect),
|
||||
cmd = '1',
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
return ret
|
||||
@@ -745,6 +750,9 @@ function M.open_page(count, smods, args)
|
||||
end
|
||||
|
||||
name, sect = parse_path(path)
|
||||
if not name or not sect then
|
||||
return 'no manual entry for ' .. (name or path)
|
||||
end
|
||||
local buf = api.nvim_get_current_buf()
|
||||
local save_tfu = vim.bo[buf].tagfunc
|
||||
vim.bo[buf].tagfunc = "v:lua.require'man'.goto_tag"
|
||||
|
||||
@@ -10,6 +10,7 @@ describe('xxd', function()
|
||||
before_each(clear)
|
||||
|
||||
it('works', function()
|
||||
t.skip(t.is_arch('s390x'), 'FIXME: xxd not built correctly on s390x with QEMU?')
|
||||
-- Round-trip test: encode then decode should return original
|
||||
local input = 'hello'
|
||||
local encoded = fn.system({ testprg('xxd') }, input)
|
||||
|
||||
@@ -18,6 +18,7 @@ describe('messages', function()
|
||||
|
||||
-- oldtest: Test_warning_scroll()
|
||||
it('a warning causes scrolling if and only if it has a stacktrace', function()
|
||||
t.skip(t.is_arch('s390x'), 'timing-sensitive test unreliable on s390x')
|
||||
screen = Screen.new(75, 6)
|
||||
|
||||
-- When the warning comes from a script, messages are scrolled so that the
|
||||
|
||||
@@ -62,6 +62,7 @@ describe('vim._watch', function()
|
||||
if watchfunc == 'inotify' then
|
||||
skip(n.fn.executable('inotifywait') == 0, 'inotifywait not found')
|
||||
skip(is_os('bsd'), 'inotifywait on bsd CI seems to expect path to exist?')
|
||||
skip(t.is_arch('s390x'), 'inotifywait not available on s390x CI')
|
||||
end
|
||||
|
||||
local msg = ('watch.%s: ENOENT: no such file or directory'):format(watchfunc)
|
||||
@@ -84,6 +85,7 @@ describe('vim._watch', function()
|
||||
skip(is_os('win'), 'not supported on windows')
|
||||
skip(is_os('mac'), 'flaky test on mac')
|
||||
skip(not is_ci() and n.fn.executable('inotifywait') == 0, 'inotifywait not found')
|
||||
skip(t.is_arch('s390x'), 'inotifywait not available on s390x CI')
|
||||
end
|
||||
|
||||
-- Note: because this is not `elseif`, BSD is skipped for *all* cases...?
|
||||
|
||||
@@ -5494,6 +5494,7 @@ describe('LSP', function()
|
||||
|
||||
it('connects to lsp server via rpc.connect using hostname', function()
|
||||
skip(is_os('bsd'), 'issue with host resolution in ci')
|
||||
skip(t.is_arch('s390x'), 'issue with host resolution in ci')
|
||||
exec_lua(create_tcp_echo_server)
|
||||
exec_lua(function()
|
||||
local port = _G._create_tcp_server('::1')
|
||||
@@ -6017,6 +6018,7 @@ describe('LSP', function()
|
||||
not is_ci() and fn.executable('inotifywait') == 0,
|
||||
'inotify-tools not installed and not on CI'
|
||||
)
|
||||
skip(t.is_arch('s390x'), 'inotifywait not available on s390x CI')
|
||||
end
|
||||
|
||||
if watchfunc == 'watch' then
|
||||
|
||||
@@ -102,6 +102,10 @@ local function init_test_repo(repo_name)
|
||||
repos_src[repo_name] = 'file://' .. path
|
||||
|
||||
git_cmd({ 'init' }, repo_name)
|
||||
if t.is_arch('s390x') then
|
||||
-- Ensure default branch is 'main' even if git is too old for `init.defaultBranch`.
|
||||
git_cmd({ 'symbolic-ref', 'HEAD', 'refs/heads/main' }, repo_name)
|
||||
end
|
||||
end
|
||||
|
||||
local function git_add_commit(msg, repo_name)
|
||||
|
||||
@@ -2932,6 +2932,7 @@ describe('TUI', function()
|
||||
|
||||
it('argv[0] can be overridden #23953', function()
|
||||
t.skip(is_os('win'), 'N/A for Windows')
|
||||
t.skip(t.is_arch('s390x'), 'FIXME s390x')
|
||||
local screen = Screen.new(50, 7, { rgb = false })
|
||||
fn.jobstart(
|
||||
{ testprg('shell-test'), 'EXECVP', nvim_prog, 'Xargv0nvim', '--clean' },
|
||||
|
||||
@@ -242,6 +242,14 @@ func CheckNotValgrind()
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Command to check for not running on s390x (too slow for some timing tests)
|
||||
command CheckNotS390 call CheckNotS390()
|
||||
func CheckNotS390()
|
||||
if has('unix') && trim(system('uname -m')) == 's390x'
|
||||
throw 'Skipped: does not work well on s390x'
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Command to check for X11 based GUI
|
||||
command CheckX11BasedGui call CheckX11BasedGui()
|
||||
func CheckX11BasedGui()
|
||||
|
||||
@@ -66,6 +66,9 @@ func Test_tar_basic()
|
||||
endfunc
|
||||
|
||||
func Test_tar_evil()
|
||||
" On s390x, tar outputs its full path in warning messages (e.g. /usr/bin/tar: Removing leading '/')
|
||||
" which tar.vim doesn't handle, causing path traversal detection to fail.
|
||||
CheckNotS390
|
||||
call s:CopyFile("evil.tar")
|
||||
defer delete("X.tar")
|
||||
defer delete("./etc", 'rf')
|
||||
@@ -127,6 +130,7 @@ func Test_tar_evil()
|
||||
endfunc
|
||||
|
||||
func Test_tar_path_traversal_with_nowrapscan()
|
||||
CheckNotS390
|
||||
call s:CopyFile("evil.tar")
|
||||
defer delete("X.tar")
|
||||
" Make sure we still find the tar warning (or leading slashes) even when
|
||||
|
||||
@@ -493,6 +493,8 @@ endfunc
|
||||
func Test_search_stat_option()
|
||||
" Asan causes wrong results, because the search times out
|
||||
CheckNotAsan
|
||||
" s390x is too slow, search times out
|
||||
CheckNotS390
|
||||
" Mark the test as flaky as the search may still occasionally time out
|
||||
let g:test_is_flaky = 1
|
||||
|
||||
|
||||
@@ -393,10 +393,10 @@ end
|
||||
|
||||
local architecture = uv.os_uname().machine
|
||||
|
||||
--- @param s 'x86_64'|'arm64'
|
||||
--- @param s 'x86_64'|'arm64'|'s390x'
|
||||
--- @return boolean
|
||||
function M.is_arch(s)
|
||||
if not (s == 'x86_64' or s == 'arm64') then
|
||||
if not (s == 'x86_64' or s == 'arm64' or s == 's390x') then
|
||||
error('unknown architecture: ' .. tostring(s))
|
||||
end
|
||||
return s == architecture
|
||||
|
||||
Reference in New Issue
Block a user