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

Mozak-loader tests based on empty-elf #1049

Merged
merged 11 commits into from
Jan 10, 2024
Merged

Mozak-loader tests based on empty-elf #1049

merged 11 commits into from
Jan 10, 2024

Conversation

reshmem
Copy link
Contributor

@reshmem reshmem commented Jan 8, 2024

  • Adds examples/empty ELF
  • Adds tests in runner/src/elf.rs that use this empty-elf to check mozak-loader

@reshmem reshmem changed the title [WIP] - Empty elf example Empty elf example + mozak-loader tests that use this empty-elf Jan 9, 2024
matthiasgoergens added a commit that referenced this pull request Jan 10, 2024
Tiny PR, to help with mozak-loader testing (part of
#1049)

Co-authored-by: Matthias Görgens <matthias.goergens@mozak.com>
fn test_empty_elf_check_assumed_values() {
// This test ensures mozak-loader & mozak-linker-script is indeed aligned
let mozak_ro_memory = Program::mozak_load_program(
mozak_examples::EMPTY_ELF,
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this test only work for EMPTY_ELF? I think it should work for any ELF

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm assuming it'd be more tedious to check every ELF that we have, since they might not all share (for eg.) similar run time args?

My understanding of this PR is that this ensures our loader is working as expected, and isn't necessarily a test for ELFs specifically, so an empty one would serve that purpose - we could have a followup PR if necessary?

Copy link
Contributor

@spiral-ladder spiral-ladder left a comment

Choose a reason for hiding this comment

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

1 small comment/question

Copy link
Contributor

@spiral-ladder spiral-ladder left a comment

Choose a reason for hiding this comment

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

LGTM, deferring to @vivekvpandya regarding the ELF comment/conversation

@reshmem reshmem changed the title Empty elf example + mozak-loader tests that use this empty-elf Mozak-loader tests based on empty-elf Jan 10, 2024
@reshmem reshmem merged commit 8024199 into main Jan 10, 2024
@reshmem reshmem deleted the roman/empty-elf-example branch January 10, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants