Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add various channel mode tests #276

Merged
merged 31 commits into from
Jul 7, 2024
Merged

add various channel mode tests #276

merged 31 commits into from
Jul 7, 2024

Conversation

slingamn
Copy link
Collaborator

@slingamn slingamn commented Jun 3, 2024

Blocked for Ergo by ergochat/ergo#2163 but I wanted to see what the state of play is with other ircds

@slingamn
Copy link
Collaborator Author

slingamn commented Jun 3, 2024

  • Sable and ircu don't send 329 RPL_CREATIONTIME
  • Inspircd sends no response for MODE #channel +o existing_but_not_present_nick (it sends 401 ERR_NOSUCHNICK if the nick doesn't exist); this is arguably a bug
  • Unreal sends 401 ERR_NOSUCHNICK for MODE #nonexistentchannel +o existingnick; Modern specifies 403 ERR_NOSUCHCHANNEL here but Unreal might be following some older spec

@slingamn
Copy link
Collaborator Author

slingamn commented Jun 3, 2024

Unreal also sends an extra parameter for 324 RPL_CHANNELMODEIS:

:My.Little.Server 324 chanop #chan +intH 100:1d

The last parameter is the argument to +H (history); this is explicitly allowed by Modern so the test is wrong.

@slingamn
Copy link
Collaborator Author

slingamn commented Jun 9, 2024

The Inspircd fix should be in their 4.0 release, which should be coming soon-ish

@slingamn
Copy link
Collaborator Author

@progval I think this is finally done! I updated the Insp stable pointer to v4.0.0rc1 to pick up the fix, so we can either merge this, or hold it until the official 4.0 release and merge it then.

@slingamn
Copy link
Collaborator Author

Hmm, Atheme 7.2.12 is incompatible with Insp 4:

2024-06-10T01:27:16.9371515Z ----------------------------- Captured stderr call -----------------------------
2024-06-10T01:27:16.9372270Z [2024-06-10 01:18:38] atheme 7.2.12 is starting up...
2024-06-10T01:27:16.9372873Z [2024-06-10 01:18:38] module_locate_symbol(): nickserv/set_core is not loaded.
2024-06-10T01:27:16.9373788Z [2024-06-10 01:18:38] db-open-read: database '/tmp/tmpzfsfo97a/services.db' does not yet exist; a new one will be created.
2024-06-10T01:27:16.9374503Z [2024-06-10 01:18:38] pid 2071
2024-06-10T01:27:16.9374906Z [2024-06-10 01:18:38] running in foreground mode from /usr
2024-06-10T01:27:16.9375595Z [2024-06-10 01:18:38] uplink_connect(): connecting to first entry My.Little.Server[0.0.0.0]:41335.
2024-06-10T01:27:16.9376338Z [2024-06-10 01:18:38] irc_handle_connect(): connection to uplink established
2024-06-10T01:27:16.9377786Z [2024-06-10 01:18:38] m_error(): error from server: CAPAB negotiation failed: Server is using protocol version 1202 which is too old to link with this server (protocol versions 1205 to 1206 are supported)
2024-06-10T01:27:16.9379080Z [2024-06-10 01:18:48] uplink_connect(): trying again first entry My.Little.Server[0.0.0.0]:41335
2024-06-10T01:27:16.9379830Z [2024-06-10 01:18:48] irc_handle_connect(): connection to uplink established
2024-06-10T01:27:16.9380451Z --------------------------- Captured stderr teardown ---------------------------
2024-06-10T01:27:16.9381674Z [2024-06-10 01:18:48] m_error(): error from server: CAPAB negotiation failed: Server is using protocol version 1202 which is too old to link with this server (protocol versions 1205 to 1206 are supported)
2024-06-10T01:27:16.9382833Z [2024-06-10 01:18:48] wallops(): unable to send: Exiting on signal 15.
2024-06-10T01:27:16.9383400Z [2024-06-10 01:18:48] sighandler(): got SIGTERM; exiting...
2024-06-10T01:27:16.9383850Z [2024-06-10 01:18:48] main(): shutting down

@slingamn
Copy link
Collaborator Author

Looks like this is blocked: atheme/atheme#904

@progval
Copy link
Owner

progval commented Jun 10, 2024

I'll write a PR to add inspircd-3 as its own software (like unrealircd-5) and remove atheme from insp 4

@slingamn
Copy link
Collaborator Author

Looks like we hit a real, but nondeterministic, bug in Sable:

2024-06-10T05:43:08.9214996Z ----------------------------- Captured stderr call -----------------------------
2024-06-10T05:43:08.9215840Z thread 'tokio-runtime-worker' panicked at sable_ircd/src/server/mod.rs:501:29:
2024-06-10T05:43:08.9216437Z Lost auth client task
2024-06-10T05:43:08.9217002Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2024-06-10T05:43:08.9217786Z Error: Custom { kind: UnexpectedEof, error: "could not read" }

Should we turn on backtraces?

@progval
Copy link
Owner

progval commented Jun 10, 2024

I'll debug it locally

@progval
Copy link
Owner

progval commented Jun 15, 2024

Oh that was just one of Sable's regular flaky failures. I still don't know how to fix those besides restarting the test.

irctest/server_tests/chmodes/modeis.py Outdated Show resolved Hide resolved
Comment on lines +64 to +72
# ERR_NOSUCHNICK is typical, Bahamut additionally sends ERR_USERNOTINCHANNEL
if self.controller.software_name != "Bahamut":
self.assertEqual(len(messages), 1)
self.assertMessageMatch(messages[0], command=ERR_NOSUCHNICK)
else:
self.assertLessEqual(len(messages), 2)
commands = {message.command for message in messages}
self.assertLessEqual({ERR_NOSUCHNICK}, commands)
self.assertLessEqual(commands, {ERR_NOSUCHNICK, ERR_USERNOTINCHANNEL})
Copy link
Owner

Choose a reason for hiding this comment

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

Comment on lines +82 to +88
# Modern: "If <target> is a channel that does not exist on the network,
# the ERR_NOSUCHCHANNEL (403) numeric is returned."
# However, Unreal and ngircd send 401 ERR_NOSUCHNICK here instead:
if self.controller.software_name not in ("UnrealIRCd", "ngIRCd"):
self.assertEqual(messages[0].command, ERR_NOSUCHCHANNEL)
else:
self.assertIn(messages[0].command, [ERR_NOSUCHCHANNEL, ERR_NOSUCHNICK])
Copy link
Owner

Choose a reason for hiding this comment

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

@progval progval added the blocked by: implementation waiting for one of the tested implementations to release a fix label Jun 15, 2024
@SadieCat
Copy link
Contributor

The Inspircd fix should be in their 4.0 release, which should be coming soon-ish

This will also be in our next v3 release which comes out the Friday after next.

@progval progval merged commit a132440 into progval:master Jul 7, 2024
36 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked by: implementation waiting for one of the tested implementations to release a fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants