The Assimilation Project  based on Assimilation version 1.1.7.1474836767
gtest02.c File Reference
#include <projectcommon.h>
#include <string.h>
#include <resourcecmd.h>
#include <resourcequeue.h>
#include <childprocess.h>
#include <stdio.h>
#include <malloc.h>
Include dependency graph for gtest02.c:

Go to the source code of this file.

Macros

#define DUMB   "\""CONFIGNAME_INSTANCE"\":\"dumb\""
 
#define PROV   ",\"" REQPROVIDERNAMEFIELD "\": \"heartbeat\"}"
 

Functions

FSTATIC void test_all_freed (void)
 gtest02.c - miscellaneous client-only tests not requiring mainloop. More...
 
FSTATIC gboolean logfatal_function (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data)
 Try various invalid resource command initializers. More...
 
FSTATIC void set_expected_failures (const char **the_usual_suspects)
 
FSTATIC void test_invalid_resourcecmd (void)
 
FSTATIC void test_invalid_queuecmd (void)
 
FSTATIC void test_childprocess_failure (void)
 
int main (int argc, char **argv)
 Test main program ('/gtest02') using the glib test fixtures. More...
 

Variables

char * bad_msg = NULL
 
const char ** expected_msgs = NULL
 

Macro Definition Documentation

#define DUMB   "\""CONFIGNAME_INSTANCE"\":\"dumb\""

Definition at line 125 of file gtest02.c.

Referenced by test_invalid_queuecmd(), and test_invalid_resourcecmd().

#define PROV   ",\"" REQPROVIDERNAMEFIELD "\": \"heartbeat\"}"

Definition at line 126 of file gtest02.c.

Referenced by test_invalid_queuecmd(), and test_invalid_resourcecmd().

Function Documentation

FSTATIC gboolean logfatal_function ( const gchar *  log_domain,
GLogLevelFlags  log_level,
const gchar *  message,
gpointer  user_data 
)

Try various invalid resource command initializers.

Definition at line 79 of file gtest02.c.

References bad_msg, and expected_msgs.

Referenced by set_expected_failures().

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Test main program ('/gtest02') using the glib test fixtures.

Definition at line 254 of file gtest02.c.

References test_childprocess_failure(), test_invalid_queuecmd(), and test_invalid_resourcecmd().

Here is the call graph for this function:

FSTATIC void set_expected_failures ( const char **  the_usual_suspects)

Definition at line 47 of file gtest02.c.

References expected_msgs, FSTATIC, and logfatal_function().

Referenced by test_childprocess_failure(), test_invalid_queuecmd(), and test_invalid_resourcecmd().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void test_all_freed ( void  )

gtest02.c - miscellaneous client-only tests not requiring mainloop.

These tests test things which are only used by the nanoprobes, so there are no python wrappers for them.

This file is part of the Assimilation Project.

Author
Alan Robertson alanr.nosp@m.@uni.nosp@m.x.sh - Copyright © 2013 - Assimilation Systems Limited
The Assimilation software is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Assimilation software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the Assimilation Project software. If not, see http://www.gnu.org/licenses/

Definition at line 55 of file gtest02.c.

References bad_msg, expected_msgs, FSTATIC, proj_class_dump_live_objects(), and proj_class_live_object_count().

Referenced by test_childprocess_failure(), test_invalid_queuecmd(), and test_invalid_resourcecmd().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void test_childprocess_failure ( void  )

Definition at line 131 of file gtest02.c.

References CHILD_LOGALL, childprocess_new(), FSTATIC, set_expected_failures(), and test_all_freed().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void test_invalid_queuecmd ( void  )

Definition at line 221 of file gtest02.c.

References configcontext_new_JSON_string(), CONFIGNAME_TYPE, DIMOF, DUMB, PROV, _ResourceQueue::Qcmd, REQCLASSNAMEFIELD, REQENVIRONNAMEFIELD, REQOPERATIONNAMEFIELD, resourcequeue_new(), set_expected_failures(), test_all_freed(), and UNREF.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void test_invalid_resourcecmd ( void  )

Definition at line 160 of file gtest02.c.

References configcontext_new_JSON_string(), CONFIGNAME_TYPE, DIMOF, DUMB, FSTATIC, PROV, REQCLASSNAMEFIELD, REQENVIRONNAMEFIELD, REQOPERATIONNAMEFIELD, resourcecmd_new(), set_expected_failures(), test_all_freed(), and UNREF.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

char* bad_msg = NULL

Definition at line 43 of file gtest02.c.

Referenced by logfatal_function(), and test_all_freed().

const char** expected_msgs = NULL

Definition at line 44 of file gtest02.c.

Referenced by logfatal_function(), set_expected_failures(), and test_all_freed().