Skip to content

Conversation

@ziogaschr
Copy link
Member

@ziogaschr ziogaschr commented Aug 25, 2022

No description provided.

Error is "The ipc endpoint is longer than %d characters."
}
for i, c := range cases {
t.Run(fmt.Sprintf("TestGethStartupLogs/%d: %v", i, c.flags), func(t *testing.T) {
// fix for darwin, where long test names fail with "The ipc endpoint is longer than %d characters."
Copy link
Member Author

Choose a reason for hiding this comment

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

@meowsbits another way is to change the test name only if rpc.max_path_size < len([]byte(strings.Join(c.flags, " ")))), for this we have to export the max_path_size in rpc.

Copy link
Contributor

Choose a reason for hiding this comment

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

https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars

If the error you're seeing is because of the IPC path length limit, then we can try to shorten that up by shortening the datadir path, since geth should use the default <datadir>/<alt chain?>/geth/geth.ipc.

But if the error is just because of the test names, I recommend reducing them to a simple Sprintf("%d", i) -- which seems like a reasonable thing to do anyway (shoving the flags in there was a bad idea).

I'm going to push a commit, see whatcha think.

Copy link
Member Author

Choose a reason for hiding this comment

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

The issue was because of the IPC path, which was long as part of it was based on test name.
I am going to test your commits

ziogaschr and others added 4 commits August 25, 2022 16:53
If IPC paths are too long, Unix systems will complain
because there are limits, albeit inconsistent ones.
So we try to keep IPC path names short (ie <100 chars).

I removed all instances where flags were used
in test names because
- they cause issues with apple silicon M1,
- and they are pointless

I also removed the redundant subtest naming scheme
which included the test name. Go includes the
test name by default anyway.

Date: 2022-08-29 09:21:05-05:00
Signed-off-by: meows <[email protected]>
Bumps dep to a tag version equivalent to the
previously referenced, untagged version.

Date: 2022-08-29 09:22:26-05:00
Signed-off-by: meows <[email protected]>
@ziogaschr ziogaschr merged commit 10d5f56 into master Aug 31, 2022
@ziogaschr ziogaschr deleted the fix/tests-mac branch August 31, 2022 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants