FunctionRemoting Sample: Difference between revisions
(Created page with '== Introduction == This sample demonstrates some common remote function call patterns for the purpose of fixturing your script test scenarios. This sample only demonstrates the …') |
|||
Line 8: | Line 8: | ||
These files declare and implement several example functions taking and returning a variety of input/output data. In particular, we have examples of: | These files declare and implement several example functions taking and returning a variety of input/output data. In particular, we have examples of: | ||
* void | * void | ||
* integer input/return | * integer input/output/return | ||
* string input/return | * string input/output/return | ||
* structure input/return | * structure input/output/return | ||
* variable sized integer | * variable sized integer pointer input/output/return | ||
* variable sized string | * variable sized string pointer input/return | ||
== Tests Description == | == Tests Description == |
Revision as of 18:49, 12 November 2010
Introduction
This sample demonstrates some common remote function call patterns for the purpose of fixturing your script test scenarios. This sample only demonstrates the STRIDE mechanics of qualifying and invoking the remote functions. The example functions here don't actually implement any fixturing logic - they only verify the parameters passed and returned. This sample is a good place to start if you are interested in creating some functions to provided on-target fixturing for your host-based behavior tests.
Source under test
s2_function_remoting_source.c / h
These files declare and implement several example functions taking and returning a variety of input/output data. In particular, we have examples of:
- void
- integer input/output/return
- string input/output/return
- structure input/output/return
- variable sized integer pointer input/output/return
- variable sized string pointer input/return
Tests Description
void_args_void_return
demonstrates calling a function with void args and return value.
int_args_int_return
demonstrates calling a function with integer arg and return value.
string_args_string_return
demonstrates calling a function with string arg and return value.
struct_args_struct_return
demonstrates calling a function with struct arg and return value.
intsizedarray_args_intsizedarray_return
demonstrates calling a function with variable length integer array and return value. When using sized-pointers, you must assign the size field with correct number of elements in the array. The return value is a struct which gets mapped to a hashref in perl.
stringsizedarray_args_stringsizedarray_return
demonstrates calling a function with variable length string array and return value. When using sized-pointers, you must assign the size field with correct number of elements in the array. The return value is a struct which gets mapped to a hashref in perl.