From 185b0e357918bdaba8ab363f149cef58c60dbae2 Mon Sep 17 00:00:00 2001 From: bxuxa Date: Fri, 21 Sep 2018 16:27:06 +0800 Subject: [PATCH] Two changes on xcatperftest - add timeout when executing the test commands - add `lsdef -w` and `chdef -p` into default commands list --- xCAT-test/autotest/perfcmds.lst | 6 ++++-- xCAT-test/bin/xcatperftest | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/xCAT-test/autotest/perfcmds.lst b/xCAT-test/autotest/perfcmds.lst index 66f32a3a0..755c59fb4 100644 --- a/xCAT-test/autotest/perfcmds.lst +++ b/xCAT-test/autotest/perfcmds.lst @@ -1,5 +1,5 @@ -#SERIES# 1,50,100,250,500,1000,2500,5000,10000 -lsdef #NODES# +#SERIES# 1,50,100,250,500,1000,2500,5000,10000,20000 +lsdef #NODES# -i ip,mac makehosts #NODES# makedns -n #NODES# makedhcp #NODES# @@ -10,4 +10,6 @@ nodeset #NODES# osimage=#OSIMAGE# chdef -t node -o #NODES# postscripts="fake" profile="install" netboot="grub2" rmdef -t node #PERFGRP# cat #STANZ#|mkdef -z -f +lsdef -w 'serial=12345678' +chdef #NODES# -p groups=group1 noderm #PERFGRP# diff --git a/xCAT-test/bin/xcatperftest b/xCAT-test/bin/xcatperftest index b0d5d5d21..f3da28651 100755 --- a/xCAT-test/bin/xcatperftest +++ b/xCAT-test/bin/xcatperftest @@ -347,7 +347,12 @@ execCmd() fi start=`date +%s%3N` - eval "$1" > /dev/null 2>&1 + + #using timeout to avoid some commands hang + timeout 3600 bash < /dev/null 2>&1 +EOT + retval=$? end=`date +%s%3N` delta=$(printf "%.2f" `echo "scale=2;$(($end-$start))/1000"|bc`)