Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
spikecurtis merged 1 commit intomainfromspike/18263-eviction-unit-test
Jun 27, 2025

Conversation

spikecurtis
Copy link
Contributor

@spikecurtisspikecurtis commentedJun 25, 2025
edited
Loading

relates to#18263

Adds a unit test for X11 listener eviction when all ports in the allowed range are in use.

@spikecurtisspikecurtis marked this pull request as ready for reviewJune 25, 2025 10:30
@spikecurtisspikecurtisforce-pushed thespike/18263-x11-network branch fromb60589d to212e2a5CompareJune 25, 2025 10:37
@spikecurtisspikecurtisforce-pushed thespike/18263-eviction-unit-test branch from7f2e241 toa68240dCompareJune 25, 2025 10:37
@spikecurtisspikecurtis changed the titlechore: unit test for X11 evictionchore: add unit test for X11 evictionJun 26, 2025
@spikecurtisspikecurtisforce-pushed thespike/18263-x11-network branch from212e2a5 toa272b09CompareJune 26, 2025 10:41
@spikecurtisspikecurtisforce-pushed thespike/18263-eviction-unit-test branch froma68240d to0d55551CompareJune 26, 2025 10:41
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice test!

return-1,false
}
ctx:=slog.With(sshCtx,slog.F("session_id",fmt.Sprintf("%x",serverConn.SessionID())))
Copy link
Member

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!

// Calculate how many simultaneous X11 sessions we can create given the
// configured port range.
startPort:=agentssh.X11StartPort+agentssh.X11DefaultDisplayOffset
maxSessions:=agentssh.X11MaxPort-startPort+1
Copy link
Member

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.

@spikecurtisspikecurtisforce-pushed thespike/18263-x11-network branch froma272b09 toe2d3899CompareJune 27, 2025 09:42
@spikecurtisspikecurtisforce-pushed thespike/18263-eviction-unit-test branch 2 times, most recently from1153c62 to8a1e923CompareJune 27, 2025 09:55
@spikecurtisspikecurtisforce-pushed thespike/18263-x11-network branch frome2d3899 tof3ebe91CompareJune 27, 2025 10:07
@spikecurtisspikecurtisforce-pushed thespike/18263-eviction-unit-test branch from8a1e923 tofb1e1bbCompareJune 27, 2025 10:07
@spikecurtisspikecurtisforce-pushed thespike/18263-x11-network branch fromf3ebe91 to449c022CompareJune 27, 2025 10:24
@spikecurtisspikecurtisforce-pushed thespike/18263-eviction-unit-test branch fromfb1e1bb to1d279c8CompareJune 27, 2025 10:25
@spikecurtisspikecurtisforce-pushed thespike/18263-x11-network branch 2 times, most recently from702c154 to011e763CompareJune 27, 2025 10:43
@spikecurtisspikecurtisforce-pushed thespike/18263-eviction-unit-test branch from1d279c8 to3275c03CompareJune 27, 2025 10:43
@spikecurtisspikecurtis changed the base branch fromspike/18263-x11-network tographite-base/18565June 27, 2025 10:56
@spikecurtisspikecurtisforce-pushed thespike/18263-eviction-unit-test branch from3275c03 tob4283f8CompareJune 27, 2025 10:56
@graphite-appgraphite-appbot changed the base branch fromgraphite-base/18565 tomainJune 27, 2025 10:57
@spikecurtisspikecurtisforce-pushed thespike/18263-eviction-unit-test branch fromb4283f8 toa6ab9a1CompareJune 27, 2025 10:57
@spikecurtisspikecurtis merged commit66f22d7 intomainJun 27, 2025
35 checks passed
@spikecurtisGraphite App
Copy link
ContributorAuthor

Merge activity

@spikecurtisspikecurtis deleted the spike/18263-eviction-unit-test branchJune 27, 2025 11:13
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 27, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

Assignees

@spikecurtisspikecurtis

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@spikecurtis@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp