mirror of
https://passt.top/passt
synced 2024-12-22 13:45:32 +00:00
test: Kernel binary can now be passed via the KERNEL environmental variable
This is quite useful at least for myself as I'm usually running tests using a guest kernel that's not the same as the one on the host. Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
b55013b1a7
commit
def8acdcd8
@ -58,7 +58,7 @@ setup_passt() {
|
|||||||
context_run_bg qemu 'qemu-system-'"${QEMU_ARCH}" \
|
context_run_bg qemu 'qemu-system-'"${QEMU_ARCH}" \
|
||||||
' -machine accel=kvm' \
|
' -machine accel=kvm' \
|
||||||
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
|
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
|
||||||
' -kernel ' "/boot/vmlinuz-$(uname -r)" \
|
' -kernel '"${KERNEL}" \
|
||||||
' -initrd '${INITRAMFS}' -nographic -serial stdio' \
|
' -initrd '${INITRAMFS}' -nographic -serial stdio' \
|
||||||
' -nodefaults' \
|
' -nodefaults' \
|
||||||
' -append "console=ttyS0 mitigations=off apparmor=0" ' \
|
' -append "console=ttyS0 mitigations=off apparmor=0" ' \
|
||||||
@ -159,7 +159,7 @@ setup_passt_in_ns() {
|
|||||||
' -machine accel=kvm' \
|
' -machine accel=kvm' \
|
||||||
' -M accel=kvm:tcg' \
|
' -M accel=kvm:tcg' \
|
||||||
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
|
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
|
||||||
' -kernel ' "/boot/vmlinuz-$(uname -r)" \
|
' -kernel '"${KERNEL}" \
|
||||||
' -initrd '${INITRAMFS}' -nographic -serial stdio' \
|
' -initrd '${INITRAMFS}' -nographic -serial stdio' \
|
||||||
' -nodefaults' \
|
' -nodefaults' \
|
||||||
' -append "console=ttyS0 mitigations=off apparmor=0" ' \
|
' -append "console=ttyS0 mitigations=off apparmor=0" ' \
|
||||||
@ -230,7 +230,7 @@ setup_two_guests() {
|
|||||||
context_run_bg qemu_1 'qemu-system-'"${QEMU_ARCH}" \
|
context_run_bg qemu_1 'qemu-system-'"${QEMU_ARCH}" \
|
||||||
' -M accel=kvm:tcg' \
|
' -M accel=kvm:tcg' \
|
||||||
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
|
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
|
||||||
' -kernel ' "/boot/vmlinuz-$(uname -r)" \
|
' -kernel '"${KERNEL}" \
|
||||||
' -initrd '${INITRAMFS}' -nographic -serial stdio' \
|
' -initrd '${INITRAMFS}' -nographic -serial stdio' \
|
||||||
' -nodefaults' \
|
' -nodefaults' \
|
||||||
' -append "console=ttyS0 mitigations=off apparmor=0" ' \
|
' -append "console=ttyS0 mitigations=off apparmor=0" ' \
|
||||||
@ -243,7 +243,7 @@ setup_two_guests() {
|
|||||||
context_run_bg qemu_2 'qemu-system-'"${QEMU_ARCH}" \
|
context_run_bg qemu_2 'qemu-system-'"${QEMU_ARCH}" \
|
||||||
' -M accel=kvm:tcg' \
|
' -M accel=kvm:tcg' \
|
||||||
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
|
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
|
||||||
' -kernel ' "/boot/vmlinuz-$(uname -r)" \
|
' -kernel '"${KERNEL}" \
|
||||||
' -initrd '${INITRAMFS}' -nographic -serial stdio' \
|
' -initrd '${INITRAMFS}' -nographic -serial stdio' \
|
||||||
' -nodefaults' \
|
' -nodefaults' \
|
||||||
' -append "console=ttyS0 mitigations=off apparmor=0" ' \
|
' -append "console=ttyS0 mitigations=off apparmor=0" ' \
|
||||||
|
@ -664,7 +664,7 @@ pause_continue() {
|
|||||||
|
|
||||||
# run_term() - Start tmux session, running entry point, with recording if needed
|
# run_term() - Start tmux session, running entry point, with recording if needed
|
||||||
run_term() {
|
run_term() {
|
||||||
TMUX="tmux new-session -s passt_test -eSTATEBASE=$STATEBASE -ePCAP=$PCAP -eDEBUG=$DEBUG"
|
TMUX="tmux new-session -s passt_test -eSTATEBASE=$STATEBASE -ePCAP=$PCAP -eDEBUG=$DEBUG -eKERNEL=$KERNEL"
|
||||||
|
|
||||||
if [ ${CI} -eq 1 ]; then
|
if [ ${CI} -eq 1 ]; then
|
||||||
printf '\e[8;50;240t'
|
printf '\e[8;50;240t'
|
||||||
|
3
test/run
3
test/run
@ -38,6 +38,9 @@ TRACE=${TRACE:-0}
|
|||||||
# If set, tell passt and pasta to take packet captures
|
# If set, tell passt and pasta to take packet captures
|
||||||
PCAP=${PCAP:-0}
|
PCAP=${PCAP:-0}
|
||||||
|
|
||||||
|
# Custom kernel to boot guests with, if given
|
||||||
|
KERNEL=${KERNEL:-"/boot/vmlinuz-$(uname -r)"}
|
||||||
|
|
||||||
COMMIT="$(git log --oneline --no-decorate -1)"
|
COMMIT="$(git log --oneline --no-decorate -1)"
|
||||||
|
|
||||||
. lib/util
|
. lib/util
|
||||||
|
Loading…
Reference in New Issue
Block a user