Fixed time processing.

- arm64: Get TSC corresponding to boot time from IHK.

- x86_64: Calculate the current time using vdso.

Refs: #1186
Fujitsu: POSTK_DEBUG_ARCH_DEP_52
Change-Id: I293ba4bbe5390d50dea44b8a5b7471f59237daff
This commit is contained in:
Tomoki Shirasawa
2019-02-17 16:37:29 +09:00
committed by Masamichi Takagi
parent 07aa96ef95
commit 5bc54a3bbe
15 changed files with 471 additions and 88 deletions

41
test/issues/1186/C1186.sh Normal file
View File

@ -0,0 +1,41 @@
#!/bin/sh
USELTP=1
USEOSTEST=0
USESTRESSTEST=1
MCREBOOT=0
MCSTOP=0
. ../../common.sh
################################################################################
ng=0
for i in {1..60}; do
if ! $MCEXEC $LTPBIN/futex_wait_bitset02; then
ng=1
break
fi
if [ $i != 60 ]; then
sleep 60
fi
done
if [ $ng = 0 ]; then
echo "*** C1186T01: OK"
else
echo "*** C1186T01: NG"
fi
$MCEXEC ./C1186
for i in gettimeofday01:03 gettimeofday02:04 time01:05 time02:06 \
clock_nanosleep01:07 clock_nanosleep2_01:08 sigtimedwait01:09; do
tp=`echo $i|sed 's/:.*//'`
id=`echo $i|sed 's/.*://'`
sudo $MCEXEC $LTPBIN/$tp 2>&1 | tee $tp.txt
ok=`grep TPASS $tp.txt | wc -l`
ng=`grep TFAIL $tp.txt | wc -l`
if [ $ng = 0 ]; then
echo "*** C1186T$id: $tp OK ($ok)"
else
echo "*** C1186T$id: $tp NG (ok=$ok ng=%ng)"
fi
done