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

Some Merged Tests Will Never Fail or Pass Correctly Due to a Void Return Value #92381

Closed
ivdiazsa opened this issue Sep 20, 2023 · 2 comments
Closed
Assignees
Milestone

Comments

@ivdiazsa
Copy link
Member

While browsing some tests in the src/tests subtree, I found out some tests have their TestEntryPoint() method defined as void type. Consequently, the merged test's respective script will never know how the test truly went since it requires a return value.

For example, the way the script defines whether the test passed or not is with the following code:

{ ... }

export CLRTestExpectedExitCode=100

{ ... }

if [ $CLRTestExitCode -ne $CLRTestExpectedExitCode ]
then
  echo END EXECUTION - FAILED
  exit 1
else
  echo END EXECUTION - PASSED
  exit 0
fi

The script expects a 100 return code upon success, so the test would need to return an int type value.

@ivdiazsa ivdiazsa added this to the 9.0.0 milestone Sep 20, 2023
@ivdiazsa ivdiazsa self-assigned this Sep 20, 2023
@ghost
Copy link

ghost commented Sep 20, 2023

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

Issue Details

While browsing some tests in the src/tests subtree, I found out some tests have their TestEntryPoint() method defined as void type. Consequently, the merged test's respective script will never know how the test truly went since it requires a return value.

For example, the way the script defines whether the test passed or not is with the following code:

{ ... }

export CLRTestExpectedExitCode=100

{ ... }

if [ $CLRTestExitCode -ne $CLRTestExpectedExitCode ]
then
  echo END EXECUTION - FAILED
  exit 1
else
  echo END EXECUTION - PASSED
  exit 0
fi

The script expects a 100 return code upon success, so the test would need to return an int type value.

Author: ivdiazsa
Assignees: ivdiazsa
Labels:

area-Infrastructure-coreclr

Milestone: 9.0.0

@ivdiazsa
Copy link
Member Author

There is a system that handles void return tests appropriately now, so closing this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

No branches or pull requests

1 participant