Skip to content

Testing: dump state after test failure#19170

Closed
smowton wants to merge 7 commits intogithub:mainfrom
smowton:smowton/testing/macos-15-stall
Closed

Testing: dump state after test failure#19170
smowton wants to merge 7 commits intogithub:mainfrom
smowton:smowton/testing/macos-15-stall

Conversation

@smowton
Copy link
Copy Markdown
Contributor

@smowton smowton commented Mar 31, 2025

No description provided.

Copilot AI review requested due to automatic review settings March 31, 2025 16:46
@smowton smowton requested a review from a team as a code owner March 31, 2025 16:46
@github-actions github-actions Bot added the Java label Mar 31, 2025
Copy link
Copy Markdown
Contributor

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 pull request adds state-dumping commands to help diagnose test failures.

  • Added calls to dump process tree and network state after test failure
  • Invokes pstree and netstat commands in the test cleanup block

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

_env={"CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS_CLASSPATH_FROM_BUILD_FILES": "true"},
)
finally:
subprocess.call(["pstree"])
Copy link

Copilot AI Mar 31, 2025

Choose a reason for hiding this comment

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

Consider capturing and logging the output of pstree instead of just calling it, to ensure the state information is preserved for debugging purposes.

Suggested change
subprocess.call(["pstree"])
pstree_output = subprocess.check_output(["pstree"]).decode("utf-8")
logging.info("pstree output:\n%s", pstree_output)

Copilot uses AI. Check for mistakes.
)
finally:
subprocess.call(["pstree"])
subprocess.call(["netstat", "-a", "-n", "-p"])
Copy link

Copilot AI Mar 31, 2025

Choose a reason for hiding this comment

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

Consider capturing and logging the output of netstat so that the network state is clearly recorded for debugging after a test failure.

Suggested change
subprocess.call(["netstat", "-a", "-n", "-p"])
netstat_output = subprocess.check_output(["netstat", "-a", "-n", "-p"], text=True)
logging.info("Netstat output:\n%s", netstat_output)

Copilot uses AI. Check for mistakes.
@smowton smowton force-pushed the smowton/testing/macos-15-stall branch from fb44746 to 2e976d1 Compare March 31, 2025 16:51
@smowton smowton force-pushed the smowton/testing/macos-15-stall branch from 6efd35b to 2538c34 Compare March 31, 2025 18:13
@smowton smowton closed this Apr 1, 2025
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.

2 participants