Commit Graph

18 Commits

Author SHA1 Message Date
Szymon Janc
ef2b882fcc android/unit: Some codestyle cleanups 2014-02-04 21:35:11 +01:00
Szymon Janc
e6d44eb406 android/unit: Make tests names shorter 2014-02-04 21:35:11 +01:00
Jakub Tyszkowski
08c2d2d152 android/unit: Add cases for msg size verification
This patch adds checking for proper msg size verification in case it is
not declared in handlers that this is variable sized message. In
such case malformed data should not be accepted.
2014-02-04 21:35:11 +01:00
Jakub Tyszkowski
46ad7c46da android/unit: Add case for sending incomplete header
Header size is the bare minimum that should always be sent.
2014-02-04 21:35:11 +01:00
Jakub Tyszkowski
ce6444c8bd android/unit: Add negative case for msg size verification
Case for checking message size declared inside the header against the
amount of data sent for variable sized message.
2014-02-04 21:35:11 +01:00
Jakub Tyszkowski
de260fd378 android/unit: Add case for out of range service
Check reaction for sending message to services not listed inside
hal-msg.h
2014-02-04 21:35:11 +01:00
Jakub Tyszkowski
daeee89e77 android/unit: Add another case for variable sized data
This patch adds test for variable length data handling. Handlers struct
have static values representing minimum payload. It cannot be predicted
how large data will be sent so they should accept data larger than
declared inside ipc_handler array, which holds the minimum size of such
message.
2014-02-04 21:35:10 +01:00
Jakub Tyszkowski
c14110cb1d android/unit: Add test case for variable sized data
Check if sending variable length data with proper msg size declared inside the
header succeeds.
2014-02-04 21:35:10 +01:00
Jakub Tyszkowski
bdceceb9d4 android/unit: Add support for variable length data
This patch adds sending messages larger than just hal_hdr, and fixes
response verification which worked only for empty messages but was
failing when sending something more than just header.
2014-02-04 21:35:10 +01:00
Jakub Tyszkowski
639abb4ba9 android/unit: Add case for opcode without handler
This test case checks if IPC shuts down on unhandled opcode.
2014-02-04 21:35:10 +01:00
Jakub Tyszkowski
e7a054a8b2 android/unit: Add test cases for proper handler calls
This patch adds tests for calling proper opcode handler. Two handlers
are registered, but one always results in failure. No failure means that
proper opcode <-> handler maching is done by the ipc mechanism.
2014-02-04 21:35:10 +01:00
Jakub Tyszkowski
cca001f942 android/unit: Rename cmd handler
This handler responses for opcode == 1, thus should use proper naming to
avoid confision when more functions sending different responses will be
added.
2014-02-04 21:35:10 +01:00
Jakub Tyszkowski
aeed33339c android/unit: Fix checking for expected termination
This fix makes sure that when signalled termination is expected,
it actually happens. If IPC termination is expected no response will be
sent, so cmd_watch will never be executed. But if it is executed when
expecting termination, its a failure.
2014-02-04 21:35:10 +01:00
Szymon Janc
99052be6c2 android/unit: Rename tests names to be more descriptive 2014-02-03 14:15:00 +01:00
Marcin Kraglak
eeae8babb5 android/unit: Add /android_ipc/send_cmd_3 test case
This case will register service, next unregister it and send
command. Expected status is raise SIGTERM.
2014-02-03 14:15:00 +01:00
Marcin Kraglak
3ac803d029 android/unit: Add /android_ipc/send_cmd_2 test case
This will test sending command to previously registered service.
2014-02-03 14:15:00 +01:00
Marcin Kraglak
898ad7e90a android/unit: Add /android_ipc/send_cmd_1 test case
This test case will check if ipc lib will raise SIGTERM
after sending command to not registered service.
2014-02-03 14:15:00 +01:00
Marcin Kraglak
981459271d android/unit: Add android IPC unit tests
It will test ipc library. First test case will check
ipc_init() call.
2014-02-03 14:15:00 +01:00