Previously, futex code of McKerenl was called by mccontrol, but there ware some problems with this method. (Mainly, location of McKernel image on memory) Call futex code in mcctrl instead of the one in McKernel image, giving the following benefits: 1. Not relying on shared kernel virtual address space with Linux any more 2. The cpu id store / retrieve is not needed and resulting in the code Change-Id: Ic40929b64a655b270c435859fa287fedb713ee5c refe: #1428
249 lines
8.9 KiB
Plaintext
249 lines
8.9 KiB
Plaintext
./C1428.sh
|
|
mcstop+release.sh ... done
|
|
mcreboot.sh -c 37-43,49-55 -m 2G@2,2G@3 -r 37-43:36+49-55:48 -O ... done
|
|
~/src/mckernel/test/uti/arm64 ~/src/mckernel/test/issues/1428
|
|
~/src/mckernel/test/issues/1428
|
|
*** C1428T01 start *******************************
|
|
CT12001 futex START
|
|
CT12002 pthread_create OK
|
|
CT12100 running on Linux CPU OK
|
|
CT12003 FUTEX_WAKE OK
|
|
CT12101 FUTEX_WAIT OK
|
|
CT12004 pthread_join OK
|
|
CT12005 END
|
|
*** C1428T01 PASSED ******************************
|
|
|
|
*** C1428T02 start *******************************
|
|
CT13001 futex START
|
|
CT13002 pthread_create OK
|
|
CT13100 running on Linux CPU OK
|
|
CT13101 FUTEX_WAKE OK
|
|
CT13003 FUTEX_WAIT OK
|
|
CT13004 pthread_join OK
|
|
CT13005 END
|
|
*** C1428T02 PASSED ******************************
|
|
|
|
*** C1428T03 start *******************************
|
|
CT14001 futex START
|
|
CT14002 util_indicate_clone OK
|
|
CT14003 pthread_create OK
|
|
CT14004 lock first OK
|
|
CT14100 running on Linux OK
|
|
CT14101 lock second OK
|
|
CT14005 pthread_join OK
|
|
CT14006 END
|
|
nsec=94214570, nspw=9.421457
|
|
*** C1428T03 PASSED ******************************
|
|
|
|
*** C1428T04 start *******************************
|
|
CT15001 futex START
|
|
CT15002 util_indicate_clone OK
|
|
CT15003 pthread_create OK
|
|
CT15100 running on Linux OK
|
|
CT15101 lock first OK
|
|
CT15004 lock second OK
|
|
CT15005 pthread_join OK
|
|
CT15006 END
|
|
nsec=94214620, nspw=9.421462
|
|
*** C1428T04 PASSED ******************************
|
|
|
|
*** C1428T05 start *******************************
|
|
CT16001 futex START
|
|
CT16002 util_indicate_clone OK
|
|
CT16003 pthread_create OK
|
|
CT16101 running on Linux OK
|
|
CT16102 return from pthread_cond_wait() OK
|
|
CT16004 pthread_join OK
|
|
CT16005 END
|
|
*** C1428T05 PASSED ******************************
|
|
|
|
*** C1428T06 start *******************************
|
|
CT17001 futex START
|
|
CT17002 util_indicate_clone OK
|
|
CT17003 pthread_create OK
|
|
CT17004 lock on 0x4200a8 OK
|
|
CT17100 running on Linux OK
|
|
CT17005 wake on 0x4200e0 OK
|
|
CT17006 pthread_join OK
|
|
CT17007 END
|
|
*** C1428T06 PASSED ******************************
|
|
|
|
*** C1428T07 start *******************************
|
|
CT18001 futex START
|
|
CT18002 pthread_create OK
|
|
CT18101 running on Linux CPU OK
|
|
start=1613528413.931088714
|
|
op=109
|
|
end=1613528414.759485821
|
|
CT18102 FUTEX_WAIT OK
|
|
CT18103 timeout OK
|
|
CT18003 FUTEX_WAKE missing the waiter OK
|
|
CT18004 pthread_join OK
|
|
CT18005 END
|
|
*** C1428T07 PASSED ******************************
|
|
|
|
*** C1428T08 start *******************************
|
|
CT19001 futex START
|
|
CT19002 pthread_create OK
|
|
CT19100 running on Linux CPU OK
|
|
start=7347844.370216897
|
|
op=9
|
|
end=7347845.190062937
|
|
CT19101 FUTEX_WAIT OK
|
|
CT19102 timeout OK
|
|
CT19003 FUTEX_WAKE missing the waiter OK
|
|
CT19004 pthread_join OK
|
|
CT19005 END
|
|
*** C1428T08 PASSED ******************************
|
|
|
|
*** C1428T09 start *******************************
|
|
CT20001 futex START
|
|
CT20002 pthread_create OK
|
|
CT20100 running on Linux CPU OK
|
|
start=1613528425.067456921
|
|
end=1613528425.879490654
|
|
CT20101 FUTEX_WAIT OK
|
|
CT20102 timeout OK
|
|
CT20003 FUTEX_WAKE missing the waiter OK
|
|
CT20004 pthread_join OK
|
|
CT20005 END
|
|
*** C1428T09 PASSED ******************************
|
|
|
|
*** Stop mckernel to exec CT31-34 on Linux
|
|
mcstop+release.sh ... done
|
|
*** Boot mckernel
|
|
mcreboot.sh -c 37-43,49-55 -m 2G@2,2G@3 -r 37-43:36+49-55:48 -O ... done
|
|
|
|
*** C1428T10 start *******************************
|
|
[INFO] nloop=1000,blocktime=10000000
|
|
[INFO] Master thread (tid: 54422) is running on 00,00
|
|
nsec=94970130, nspw=9.497013
|
|
[ OK ] Master thread is running on McKernel
|
|
[ OK ] util_indicate_clone
|
|
[INFO] Utility thread (tid: 54440) is running on 29,29
|
|
[ OK ] Utility thread is running on Linux
|
|
[INFO] waker: 9756747550 nsec, waiter: 9762950100 nsec, (waiter - waker) / nloop: 6202 nsec
|
|
** Result on Linux **
|
|
[INFO] waker: 9984565840 nsec, waiter: 9988427640 nsec, (waiter - waker) / nloop: 3861 nsec
|
|
*** C1428T10 PASSED ******************************
|
|
|
|
*** C1428T11 start *******************************
|
|
[INFO] nloop=1000,blocktime=10000000
|
|
[INFO] Master thread (tid: 54449) is running on 00,00
|
|
nsec=95183170, nspw=9.518317
|
|
[ OK ] Master thread is running on McKernel
|
|
[ OK ] util_indicate_clone
|
|
[INFO] Utility thread (tid: 54467) is running on 27,27
|
|
[ OK ] Utility thread is running on Linux
|
|
[INFO] waker: 9724199060 nsec, waiter: 9730702360 nsec, (waiter - waker) / nloop: 6503 nsec
|
|
** Result on Linux **
|
|
[INFO] waker: 9987888970 nsec, waiter: 9991459180 nsec, (waiter - waker) / nloop: 3570 nsec
|
|
*** C1428T11 PASSED ******************************
|
|
|
|
*** C1428T12 start *******************************
|
|
[INFO] nloop=1000,blocktime=10000000
|
|
[INFO] Master thread (tid: 54476) is running on 00,00
|
|
nsec=96968310, nspw=9.696831
|
|
[ OK ] Master thread is running on McKernel
|
|
[ OK ] util_indicate_clone
|
|
[INFO] Utility thread (tid: 54494) is running on 27,27
|
|
[ OK ] Utility thread is running on Linux
|
|
[INFO] waiter: 9747346620 nsec, waker: 9736919490 nsec, (waiter - waker) / nloop: 10427 nsec
|
|
** Result on Linux **
|
|
[INFO] waiter: 9922548360 nsec, waker: 9918225010 nsec, (waiter - waker) / nloop: 4323 nsec
|
|
*** C1428T12 PASSED ******************************
|
|
|
|
*** C1428T13 start *******************************
|
|
[INFO] nloop=1000,blocktime=10000000
|
|
[INFO] Master thread (tid: 54503) is running on 01,01
|
|
nsec=94160460, nspw=9.416046
|
|
[ OK ] Master thread is running on McKernel
|
|
[ OK ] util_indicate_clone
|
|
[INFO] Utility thread (tid: 54521) is running on 01,01
|
|
[ OK ] Utility thread is running on Linux
|
|
[INFO] waiter: 10112660440 nsec, waker: 10105975190 nsec, (waiter - waker) / nloop: 6685 nsec
|
|
** Result on Linux **
|
|
[INFO] waiter: 10082423010 nsec, waker: 10078381240 nsec, (waiter - waker) / nloop: 4041 nsec
|
|
*** C1428T13 PASSED ******************************
|
|
|
|
*** C1428T14 start *******************************
|
|
futex_wait01 1 TPASS : futex_wait(): errno=ETIMEDOUT(110): Connection timed out
|
|
futex_wait01 2 TPASS : futex_wait(): errno=EAGAIN/EWOULDBLOCK(11): Resource temporarily unavailable
|
|
futex_wait01 3 TPASS : futex_wait(): errno=ETIMEDOUT(110): Connection timed out
|
|
futex_wait01 4 TPASS : futex_wait(): errno=EAGAIN/EWOULDBLOCK(11): Resource temporarily unavailable
|
|
*** C1428T14 PASSED (4)
|
|
|
|
*** C1428T15 start *******************************
|
|
futex_wait02 1 TPASS : futex_wait() woken up
|
|
*** C1428T15 PASSED (1)
|
|
|
|
*** C1428T16 start *******************************
|
|
futex_wait03 1 TPASS : futex_wait() woken up
|
|
*** C1428T16 PASSED (1)
|
|
|
|
*** C1428T17 start *******************************
|
|
futex_wait04 1 TPASS : futex_wait() returned -1: errno=EAGAIN/EWOULDBLOCK(11): Resource temporarily unavailable
|
|
*** C1428T17 PASSED (1)
|
|
|
|
*** C1428T18 start *******************************
|
|
tst_test.c:1096: INFO: Timeout per run is 0h 05m 00s
|
|
futex_wait_bitset.h:17: INFO: testing futex_wait_bitset() timeout with CLOCK_MONOTONIC
|
|
futex_wait_bitset.h:59: PASS: futex_wait_bitset() waited 102024us, expected 100010us
|
|
|
|
Summary:
|
|
passed 1
|
|
failed 0
|
|
skipped 0
|
|
warnings 0
|
|
*** C1428T18 PASSED (1)
|
|
|
|
*** C1428T19 start *******************************
|
|
tst_test.c:1096: INFO: Timeout per run is 0h 05m 00s
|
|
futex_wait_bitset.h:17: INFO: testing futex_wait_bitset() timeout with CLOCK_REALTIME
|
|
futex_wait_bitset.h:59: PASS: futex_wait_bitset() waited 101995us, expected 100010us
|
|
|
|
Summary:
|
|
passed 1
|
|
failed 0
|
|
skipped 0
|
|
warnings 0
|
|
*** C1428T19 PASSED (1)
|
|
|
|
*** C1428T20 start *******************************
|
|
futex_wake01 1 TPASS : futex_wake() returned 0
|
|
futex_wake01 2 TPASS : futex_wake() returned 0
|
|
futex_wake01 3 TPASS : futex_wake() returned 0
|
|
futex_wake01 4 TPASS : futex_wake() returned 0
|
|
futex_wake01 5 TPASS : futex_wake() returned 0
|
|
futex_wake01 6 TPASS : futex_wake() returned 0
|
|
*** C1428T20 PASSED (6)
|
|
|
|
*** C1428T21 start *******************************
|
|
futex_wake02 1 TPASS : futex_wake() woken up 1 threads
|
|
futex_wake02 2 TPASS : futex_wake() woken up 2 threads
|
|
futex_wake02 3 TPASS : futex_wake() woken up 3 threads
|
|
futex_wake02 4 TPASS : futex_wake() woken up 4 threads
|
|
futex_wake02 5 TPASS : futex_wake() woken up 5 threads
|
|
futex_wake02 6 TPASS : futex_wake() woken up 6 threads
|
|
futex_wake02 7 TPASS : futex_wake() woken up 7 threads
|
|
futex_wake02 8 TPASS : futex_wake() woken up 8 threads
|
|
futex_wake02 9 TPASS : futex_wake() woken up 9 threads
|
|
futex_wake02 10 TPASS : futex_wake() woken up 10 threads
|
|
futex_wake02 11 TPASS : futex_wake() woken up 0 threads
|
|
futex_wake02 0 TINFO : Child process returned TPASS
|
|
*** C1428T21 PASSED (12)
|
|
|
|
*** C1428T22 start *******************************
|
|
futex_wake03 1 TPASS : futex_wake() woken up 1 childs
|
|
futex_wake03 2 TPASS : futex_wake() woken up 2 childs
|
|
futex_wake03 3 TPASS : futex_wake() woken up 3 childs
|
|
futex_wake03 4 TPASS : futex_wake() woken up 4 childs
|
|
futex_wake03 5 TPASS : futex_wake() woken up 5 childs
|
|
futex_wake03 6 TPASS : futex_wake() woken up 6 childs
|
|
futex_wake03 7 TPASS : futex_wake() woken up 7 childs
|
|
futex_wake03 8 TPASS : futex_wake() woken up 8 childs
|
|
futex_wake03 9 TPASS : futex_wake() woken up 9 childs
|
|
futex_wake03 10 TPASS : futex_wake() woken up 10 childs
|
|
futex_wake03 11 TPASS : futex_wake() woken up 0 children
|
|
*** C1428T22 PASSED (11)
|