Signed-off-by: Yu Chuan 13186087857@163.com --- providers/qemu/kvm.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/providers/qemu/kvm.sh b/providers/qemu/kvm.sh index 35678fbd44ef..93977ec15438 100755 --- a/providers/qemu/kvm.sh +++ b/providers/qemu/kvm.sh @@ -6,6 +6,9 @@
: ${nr_cpu:=1} : ${memory:=1G} +: ${LKP_SRC:="/c/lkp-tests"} + +source ${LKP_SRC}/lib/log.sh
check_logfile() { @@ -52,15 +55,23 @@ parse_ipxe_script()
check_option_value() { + [ -n "$kernel" ] || { + log_info "Can not find job for current hostname: $hostname." + exit 0 + } + [ -s "$kernel" ] || { - echo "The kernel does not exist: $kernel" - exit + log_error "Can not find kernel file or kernel file is empty: $kernel." + exit 1 } # debian has both qemu-system-x86_64 and qemu-system-riscv64 command [[ $kernel =~ 'riscv64' ]] && qemu=qemu-system-riscv64
- [ -n "$initrds" ] || exit + [ -n "$initrds" ] || { + log_error "Can not find any initrd for current vm." + exit 1 + } }
set_initrd()
On Tue, Jan 19, 2021 at 03:23:29PM +0800, Yu Chuan wrote:
Signed-off-by: Yu Chuan 13186087857@163.com
providers/qemu/kvm.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/providers/qemu/kvm.sh b/providers/qemu/kvm.sh index 35678fbd44ef..93977ec15438 100755 --- a/providers/qemu/kvm.sh +++ b/providers/qemu/kvm.sh @@ -6,6 +6,9 @@
- [ -n "$initrds" ] || exit
- [ -n "$initrds" ] || {
log_error "Can not find any initrd for current vm."
How about to delete "for current vm"?
Or log_error "The current initrds is null"?
Thanks, Xueliang
exit 1
- }
}
set_initrd()
2.23.0
On Wed, Jan 20, 2021 at 09:02:19AM +0800, Cao Xueliang wrote:
On Tue, Jan 19, 2021 at 03:23:29PM +0800, Yu Chuan wrote:
Signed-off-by: Yu Chuan 13186087857@163.com
providers/qemu/kvm.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/providers/qemu/kvm.sh b/providers/qemu/kvm.sh index 35678fbd44ef..93977ec15438 100755 --- a/providers/qemu/kvm.sh +++ b/providers/qemu/kvm.sh @@ -6,6 +6,9 @@
- [ -n "$initrds" ] || exit
- [ -n "$initrds" ] || {
log_error "Can not find any initrd for current vm."
How about to delete "for current vm"?
Or log_error "The current initrds is null"?
OK.
-------- Thanks Yu Chuan
Thanks, Xueliang
exit 1
- }
}
set_initrd()
2.23.0
--- a/providers/qemu/kvm.sh +++ b/providers/qemu/kvm.sh @@ -6,6 +6,9 @@
- [ -n "$initrds" ] || exit
- [ -n "$initrds" ] || {
[ -s "initrds" ] also need?
Thanks, Yinsi
log_error "Can not find any initrd for current vm."
How about to delete "for current vm"?
Or log_error "The current initrds is null"?
OK.
Thanks Yu Chuan
Thanks, Xueliang
exit 1
- }
}
set_initrd()
2.23.0