diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/daemon.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/test/daemon.py b/test/daemon.py index 9c846369..06458ff4 100644 --- a/test/daemon.py +++ b/test/daemon.py @@ -54,7 +54,7 @@ private HOME and runtime directory: python3 -B test/daemon.py --client-resize-real <pardes> <pardes-gui> a client window showing a PDF resized 30 times in a second by the real compositor (driftwm), the caller's display: no SDL assertion, - the last size taken, a few inputs a size + the last size taken, an input a size at most """ import fcntl import json @@ -2285,7 +2285,11 @@ def client_resize_real(binary, gui_binary): is drawn into placed the page's scissor past it: `SDL_SetGPUScissor`'s release assertion, whose dialog blocks the window's thread: the window frozen at its old size, cut, and nothing opened after shows in it), it - takes the last size, and its inputs are a few a size. Real windows: the + takes the last size, it posts a size a configure at most and is rolled + back as often at most (on main the session's own window sized the + client's view to its own size, the client posted its own again, on and + on: 425 to 1308 inputs, 228 rollbacks, its frames drawn at the session + window's size, cut). Real windows: the caller's display and runtime directory reach the compositor; the session's runtime directory is the test's own; skipped without driftwm.""" real_runtime = os.environ.get('XDG_RUNTIME_DIR', '') @@ -2377,11 +2381,16 @@ def client_resize_real(binary, gui_binary): # moved away) is motion's, --client-motion's: not counted here. motions = said.count('SDL_EVENT_MOUSE_MOTION') sent -= motions + # Its own inputs rolled back by the session's units between them. + rollbacks = int(line[line.index('foreign') + 1]) if 'foreign' in line else -1 print(f'daemon: a client window resized {steps} times in a second by the compositor: {asserted} SDL assertions, ' - f'its size {size} (asked {list(last)}), {sent} inputs besides {motions} pointer motions') + f'its size {size} (asked {list(last)}), {sent} inputs besides {motions} pointer motions, {rollbacks} rollbacks') assert asserted == 0, ('a client window drew past its target while resized', said[-600:]) assert abs(size[0] - last[0]) <= 2 and abs(size[1] - last[1]) <= 40, ('the client window did not take the last size', size, last) - assert 0 < sent <= 3 * steps, ('a client window resized posted its size again and again', sent) + # A size a configure at most (the window's own, compared with what it + # posted last: none after the last). + assert sent <= steps, ('a client window resized posted its size again and again', sent) + assert 0 <= rollbacks <= steps + motions, ('a client window resized was rolled back again and again', rollbacks) exit_session(nine, pane) sess.wait(timeout=60) nine.socket.close() |
