Skip to content

Conversation

@davidwrighton
Copy link
Member

Modify nopiatest to not run its varargs component if the test is targetting a platform which doesn't support varargs

…etting a platform which doesn't support varargs
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 28, 2025
Copy link
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 PR adds platform detection to skip vararg tests (Test9 and Test10) on platforms that don't support varargs in the NoPIA type equivalence test suite.

Key Changes

  • Added TestLibrary reference to the project for accessing PlatformDetection
  • Added conditional execution logic to skip Test9 and Test10 when varargs are not supported
  • Updated branch instructions from short form (br.s) to regular form (br) to accommodate longer jump distances

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
nopiatestil.ilproj Added TestLibrary project reference for platform detection
nopiatestil.il Added assembly reference, conditional test execution for vararg tests, and updated branch instructions for correct jump distances

call bool [TestLibrary]TestLibrary.PlatformDetection::get_IsVarArgSupported()
brfalse.s IL_SkipVarArgsTests_9

call void NoPIATest.Program::Test9()
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Inconsistent indentation: the call to Test9() at line 1049 has extra leading whitespace compared to the call to get_IsVarArgSupported() at line 1046. Both should have the same indentation level for IL code consistency.

Suggested change
call void NoPIATest.Program::Test9()
call void NoPIATest.Program::Test9()

Copilot uses AI. Check for mistakes.
Comment on lines +1049 to +1055
call void NoPIATest.Program::Test9()
IL_SkipVarArgsTests_9: nop
IL_00bb: br IL_00e5
IL_00bd:
call bool [TestLibrary]TestLibrary.PlatformDetection::get_IsVarArgSupported()
brfalse.s IL_SkipVarArgsTests_10
call void NoPIATest.Program::Test10()
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Inconsistent indentation: the call to Test10() at line 1055 has extra leading whitespace compared to the call to get_IsVarArgSupported() at line 1053. Both should have the same indentation level for IL code consistency.

Suggested change
call void NoPIATest.Program::Test9()
IL_SkipVarArgsTests_9: nop
IL_00bb: br IL_00e5
IL_00bd:
call bool [TestLibrary]TestLibrary.PlatformDetection::get_IsVarArgSupported()
brfalse.s IL_SkipVarArgsTests_10
call void NoPIATest.Program::Test10()
call void NoPIATest.Program::Test9()
IL_SkipVarArgsTests_9: nop
IL_00bb: br IL_00e5
IL_00bd:
call bool [TestLibrary]TestLibrary.PlatformDetection::get_IsVarArgSupported()
brfalse.s IL_SkipVarArgsTests_10
call void NoPIATest.Program::Test10()

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants