Skip to content

[SYCL][E2E] Redirect output to /dev/null instead of stdout #18937

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

Merged
merged 3 commits into from
Jun 12, 2025

Conversation

uditagarwal97
Copy link
Contributor

@uditagarwal97 uditagarwal97 commented Jun 11, 2025

Redirecting output to stdout is not working and LIT is instead creating a binary file named -.
Thus, redirecting output to /dev/null. os.devnull equals /dev/null on POSIX and 'null' on Windows

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR ensures that the compiler output is redirected appropriately to avoid generating an unwanted binary file named "-" by replacing the "-" parameter with the platform‐specific os.devnull.

  • Changed the compiler command line argument for the "-o" flag from "-" to f"{os.devnull}".
  • Removed the explicit stdout=subprocess.DEVNULL parameter from subprocess.Popen calls.

@@ -426,10 +425,9 @@ def open_check_file(file_name):
"c++",
"-",
"-o",
"-",
f"{os.devnull}",
],
stdin=subprocess.PIPE,
Copy link
Preview

Copilot AI Jun 11, 2025

Choose a reason for hiding this comment

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

Redirecting the compiler output consistently by specifying os.devnull helps maintain uniform behavior; ensure that any potential stdout output is handled as intended without the removed stdout=subprocess.DEVNULL parameter.

Suggested change
stdin=subprocess.PIPE,
stdin=subprocess.PIPE,
stdout=subprocess.DEVNULL,

Copilot uses AI. Check for mistakes.

@uditagarwal97
Copy link
Contributor Author

Jenkins failure is unrelated and an infra issue.

@uditagarwal97 uditagarwal97 merged commit 06bf237 into sycl Jun 12, 2025
24 of 25 checks passed
@uditagarwal97 uditagarwal97 deleted the private/udit/lit_fix branch June 12, 2025 14:45
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.

2 participants