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

Pipeline to run Exploratory fuzzing tool to catch codegen issues #59489

Merged
merged 22 commits into from
Sep 27, 2021

Conversation

kunalspathak
Copy link
Member

Add an "internal" pipeline to run exploratory tools and return back the repro files.

Add pipeline to run exploratory tools and return back the result
@ghost
Copy link

ghost commented Sep 22, 2021

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

Issue Details

Add an "internal" pipeline to run exploratory tools and return back the repro files.

Author: kunalspathak
Assignees: -
Labels:

area-Infrastructure-coreclr

Milestone: -

@kunalspathak kunalspathak changed the title Exploratory tool pipeline Pipeline to run Exploratory tool to catch codegen issues Sep 22, 2021
@kunalspathak
Copy link
Member Author

@dotnet/jit-contrib

@kunalspathak kunalspathak changed the title Pipeline to run Exploratory tool to catch codegen issues Pipeline to run Exploratory fuzzing tool to catch codegen issues Sep 22, 2021
Copy link
Member

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

Some comments/questions

There's a lot of code here, and not much in the way of "overall" documentation besides just reading all the code. I worry about that, in terms of maintainability. However, I presume this is just a first step, and you want to get something in and then work on it as we gain more experience with it, and add additional exploratory tools.

eng/pipelines/coreclr/exploratory.yml Outdated Show resolved Hide resolved
eng/pipelines/coreclr/exploratory.yml Show resolved Hide resolved
eng/pipelines/coreclr/templates/exploratory-job.yml Outdated Show resolved Hide resolved
src/coreclr/scripts/exploratory.proj Outdated Show resolved Hide resolved
src/coreclr/scripts/exploratory.proj Show resolved Hide resolved
src/coreclr/scripts/exploratory.py Outdated Show resolved Hide resolved
src/coreclr/scripts/exploratory.py Outdated Show resolved Hide resolved
@kunalspathak
Copy link
Member Author

There's a lot of code here, and not much in the way of "overall" documentation

I have included Antigen.md file.

Copy link
Member

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

LGTM. A couple comments for future considertion.


schedules:
- cron: "0 6 * * *"
displayName: Daily at 11:30 PM (UTC-8:00)
Copy link
Member

Choose a reason for hiding this comment

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

It seems like daily is too often, and weekly might make more sense. But I'm ok with this; we can change our mind about scheduling later.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I will schedule it for weekly for now.

@@ -12,10 +12,10 @@ steps:
inputs:
buildType: specific
project: 'internal' # 'internal' or 'public'
pipeline: 'superpmi-replay'
Copy link
Member

Choose a reason for hiding this comment

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

Is this file only used for testing?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this is used to skip building coreclr/libraries and download these from previous runs. This helps in fast testing during pipeline development.

src/coreclr/scripts/Antigen.md Outdated Show resolved Hide resolved
src/coreclr/scripts/antigen_setup.py Show resolved Hide resolved
Comment on lines +122 to +136
antigen_bin_directory = path.join(tool_code_directory, "bin", "Release", "net5.0")

# build the tool
with ChangeDir(tool_code_directory):
dotnet_cmd = os.path.join(source_directory, "dotnet.cmd")
if not is_windows:
dotnet_cmd = os.path.join(source_directory, "dotnet.sh")
run_command([dotnet_cmd, "publish", "-c", "Release", "--self-contained", "-r", run_configuration, "-o", antigen_bin_directory], _exit_on_fail=True)

if not os.path.exists(path.join(antigen_bin_directory, "Antigen.dll")):
raise FileNotFoundError("Antigen.dll not present at {}".format(antigen_bin_directory))

# copy antigen tool
print('Copying {} -> {}'.format(antigen_bin_directory, antigen_dst_directory))
copy_directory(antigen_bin_directory, antigen_dst_directory, match_func=acceptable_copy)
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this should all be encapsulated in a script in the antigen source directory, so this script doesn't need to know how to build the tool. Something like <tool_code_directory>build.cmd <dotnet_tool/script_to_use> <antigen_dst_directory>.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I will fix it in antigen and make related change here as a follow-up PR.

@kunalspathak kunalspathak mentioned this pull request Sep 25, 2021
4 tasks
@kunalspathak kunalspathak merged commit 78ac843 into dotnet:main Sep 27, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants