- Notifications
You must be signed in to change notification settings - Fork1.1k
chore: add unit test for X11 eviction#18565
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
spikecurtis commentedJun 25, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
b60589d to212e2a5Compare7f2e241 toa68240dCompare212e2a5 toa272b09Comparea68240d to0d55551Compare
mafredri left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice test!
| x.logger.Warn(sshCtx,"failed to get server connection") | ||
| return-1,false | ||
| } | ||
| ctx:=slog.With(sshCtx,slog.F("session_id",fmt.Sprintf("%x",serverConn.SessionID()))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is an under-appreciated feature of slog, nice to see it in action!
Uh oh!
There was an error while loading.Please reload this page.
| // Calculate how many simultaneous X11 sessions we can create given the | ||
| // configured port range. | ||
| startPort:=agentssh.X11StartPort+agentssh.X11DefaultDisplayOffset | ||
| maxSessions:=agentssh.X11MaxPort-startPort+1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Suggestion: If we madeagentssh.X11MaxPort an option rather than constant, we could decrease the number sessions we have to create. This is definitely an optional suggestion, though.
a272b09 toe2d3899Compare1153c62 to8a1e923Comparee2d3899 tof3ebe91Compare8a1e923 tofb1e1bbComparef3ebe91 to449c022Comparefb1e1bb to1d279c8Compare702c154 to011e763Compare1d279c8 to3275c03Compare3275c03 tob4283f8Compare011e763 toa5bfb20Compareb4283f8 toa6ab9a1Compare66f22d7 intomainUh oh!
There was an error while loading.Please reload this page.
spikecurtis commentedJun 27, 2025
Merge activity
|

Uh oh!
There was an error while loading.Please reload this page.
relates to#18263
Adds a unit test for X11 listener eviction when all ports in the allowed range are in use.