FunctionRemoting Sample

From STRIDE Wiki
Revision as of 16:30, 9 July 2010 by Mikee (talk | contribs) (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 …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 functions
  • integer input/return
  • string input/return
  • structure input/return
  • variable sized integer array input/return
  • variable sized string array 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.