-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapi_hooks.robot
48 lines (40 loc) · 2.22 KB
/
api_hooks.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
*** Comments ***
Copyright (c) 2020, Nokia Solutions and Networks. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
*** Settings ***
Resource common.robot
Suite Teardown Terminate All Processes kill=True
*** Variables ***
@{match} =
... Dispatch enter callback\\s+EO\:\'EO [AB]\'\\(0x[0-9|A-F|a-f]+\\)\\s+Queue\:0x[0-9|A-F|a-f]+ on core[0-9]+\\s+Event\:0x[0-9|A-F|a-f]+\\s+Event-seq:[0-9]+
... EO\-rcv\: Ping from EO\:\'EO [AB]\'\\(0x[0-9|A-F|a-f]+\\) on core[0-9]+!\\s+Queue\:0x[0-9|A-F|a-f]+\\s+Event\:0x[0-9|A-F|a-f]+\\s+Event\-seq\:[0-9]+
... EO\-rcv\: Ping from EO\:\'EO [AB]\'\\(0x[0-9|A-F|a-f]+\\) on core[0-9]+!\\s+Queue\:0x[0-9|A-F|a-f]+\\s+Event\:0x[0-9|A-F|a-f]+\\s+Event\-seq\:[1-9]+
... Alloc-hook\\s+EO\:\'EO [AB]'\\(0x[0-9|A-F|a-f]+\\)\\s+sz\:[0-9]+\\s+type\:0x[0-9|A-F|a-f]+\\s+pool\:0x[0-9|A-F|a-f]+\\s+Events\\[\\d\\]\:\\s+0x[0-9|A-F|a-f]+
... Free-hook\\s+EO\:\'EO [AB]\'\\(0x[0-9|A-F|a-f]+\\)\\s+Events\\[\\d\\]\:\\s+0x[0-9|A-F|a-f]+
... Send-hook\\s+EO\:\'EO [AB]\'\\(0x[0-9|A-F|a-f]+\\)\\s+[1-9]+\\s+event\\(s\\)\\s+Queue\:0x[0-9|A-F|a-f]+\\s+\=\=\>\\s+0x[0-9|A-F|a-f]+\\s+Events\\[\\d\\]\:\\s+0x[0-9|A-F|a-f]+
... Dispatch exit callback\\s+EO\:\'EO [AB]\'\\(0x[0-9|A-F|a-f]+\\)
@{do_not_match} =
... EM ERROR
*** Test Cases ***
Test API Hooks
[Documentation] api-hooks -c ${core_mask} -${mode}
# Run application
Start Process ${application} ${SPACE} -c ${SPACE} ${core_mask} ${SPACE} -${mode} stderr=STDOUT shell=True alias=app
Sleep 25s
# Terminate application
Send Signal To Process SIGINT app group=true
${output} = Wait For Process app timeout=5s on_timeout=kill
Log ${output.stdout} console=yes
Process Should Be Stopped app
List Should Contain Value ${rc_list} ${output.rc} Return Code: ${output.rc}
# Match terminal output
FOR ${line} IN @{match}
Should Match Regexp ${output.stdout} ${line}
END
FOR ${line} IN @{do_not_match}
Should Not Match Regexp ${output.stdout} ${line}
END
# Match pool statistics
FOR ${line} IN @{pool_statistics_match}
Should Match Regexp ${output.stdout} ${line}
END