Closed krakow10 closed 1 week ago
That is not the correct way to run tests. You have to do either
for integration tests or
for unit tests.
Actually to run Integration tests your have to use cargo run --features it -- run-tests
I believe. It's best to check the CI files for these things.
Thanks! I had enough cargo experience to figure it out myself after your first tip, but half the tests fail on something else Compositor could not take a screenshot: Cloud not create a gbm buffer: Invalid argument (os error 22)
which I assumed is either a wm already running on the current tty or nvidia driver being itself. I'm making a PKGBUILD and trying to do my due diligence to run the tests. I'm very interested in the explicit sync feature that's not available on sway.
Edit: Note that I'm testing on the Nvidia 560 beta driver, but chances are the stable driver isn't any different.
I believe the error is caused by a limitation in the nvidia driver. The screenshot code is quite old and relies on a feature not available on Nvidia. But that feature is not actually necessary so I'll remove it in a future version. In the meantime I don't see an immediate way to make the tests run on Nvidia hardware.
I'll take a look at the pkgbuild when I'm at my PC.
Take a look at https://github.com/mahkoh/jay/pull/240. However, after thinking about this again, I don't understand why the original code would fail on nvidia. We're calling
gbm_bo_create_with_modifiers2(
800,
600,
XRGB8888,
&LINEAR_MODIFIER,
1,
GBM_BO_USE_RENDERING,
)
This should not fail even on nvidia.
makedepends=('cargo' 'libxkbcommon' 'mesa' 'systemd-libs' 'libinput' 'pango' 'shaderc')
This should be
makedepends=('cargo' 'shaderc' 'gcc')
depends=('libxkbcommon' 'mesa' 'systemd-libs' 'libinput' 'pango')
probably.
install -Dm0644 -t "$pkgdir/usr/share/xdg-desktop-portal/portals/jay-portals.conf" "etc/jay-portals.conf"
This file belongs in the parent directory.
And you'll probably also want to install the shell completions.
Alright... I got a nice GPU passthrough virtual machine with a RTX 3060 going so I can listen to music while testing jay. I want to point out that I was making the PKGBUILD before I ever ran the software, so this is the first time I'm running it. The docs say that a default configuration will be used, so I tried no config first.
I'm writing this in a nonlinear way as I solve problems.
Launching with a wayland-activated nvidia driver opens a dark blue screen with a black bar at the top, and the resolution seems correct. The mouse did not seem to be movable at first, but I was able to launch alacritty, and every time I type a character the mouse position updates. I was able to open zed editor and it kept the cursor updating. A few moments after opening sublime merge (an opengl application), things on screen stopped updating. I could also reproduce this with vrrtest which uses the Love2D game engine. I tried to close things using the hotkey, and didn't think closing it worked, but looking at the screen now it did successfully close after some time. Maybe the drawing didn't update, or maybe it just took a really long time to close.
I think that's enough for today, I'm somewhat surprised the nvidia driver lets it run at all.
Launching with a wayland-activated nvidia driver opens a dark blue screen with a black bar at the top, and the resolution seems correct. The mouse did not seem to be movable at first, but I was able to launch alacritty, and every time I type a character the mouse position updates.
Sounds like an issue with hardware cursors.
Please test again on master.
I reran the jay-git PKGBUILD that previously failed the integration tests, and as far as I can tell the tests ran to completion.
I'll take a look at trying out jay again at some point.
Edit: Just tested the non-git release from 4 days ago and the tests failed, so that gives me more confidence that I ran the tests correctly and they passed on the git version.
Running
cargo test --release --features it
fails all the tests that use the logger:Giant error message
``` running 49 tests test format::formats_dont_panic ... ok test it::tests::t0003_multi_window::single ... FAILED test it::tests::t0007_subsurface::single ... FAILED test it::tests::t0027_input_region::single ... FAILED test it::tests::t0032_content_type::single ... FAILED test it::tests::t0016_scroll_ws::single ... FAILED test it::tests::t0008_map_focus::single ... FAILED test it::tests::t0001_shm_formats::single ... FAILED test it::tests::t0017_remove_unused_ws::single ... FAILED test it::tests::t0025_dnd_focus_change::single ... FAILED test it::tests::t0011_set_keymap::single ... FAILED test it::tests::t0021_preferred_buffer_scale::single ... FAILED test it::tests::t0033_float_size_memoization::single ... FAILED test rect::tests::rects_to_bands ... ok test rect::tests::rects_to_bands2 ... ok test rect::tests::subtract1 ... ok test rect::tests::union1 ... ok test rect::tests::union2 ... ok test it::tests::t0040_virtual_keyboard::single ... FAILED test it::tests::t0041_input_method::single ... FAILED test it::tests::t0022_toplevel_suspended::single ... FAILED test it::tests::t0018_click_to_active_ws::single ... FAILED test it::tests::t0028_top_level_restacking::single ... FAILED test it::tests::t0030_cursor_shape::single ... FAILED test it::tests::t0039_alpha_modifier::single ... FAILED test it::tests::t0031_syncobj::single ... FAILED test it::tests::t0023_xdg_activation::single ... FAILED test it::tests::t0035_scanout_feedback::single ... FAILED test it::tests::t0013_graphics_initialized::single ... FAILED test it::tests::t0036_idle::single ... FAILED test it::tests::t0015_scroll_partial::single ... FAILED test it::tests::t0042_toplevel_select::single ... FAILED test it::tests::t0014_container_scroll_focus::single ... FAILED test it::tests::t0037_toplevel_drag::single ... FAILED test it::tests::t0005_create_seat::single ... FAILED test it::tests::t0026_output_transform::single ... FAILED test it::tests::t0024_foreign_toplevel_list::single ... FAILED test it::tests::t0019_natural_scrolling::single ... FAILED test it::tests::t0012_subsurface_focus::single ... FAILED test it::tests::t0032_data_control::single ... FAILED test it::tests::t0020_surface_offset::single ... FAILED test it::tests::t0029_double_click_float::single ... FAILED test it::tests::t0006_region::single ... FAILED test it::tests::t0034_workspace_restoration::single ... FAILED test it::tests::t0038_subsurface_parent_state::single ... FAILED test it::tests::t0009_tab_focus::single ... FAILED test it::tests::t0004_quit::single ... FAILED test it::tests::t0010_fullscreen_focus::single ... FAILED [2024-07-28T00:17:29.723Z INFO jay::it] Running 32 tests in parallel [2024-07-28T00:17:29.724Z INFO jay::it] Running t0002_window test it::tests::t0002_window::single ... ok failures: ---- it::tests::t0003_multi_window::single stdout ---- thread 'it::tests::t0003_multi_window::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0007_subsurface::single stdout ---- thread 'it::tests::t0007_subsurface::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0027_input_region::single stdout ---- thread 'it::tests::t0027_input_region::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0032_content_type::single stdout ---- thread 'it::tests::t0032_content_type::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0016_scroll_ws::single stdout ---- thread 'it::tests::t0016_scroll_ws::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0008_map_focus::single stdout ---- thread 'it::tests::t0008_map_focus::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0001_shm_formats::single stdout ---- thread 'it::tests::t0001_shm_formats::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ---- it::tests::t0017_remove_unused_ws::single stdout ---- thread 'it::tests::t0017_remove_unused_ws::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0025_dnd_focus_change::single stdout ---- thread 'it::tests::t0025_dnd_focus_change::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0011_set_keymap::single stdout ---- thread 'it::tests::t0011_set_keymap::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0021_preferred_buffer_scale::single stdout ---- thread 'it::tests::t0021_preferred_buffer_scale::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0033_float_size_memoization::single stdout ---- thread 'it::tests::t0033_float_size_memoization::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0040_virtual_keyboard::single stdout ---- thread 'it::tests::t0040_virtual_keyboard::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0041_input_method::single stdout ---- thread 'it::tests::t0041_input_method::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0022_toplevel_suspended::single stdout ---- thread 'it::tests::t0022_toplevel_suspended::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0018_click_to_active_ws::single stdout ---- thread 'it::tests::t0018_click_to_active_ws::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0028_top_level_restacking::single stdout ---- thread 'it::tests::t0028_top_level_restacking::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0030_cursor_shape::single stdout ---- thread 'it::tests::t0030_cursor_shape::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0039_alpha_modifier::single stdout ---- thread 'it::tests::t0039_alpha_modifier::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0031_syncobj::single stdout ---- thread 'it::tests::t0031_syncobj::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0023_xdg_activation::single stdout ---- thread 'it::tests::t0023_xdg_activation::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0035_scanout_feedback::single stdout ---- thread 'it::tests::t0035_scanout_feedback::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0013_graphics_initialized::single stdout ---- thread 'it::tests::t0013_graphics_initialized::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0036_idle::single stdout ---- thread 'it::tests::t0036_idle::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0015_scroll_partial::single stdout ---- thread 'it::tests::t0015_scroll_partial::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0042_toplevel_select::single stdout ---- thread 'it::tests::t0042_toplevel_select::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0014_container_scroll_focus::single stdout ---- thread 'it::tests::t0014_container_scroll_focus::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0037_toplevel_drag::single stdout ---- thread 'it::tests::t0037_toplevel_drag::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0005_create_seat::single stdout ---- thread 'it::tests::t0005_create_seat::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0026_output_transform::single stdout ---- thread 'it::tests::t0026_output_transform::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0024_foreign_toplevel_list::single stdout ---- thread 'it::tests::t0024_foreign_toplevel_list::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0019_natural_scrolling::single stdout ---- thread 'it::tests::t0019_natural_scrolling::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0012_subsurface_focus::single stdout ---- thread 'it::tests::t0012_subsurface_focus::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0032_data_control::single stdout ---- thread 'it::tests::t0032_data_control::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0020_surface_offset::single stdout ---- thread 'it::tests::t0020_surface_offset::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0029_double_click_float::single stdout ---- thread 'it::tests::t0029_double_click_float::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0006_region::single stdout ---- thread 'it::tests::t0006_region::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0034_workspace_restoration::single stdout ---- thread 'it::tests::t0034_workspace_restoration::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0038_subsurface_parent_state::single stdout ---- thread 'it::tests::t0038_subsurface_parent_state::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0009_tab_focus::single stdout ---- thread 'it::tests::t0009_tab_focus::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0004_quit::single stdout ---- thread 'it::tests::t0004_quit::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) ---- it::tests::t0010_fullscreen_focus::single stdout ---- thread 'it::tests::t0010_fullscreen_focus::single' panicked at src/it/test_logger.rs:21:30: called `Result::unwrap()` on an `Err` value: SetLoggerError(()) failures: it::tests::t0001_shm_formats::single it::tests::t0003_multi_window::single it::tests::t0004_quit::single it::tests::t0005_create_seat::single it::tests::t0006_region::single it::tests::t0007_subsurface::single it::tests::t0008_map_focus::single it::tests::t0009_tab_focus::single it::tests::t0010_fullscreen_focus::single it::tests::t0011_set_keymap::single it::tests::t0012_subsurface_focus::single it::tests::t0013_graphics_initialized::single it::tests::t0014_container_scroll_focus::single it::tests::t0015_scroll_partial::single it::tests::t0016_scroll_ws::single it::tests::t0017_remove_unused_ws::single it::tests::t0018_click_to_active_ws::single it::tests::t0019_natural_scrolling::single it::tests::t0020_surface_offset::single it::tests::t0021_preferred_buffer_scale::single it::tests::t0022_toplevel_suspended::single it::tests::t0023_xdg_activation::single it::tests::t0024_foreign_toplevel_list::single it::tests::t0025_dnd_focus_change::single it::tests::t0026_output_transform::single it::tests::t0027_input_region::single it::tests::t0028_top_level_restacking::single it::tests::t0029_double_click_float::single it::tests::t0030_cursor_shape::single it::tests::t0031_syncobj::single it::tests::t0032_content_type::single it::tests::t0032_data_control::single it::tests::t0033_float_size_memoization::single it::tests::t0034_workspace_restoration::single it::tests::t0035_scanout_feedback::single it::tests::t0036_idle::single it::tests::t0037_toplevel_drag::single it::tests::t0038_subsurface_parent_state::single it::tests::t0039_alpha_modifier::single it::tests::t0040_virtual_keyboard::single it::tests::t0041_input_method::single it::tests::t0042_toplevel_select::single test result: FAILED. 7 passed; 42 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.07s error: test failed, to rerun pass `--bin jay` ```