Email or username:

Password:

Forgot your password?
Top-level
Ivan Molodetskikh

While trying to make this work, I realized that this is the time when I *really really* want to be able to test this stuff. So I got on a sidetrack adventure to write testing infra for running real Wayland clients inside unit tests.

I've got it working! In these tests, I'm creating a new niri instance along with test clients, all on the same test-local event loop. No global state, no threads needed.

What's really cool is that this lets me test the weirdest client-server event timings.

#niri

Long test for a complex resize sequence.
4 comments
Ivan Molodetskikh replied to Ivan

This morning I worked on remembering the size for floating windows when they go to the tiling layout and back.

The whole sizing code must be at the top by logic complexity in niri. I have to juggle, all at once:

- new size I haven't sent to the window yet,
- size changes I sent, but window hasn't acked yet (0, 1, or more in-flight),
- size change window acked but hasn't committed for yet,
- size change window acked and responded to with a commit (maybe with a different size entirely).

#niri

This morning I worked on remembering the size for floating windows when they go to the tiling layout and back.

The whole sizing code must be at the top by logic complexity in niri. I have to juggle, all at once:

- new size I haven't sent to the window yet,
- size changes I sent, but window hasn't acked yet (0, 1, or more in-flight),
- size change window acked but hasn't committed for yet,
- size change window acked and responded to with a commit (maybe with a different size entirely).

Ivan Molodetskikh replied to Ivan

The diff is 85 lines of change and 243 lines of new tests, and I already found a few weirder edge cases that I've missed. No way I could do this well without that client-server testing setup that I posted about yesterday.

Btw I pushed the testing setup if you're curious, along with the entirety of 1215 snapshot files for a powerset of new window workspace/output target settings: github.com/YaLTeR/niri/commit/

The WIP floating branch caused them to update in several commits already.

#niri

The diff is 85 lines of change and 243 lines of new tests, and I already found a few weirder edge cases that I've missed. No way I could do this well without that client-server testing setup that I posted about yesterday.

Btw I pushed the testing setup if you're curious, along with the entirety of 1215 snapshot files for a powerset of new window workspace/output target settings: github.com/YaLTeR/niri/commit/

Ivan Molodetskikh replied to Ivan

The big 1215 snapshot test powerset (actually it already grew to 1695) continues to prove its worth. Just finished a big +495 -508 cleanup of the window opening code, and verified that not a single of those 1215 window opening configurations changed its outcome. I will be sleeping well tonight

#niri

Ivan Molodetskikh replied to Ivan

After three weeks of hard work, I am undrafting the floating window PR in niri. Please give it thorough testing and report any bugs or issues!

github.com/YaLTeR/niri/pull/871

#niri

Go Up