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

[chore] Fix ARM unit test #12639

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

sincejune
Copy link
Contributor

Description

This PR fixes a test in ARM by using a shorter file name in socket (rolling back the behavior introduced in #12576 ). Seems that we ran into an issue similar to golang/go#6895

Link to tracking issue

n/a

Testing

n/a

Documentation

n/a

@sincejune sincejune requested a review from a team as a code owner March 16, 2025 05:03
@sincejune sincejune requested a review from bogdandrutu March 16, 2025 05:03
Copy link

codecov bot commented Mar 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.57%. Comparing base (65d2fab) to head (a0dc937).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12639   +/-   ##
=======================================
  Coverage   91.57%   91.57%           
=======================================
  Files         483      483           
  Lines       26381    26381           
=======================================
  Hits        24158    24158           
  Misses       1762     1762           
  Partials      461      461           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -1168,7 +1168,7 @@ func sendTestRequest(t *testing.T, gcs ClientConfig) (ptraceotlp.ExportResponse,

// tempSocketName provides a temporary Unix socket name for testing.
func tempSocketName(t *testing.T) string {
tmpfile, err := os.CreateTemp(t.TempDir(), "sock")
Copy link
Member

Choose a reason for hiding this comment

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

Why? Please add a comment why t.TempDir() is not good.

Copy link
Contributor

Choose a reason for hiding this comment

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

related to golang/go#71742?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bogdandrutu @codeboten I believe the issue stems from the path length limit for sockets on Unix systems. The os.TempDir() function works because it generates a shorter file name compared to t.TempDir(). This link might be helpful: https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars

Copy link
Member

Choose a reason for hiding this comment

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

Please only comment what we discussed here because we will forget why we did this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@@ -1168,7 +1168,7 @@ func sendTestRequest(t *testing.T, gcs ClientConfig) (ptraceotlp.ExportResponse,

// tempSocketName provides a temporary Unix socket name for testing.
func tempSocketName(t *testing.T) string {
tmpfile, err := os.CreateTemp(t.TempDir(), "sock")
Copy link
Contributor

Choose a reason for hiding this comment

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

related to golang/go#71742?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants