mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 08:48:31 -05:00
tests: Use a single timestamp in all vm-run.sh instances
This avoids possible mismatches in directory and log file timestamps if the UNIX timestamp (seconds) changes during the startup sequence. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
7613345814
commit
7e6942253c
@ -129,7 +129,8 @@ def main():
|
||||
vm = {}
|
||||
for i in range(0, num_servers):
|
||||
print("\rStarting virtual machine {}/{}".format(i + 1, num_servers)),
|
||||
cmd = ['./vm-run.sh', '--ext', 'srv.%d' % (i + 1),
|
||||
cmd = ['./vm-run.sh', '--timestamp', str(timestamp),
|
||||
'--ext', 'srv.%d' % (i + 1),
|
||||
'--split', '%d/%d' % (i + 1, num_servers)] + sys.argv[2:]
|
||||
vm[i] = {}
|
||||
vm[i]['proc'] = subprocess.Popen(cmd,
|
||||
|
@ -15,7 +15,7 @@ DATE=$(date +%s)
|
||||
|
||||
for i in `seq 1 $NUM`; do
|
||||
printf "\rStarting virtual machine $i/$NUM"
|
||||
./vm-run.sh --ext srv.$i --split $i/$NUM $* >> $LOGS/parallel-$DATE.srv.$i 2>&1 &
|
||||
./vm-run.sh --timestamp $DATE --ext srv.$i --split $i/$NUM $* >> $LOGS/parallel-$DATE.srv.$i 2>&1 &
|
||||
done
|
||||
echo
|
||||
|
||||
|
@ -43,13 +43,18 @@ fi
|
||||
CMD=$TESTDIR/vm/inside.sh
|
||||
|
||||
unset RUN_TEST_ARGS
|
||||
DATE=$(date +%s)
|
||||
TIMESTAMP=$(date +%s)
|
||||
DATE=$TIMESTAMP
|
||||
CODECOV=no
|
||||
TIMEWARP=0
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
--timestamp ) shift
|
||||
TIMESTAMP=$1
|
||||
shift
|
||||
;;
|
||||
--ext ) shift
|
||||
DATE=$(date +%s).$1
|
||||
DATE=$TIMESTAMP.$1
|
||||
shift
|
||||
;;
|
||||
--codecov ) shift
|
||||
|
Loading…
Reference in New Issue
Block a user