Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

Fixes #276 - Allow use of aligned heaps#286

Merged
pchickey merged 1 commit intobytecodealliance:masterfrom
PLSysSec:aligned_heap
Dec 18, 2019
Merged

Fixes #276 - Allow use of aligned heaps#286
pchickey merged 1 commit intobytecodealliance:masterfrom
PLSysSec:aligned_heap

Conversation

@shravanrn
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@acfoltzer acfoltzer left a comment

Choose a reason for hiding this comment

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

This looks great, thank you!

Before we merge, we'll need to add some tests for the new interface. It might be a little bit before I can get to doing that, so if merging the PR quickly is important I can give you guidance on navigating our test suite. In particular, you'd not want to use the TestRegion splice in the test definition macros, since create_aligned() is specific to MmapRegion.

@shravanrn
Copy link
Copy Markdown
Contributor Author

shravanrn commented Sep 9, 2019

@acfoltzer

Before we merge, we'll need to add some tests for the new interface.

I had a look, but as you said, it was a bit tricky to figure out where and how to add the tests 😅

I can give you guidance on navigating our test suite.

I'm happy to take a stab at it, if you give me some details... Could you let me know where the right place in the repo would be for these tests (Is it lucet-runtime-tests, lucet-runtime/tests or should I create a new test folder under lucet-runtime-internals?) Any additional guidelines would be appreciated as well.

It might be a little bit before I can get to doing that, so if merging the PR quickly is important

If this is a matter of a couple of weeks, I'm happy to wait as well 😃

@shravanrn shravanrn force-pushed the aligned_heap branch 2 times, most recently from bfa80dd to 1879d04 Compare September 9, 2019 20:32
@acfoltzer
Copy link
Copy Markdown
Contributor

If this is a matter of a couple of weeks, I'm happy to wait as well

A couple weeks sounds about right. I'd also like to use this as an opportunity to write some better docs about how our test suite is laid out. We have the start of docs on the wiki but that page is not sufficient to answer your questions.

@acfoltzer acfoltzer self-assigned this Nov 6, 2019
@acfoltzer
Copy link
Copy Markdown
Contributor

@shravanrn sorry for the delay on this. I've added more detail to the wiki page that hopefully helps answer your questions.

To make the advice there specific to this use case, I would put unit tests in /lucet-runtime/lucet-runtime-internals/src/region/mmap.rs or a new child module, depending on size; integration tests should probably go in /lucet-runtime/tests.

Another idea that could help get a lot of test coverage quickly without too much new typing would be to create a wrapper type, something like AlignedMmapRegion, that would create an underlying MmapRegion with a particular alignment. Then, where you see the test macros instantiated with MmapRegion, you could add another instantiation with AlignedMmapRegion. I think it'd still be worth writing some tests that are specific to the alignment APIs, though.

@shravanrn
Copy link
Copy Markdown
Contributor Author

That's great! Thanks for the info. This next week unfortunately is pretty busy, but I should be able to get some tests written up the following week.

@shravanrn
Copy link
Copy Markdown
Contributor Author

shravanrn commented Dec 11, 2019

Hi @acfoltzer ,
Sorry for the delay here. I got pulled away on some other stuff and have finally resumed the lucet changes. I have rebased and added some tests. Does this look ok?

@shravanrn
Copy link
Copy Markdown
Contributor Author

@acfoltzer @pchickey - just following up about this

Copy link
Copy Markdown
Contributor

@pchickey pchickey left a comment

Choose a reason for hiding this comment

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

Looks good! Just two minor things

@shravanrn
Copy link
Copy Markdown
Contributor Author

Have made requested changes.

@pchickey pchickey merged commit 5746e21 into bytecodealliance:master Dec 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants