rust-vmm / linux-loader

Linux kernel loader
Apache License 2.0
180 stars 54 forks source link

Document procedure to generate ELF binaries used in unit tests #30

Open aljimenezb opened 4 years ago

aljimenezb commented 4 years ago

As discussed in https://github.com/rust-vmm/linux-loader/pull/29, it is useful to have the instructions for generating the ELF binaries used for unit tests. Currently those instructions appear in the commits that introduce the binaries e.g. https://github.com/rust-vmm/linux-loader/commit/0ce5bfa70d1073a9743fadfea233edef09c81e49

Possible approaches are:

aghecenco commented 4 years ago

How about a build hook that generates them, similar to how the bzimage test payload is obtained? For that, this script is run before the unit tests for bzimage. Can the build steps be packaged in a shell script and similarly included in the build?

LE: there's also a section in the readme on how to build the test binaries.

andreeaflorescu commented 4 years ago

We could also have this in two steps:

  1. Add a section in a separate doc
  2. Actually generate those binaries at build time

WDYT?

aghecenco commented 4 years ago

Item 1 is a natural predecessor to 2, 2 could be picked up by any contributor who has the instructions, I like it.