ci: cram: 038-lcm-fd.t: added test for file descriptors transfer oved USP backend
Implementation of CRAM tests for transfer of file descriptors in output args in synchronous, asynchronous RPC and event notifications. Implements: PCF-2034 Signed-off-by: Vitalii Popov <v.popov@inango-systems.com>
This commit is contained in:
parent
8919bd059c
commit
39af15f38f
51
.gitlab/tests/cram/generic/lcm/038-lcm-fd.t
Normal file
51
.gitlab/tests/cram/generic/lcm/038-lcm-fd.t
Normal file
@ -0,0 +1,51 @@
|
||||
## Setup test configuration
|
||||
Setup the test configuration:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
$ alias C="${CRAM_REMOTE_COPY:-}"
|
||||
$ S=". /tmp/script_functions.sh"
|
||||
$ C ${TESTDIR}/script_functions.sh root@${TARGET_LAN_IP}:/tmp/script_functions.sh 2>/dev/null
|
||||
|
||||
Prepare roles
|
||||
|
||||
$ R "${S} && set_ee_usp_roles --roles \"Full Access\"" > /dev/null
|
||||
|
||||
Install file descriptor server container (priviledged)
|
||||
|
||||
$ R "${S} && install_ctr --url docker://registry.gitlab.com/prpl-foundation/prplos/prplos/prplos/lcmfdserverapp-\$(get_board_arch):fd-pass-server-v1 --ee --uuid 7de135ba-1c5e-52f9-8b05-5284c544386f --privileged true --usprequired \"Full Access\"" > /dev/null
|
||||
|
||||
Install file descriptor client container (unpriviledged)
|
||||
|
||||
$ R "${S} && install_ctr --url docker://registry.gitlab.com/prpl-foundation/prplos/prplos/prplos/lcmfdclientapp-\$(get_board_arch):fd-pass-client-v1 --ee --uuid 4c39eee8-b0e7-5fa3-8cb3-ddeba7a3a052 --privileged false --usprequired \"Full Access\"" > /dev/null
|
||||
|
||||
Waiting for containers to register their datamodels
|
||||
|
||||
$ R "sleep 10"
|
||||
|
||||
Write file by call to unpriviledged container via sync RPC
|
||||
|
||||
$ R "obuspa -c operate \"Device.LCMFDClientApp.writeToFileRequestedBySyncRPC(Path='/tmp/sync_write_example_file',Content='Example string written using unpriviledged container with sync RPC')\"" > /dev/null
|
||||
|
||||
Check file content from priviledged container written via sync RPC ("echo" adds EOL for correct comparison)
|
||||
|
||||
$ R "${S} && execute_in_container --uuid 7de135ba-1c5e-52f9-8b05-5284c544386f --cmd 'sleep 10 && cat /tmp/sync_write_example_file && echo'"
|
||||
Example string written using unpriviledged container with sync RPC
|
||||
|
||||
Write file by call to unpriviledged container via async RPC
|
||||
|
||||
$ R "obuspa -c operate \"Device.LCMFDClientApp.writeToFileRequestedByAsyncRPC(Path='/tmp/async_write_example_file',Content='Example string written using unpriviledged container with async RPC')\"" > /dev/null
|
||||
|
||||
Check file content from priviledged container written via async RPC ("echo" adds EOL for correct comparison)
|
||||
|
||||
$ R "${S} && execute_in_container --uuid 7de135ba-1c5e-52f9-8b05-5284c544386f --cmd 'sleep 10 && cat /tmp/async_write_example_file && echo'"
|
||||
Example string written using unpriviledged container with async RPC
|
||||
|
||||
Uninstall priviledged
|
||||
|
||||
$ R "${S} && uninstall_ctr_and_check --uuid 7de135ba-1c5e-52f9-8b05-5284c544386f"
|
||||
[1]
|
||||
|
||||
Uninstall unpriviledged
|
||||
|
||||
$ R "${S} && uninstall_ctr_and_check --uuid 4c39eee8-b0e7-5fa3-8cb3-ddeba7a3a052"
|
||||
[1]
|
||||
@ -41,6 +41,27 @@ get_container_name() {
|
||||
esac
|
||||
}
|
||||
|
||||
## Return architecture name for the board
|
||||
get_board_arch() {
|
||||
board_name=$(cut -d',' -f2 </tmp/sysinfo/board_name)
|
||||
case "${board_name}" in
|
||||
"haze" | \
|
||||
"freedom")
|
||||
echo cortexa53
|
||||
;;
|
||||
"lgm" | \
|
||||
"qemu-standard-pc-"*)
|
||||
echo x86-64
|
||||
;;
|
||||
"turris-omnia")
|
||||
echo cortexa9
|
||||
;;
|
||||
*)
|
||||
echo generic
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
concat_comma_string() {
|
||||
_concat_global_str="$1"
|
||||
_concat_param="$2"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user