/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2014 Red Hat
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.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <popt.h>
#include "tests/cmocka/common_mock.h"
#include "lib/sifp/sss_sifp.h"
#include "lib/sifp/sss_sifp_dbus.h"
#include "lib/sifp/sss_sifp_private.h"
#include "responder/ifp/ifp_iface.h"
struct {
} test_ctx;
{
/* we won't use the connection anywhere, so we can just return NULL */
return NULL;
}
int timeout_milliseconds,
{
return NULL;
}
return sss_mock_ptr_type(DBusMessage *);
}
const char *type,
const void *val)
{
type, &variant_iter);
/* Now add the value */
}
const char *type,
int num_vals,
unsigned int item_size)
{
int i;
void *addr;
array_type[0] = DBUS_TYPE_ARRAY;
type, &array_iter);
for (i = 0; i < num_vals; i++) {
}
}
{
return 0;
}
{
return 0;
}
{
/* sss_sifp is responsible for freeing the reply */
return 0;
}
{
}
{
}
{
}
{
}
{
}
{
}
{
/* prepare message */
/* test */
}
{
/* prepare message */
/* test */
}
{
int i;
/* prepare message */
&paths, path_in_len,
/* test */
assert_true(i < path_in_len);
assert_non_null(path_out[i]);
}
}
{
/* prepare message */
/* test */
}
{
bool out;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
const char *out;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
const char *out;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
struct {
const char *key;
const char *value;
char **values;
int hret;
/* prepare message */
&var_iter);
&array_iter);
assert_non_null(attrs[0]);
assert_non_null(values[0]);
}
{
unsigned int out_num;
bool *out;
unsigned int i;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
for (i = 0; i < num_values; i++) {
}
}
{
unsigned int num_values = 0;
unsigned int out_num;
bool *out;
/* prepare message */
NULL, sizeof(dbus_bool_t));
/* test */
assert_non_null(attrs[0]);
}
{
unsigned int out_num;
unsigned int i;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
for (i = 0; i < num_values; i++) {
}
}
{
unsigned int num_values = 0;
unsigned int out_num;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
unsigned int out_num;
unsigned int i;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
for (i = 0; i < num_values; i++) {
}
}
{
unsigned int num_values = 0;
unsigned int out_num;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
unsigned int out_num;
unsigned int i;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
for (i = 0; i < num_values; i++) {
}
}
{
unsigned int num_values = 0;
unsigned int out_num;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
unsigned int out_num;
unsigned int i;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
for (i = 0; i < num_values; i++) {
}
}
{
unsigned int num_values = 0;
unsigned int out_num;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
unsigned int out_num;
unsigned int i;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
for (i = 0; i < num_values; i++) {
}
}
{
unsigned int num_values = 0;
unsigned int out_num;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
unsigned int out_num;
unsigned int i;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
for (i = 0; i < num_values; i++) {
}
}
{
unsigned int num_values = 0;
unsigned int out_num;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
unsigned int out_num;
const char * const *out;
unsigned int i;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
for (i = 0; i < num_values; i++) {
}
}
{
unsigned int num_values = 0;
unsigned int out_num;
const char * const *out;
/* prepare message */
NULL, sizeof(const char*));
/* test */
assert_non_null(attrs[0]);
}
{
unsigned int out_num;
const char * const *out;
unsigned int i;
/* prepare message */
/* test */
assert_non_null(attrs[0]);
for (i = 0; i < num_values; i++) {
}
}
{
unsigned int num_values = 0;
unsigned int out_num;
const char * const *out;
/* prepare message */
NULL, sizeof(const char*));
/* test */
assert_non_null(attrs[0]);
}
{
return;
static struct {
const char *key;
const char *values[];
char **values;
unsigned int i;
int hret;
/* prepare message */
&var_iter);
&array_iter);
&val_iter);
for (i = 0; i < num_values; i++) {
}
assert_non_null(attrs[0]);
for (i = 0; i < num_values; i++) {
assert_non_null(values[i]);
}
assert_null(values[i]);
}
{
struct {
const char *name;
int i;
/* prepare message */
&array_iter);
&var_iter);
}
assert_non_null(attrs[i]);
}
assert_null(attrs[i]);
}
{
/* prepare message */
&array_iter);
assert_null(attrs[0]);
}
{
/* prepare message */
/* test */
assert_non_null(attrs[0]);
}
{
struct {
const char *name;
int i;
/* prepare message */
&array_iter);
&var_iter);
}
assert_non_null(attrs[i]);
}
assert_null(attrs[i]);
}
{
struct {
const char *name;
const char *value;
const char *out;
int i;
/* prepare message */
&array_iter);
&var_iter);
}
}
}
{
int i;
/* prepare message */
&paths, path_in_len,
/* test */
assert_true(i < path_in_len);
assert_non_null(path_out[i]);
}
}
{
int i;
/* prepare message */
&paths, path_in_len,
/* test */
"MyMethod", &path_out,
assert_true(i < path_in_len);
assert_non_null(path_out[i]);
}
}
{
/* prepare message */
/* test */
}
{
/* prepare message */
/* test */
"MyMethod", &path_out,
}
{
SSS_SIFP_PATH "/Domains/IPA"};
int i;
/* prepare message */
/* test */
for (i = 0; i < in_len; i++) {
assert_non_null(out[i]);
}
assert_null(out[i]);
/* messages are unrefed in the library */
}
{
struct {
const char *name;
const char *value;
int i;
/* prepare message */
&array_iter);
&var_iter);
}
/* test */
}
/* messages are unrefed in the library */
}
{
int rv;
int no_cleanup = 0;
int opt;
_("Do not delete the test database after a test run"), NULL },
};
};
/* Set debug level to invalid value so we can deside if -d 0 was used. */
switch(opt) {
default:
return 1;
}
}
return rv;
}