Unit Test plan for the OpenHPI API extensions
---------------------------------------------

Notes:
Tests described here are numbered so that they correspond to the program where
they are implemented (e.g. ohpi_<three-digit test number>.c).

**Positive Tests** (expect a good return code.)

SaErrorT oHpiPluginLoad(char *name):
        (000) Pass 'libdummy' as argument.
                
SaErrorT oHpiPluginUnload(char *name):
        (001) Load 'libdummy' and unload it.
        (002) Load 'libdummy', unload it, and load it again. Don't open a session.
        (003) Load 'libdummy', create and destroy handler on it, and
           unload plugin.
        
SaErrorT oHpiPluginInfo(char *name, oHpiPluginInfoT *info):
        (004) Load 'libdummy', get plugin info, compare it with the known
              value (1) , and unload the plugins.
        (005) Load 'libdummy', create two handlers, get plugin info and
              compare with known value (3), destroy handlers, get info again
              and compare with known value (1), unload plugin. Don't open a session.
          
SaErrorT oHpiPluginGetNext(char *name, char *next_name, int size):
        (006) Load 'libdummy', load 'libwatchdog', iterate through the names
              and make sure they match with the expected values.
              Unload the plugins.
              
SaErrorT oHpiHandlerCreate(GHashTable *config,
                           oHpiHandlerIdT *id):
        (007) Load 'libdummy' and 'libwatchdog', create two handlers on each.

SaErrorT oHpiHandlerDestroy(oHpiHandlerIdT id):
        (008) Same as previous, but destroy handlers and unload plugin.

SaErrorT oHpiHandlerInfo(oHpiHandlerIdT id, oHpiHandlerInfoT *info):
        (009) Load 'libdummy', create handler, get handler info and check for
              expected information. Destroy handler, unload plugin.

SaErrorT oHpiHandlerGetNext(oHpiHandlerIdT id, oHpiHandlerIdT *next_id):
        (010) Load 'libdummy', create three handlers, iterate through them
              making sure they match with the expected values.
              Destroy handlers, unload plugin.
              
SaErrorT oHpiGlobalParamGet(oHpiGlobalParam *param):
        (035) Set OPENHPI_CONF to valid file. Open session. Get parameter
              that was set through config file comparing with known value.

SaErrorT oHpiGlobalParamSet(oHpiGlobalParam *param):
        (036) Set a paramter, get it, and compare values. Don't open a session.

**Negative Tests** (expect a bad return code)

SaErrorT oHpiPluginLoad(char *name):
        (011) Pass null as argument.
        (012) Load bogus plugin.
        (013) Load same plugin 'libdummy' twice.
        
SaErrorT oHpiPluginUnload(char *name):
        (014) Pass null as argument.
        (015) Unload bogus plugin.
        (016) Unload plugin when there is a handler opened on it.
        (017) Unload plugin twice.
        
SaErrorT oHpiPluginInfo(char *name, oHpiPluginInfoT *info):
        (018) Pass null as arguments (for each argument).
        (019) Get info on bogus plugin.
        (020) Load plugin, unload plugin, and try to get info on it.
        
SaErrorT oHpiPluginGetNext(char *name, char *next_name, int size):
        (021) Pass null as arguments (for each argument, n<0 for size).
        (022) Get next bogus plugin
        (023) Load two plugins, unload one, and get next the unloaded one.

SaErrorT oHpiHandlerCreate(GHashTable *config,
                           oHpiHandlerIdT *id):
        (024) Pass null as arguments (for each argument).
        (025) Create handler for plugin that doesn't have a "plugin" key.
        (026) Create handler for non-loaded plugin.
        
SaErrorT oHpiHandlerDestroy(oHpiHandlerIdT id):
        (027) Pass null as argument.
        (028) Destroy bogus handler.
        (029) Destroy handler twice.        
        
SaErrorT oHpiHandlerInfo(oHpiHandlerIdT id, oHpiHandlerInfoT *info):
        (030) Pass null as argument.
        (031) Pass bogus handler id.
        
SaErrorT oHpiHandlerGetNext(oHpiHandlerIdT id, oHpiHandlerIdT *next_id):
        (032) Pass null as arguments (for each argument).
        (033) Get next bogus handler.
        (034) Create three handlers, destroy one, and get next that one.
        
SaErrorT oHpiGlobalParamGet(oHpiGlobalParam *param):
        (037) Pass null as arguments.
        (038) Get bogus parameter.

SaErrorT oHpiGlobalParamSet(oHpiGlobalParam *param):
        (039) Pass null as arguments.
