tests/boot-sector: Do not overwrite the x86 buffer on other architectures
commit83898cce62ba25a473af6a164388105994481e9c
authorThomas Huth <thuth@redhat.com>
Fri, 11 Aug 2017 05:57:55 +0000 (11 07:57 +0200)
committerCornelia Huck <cohuck@redhat.com>
Wed, 30 Aug 2017 16:23:25 +0000 (30 18:23 +0200)
tree316fc639b138b6aeb173a20dbbb548800732ad53
parent0d4fa4996fc5ee56ea7d072e272b8e69948460a5
tests/boot-sector: Do not overwrite the x86 buffer on other architectures

Re-using the boot_sector code buffer from x86 for other architectures
is not very nice, especially if we add more architectures later. It's
also ugly that the test uses a huge pre-initialized array at all - the
size of the executable is very huge due to this array. So let's use a
separate buffer for each architecture instead, allocated from the heap,
so that we really just use the memory that we need.

Suggested-by: Michael Tsirkin <mst@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <1502431076-22849-2-git-send-email-thuth@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
tests/boot-sector.c