Skip to content

Fuchsia-on-Clusterfuzz integration test.#398

Closed
flowerhack wants to merge 18 commits into
google:masterfrom
flowerhack:fuchsia-clusterfuzz-integration-test-numero-uno
Closed

Fuchsia-on-Clusterfuzz integration test.#398
flowerhack wants to merge 18 commits into
google:masterfrom
flowerhack:fuchsia-clusterfuzz-integration-test-numero-uno

Conversation

@flowerhack

Copy link
Copy Markdown
Contributor

Verifies that the Fuchsia launcher can run Fuchsia on QEMU and SSH into
it accordingly.

Also does some minor fixups throughout the Fuchsia code (does QEMU
teardown after fuzzing is finished, ensures portnum is a str and not an
int, etc)

A few specific questions for reviewers are asked inline.

Verifies that the Fuchsia launcher can run Fuchsia on QEMU and SSH into
it accordingly.

Also does some minor fixups throughout the Fuchsia code (does QEMU
teardown after fuzzing is finished, ensures portnum is a str and not an
int, etc)
@googlebot googlebot added the cla: yes CLA signed. label Apr 23, 2019
# case, with BaseLauncherTest as the base)
# TODO(flowerhack): Does it make more sense to factor out all the setUp
# into its own method, which will have to be specifically called by every
# class in this file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a question for y'all; I'm neutral either way, since neither route is super-aesthetically-pleasing for me

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm confused, why is there a need to call setUp manually?
If you want to share it across multiple classes maybe use a mixin?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Right, maybe my phrasing wasn't super clear:

  • the with_cloud_emulators wrapper wraps a class, in this case TestLauncherFuchsia, and calls its setUp method

  • but, it does not call any further parent's setUp methods! (e.g. BaseLauncherTest, which is what we want)

  • and, if you try to call super(self).setUp within TestLauncherFuchsia, it winds up recursing infinitely, since you're just calling the decorator's setUp method

Do you prefer a mixin to simply being explicit when calling setUp while using this decorator?

(I moved this line into setUp but it's still the same line fyi)

@flowerhack

Copy link
Copy Markdown
Contributor Author

requesting review from @oliverchang and/or @jonathanmetzman (and add others if you feel that's more appropriate!)

@oliverchang oliverchang self-requested a review April 23, 2019 04:37
@flowerhack

Copy link
Copy Markdown
Contributor Author

/gcbrun

1 similar comment
@flowerhack

Copy link
Copy Markdown
Contributor Author

/gcbrun


environment.set_value('QUEUE_OVERRIDE', 'FUCHSIA')
environment.set_value('OS_OVERRIDE', 'FUCHSIA')
os.environ['FUCHSIA_RESOURCES_URL'] = 'gs://fuchsia-on-clusterfuzz-v2/*'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What happened to v1?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this just happened to be the name of the cloud bucket i created for this project; v1 was more of a "testing ground" in practice. i could rename the bucket to something else, if desired, but it's really just a UUID for where we're storing a copy of the SDK & friends for now.

# case, with BaseLauncherTest as the base)
# TODO(flowerhack): Does it make more sense to factor out all the setUp
# into its own method, which will have to be specifically called by every
# class in this file?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm confused, why is there a need to call setUp manually?
If you want to share it across multiple classes maybe use a mixin?

@flowerhack

Copy link
Copy Markdown
Contributor Author

/gcbrun

@flowerhack

Copy link
Copy Markdown
Contributor Author

/gcbrun

@flowerhack

Copy link
Copy Markdown
Contributor Author

@jonathanmetzman think i've responded to everything for now...

@oliverchang oliverchang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nice! looks mostly good. just some very minor comments.

Comment thread src/python/bot/fuzzers/libfuzzer.py Outdated
if timeout_multiplier > 1:
testcase_count /= timeout_multiplier

qemu_process = None

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: this line is unnecessary. variables set in the if have function scope.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

but we need access to qemu_process again on L1482, right?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yeah, but it should still work, because it's only ever accessed when platform == 'FUCHSIA'

Comment thread src/python/platforms/fuchsia/device.py
@flowerhack

Copy link
Copy Markdown
Contributor Author

/gcbrun

@flowerhack

Copy link
Copy Markdown
Contributor Author

/gcbrun

@flowerhack

Copy link
Copy Markdown
Contributor Author

/gcbrun

@flowerhack

Copy link
Copy Markdown
Contributor Author

/gcbrun

@flowerhack

Copy link
Copy Markdown
Contributor Author

/gcbrun

@flowerhack

Copy link
Copy Markdown
Contributor Author

/gcbrun

@flowerhack

Copy link
Copy Markdown
Contributor Author

/gcbrun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes CLA signed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants