/*
* Authors:
* Jakub Hrozek <jhrozek@redhat.com>
*
* Copyright (C) 2008 Red Hat
* see file 'COPYING' for use and warranty information
*
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; version 3 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdlib.h>
#include <check.h>
#include <unistd.h>
#include <fcntl.h>
#include <limits.h>
#include <errno.h>
#include <talloc.h>
#include <popt.h>
#include "config.h"
static char *dir_path;
static char *dst_path;
static void setup_files_test(void)
{
/* create a temporary directory that we fill with stuff later on */
}
static void teardown_files_test(void)
{
int ret;
/* OK this is crude but since the functions to remove tree are under test.. */
if (ret == -1) {
}
}
if (ret == -1) {
}
}
/* clean up */
}
{
int fd;
int ret;
return ret;
}
{
int ret;
errno = 0;
/* create a file */
/* create a subdir and file inside it */
/* create another subdir, empty this time */
/* go back */
/* and finally wipe it out.. */
/* check if really gone */
}
{
int ret;
errno = 0;
/* create a file */
/* create a subdir and file inside it */
/* create another subdir, empty this time */
/* go back */
/* and finally wipe it out.. */
/* check if really gone */
}
{
int ret;
char *tmp;
errno = 0;
/* create a file */
/* create a subdir and file inside it */
/* go back */
/* and finally copy.. */
/* check if really copied */
}
{
int ret;
char *foo_path;
char *bar_path;
errno = 0;
/* create a file */
/* create a file */
/* Copy this file to a new file */
"Will copy from 'foo' to 'bar'\n");
/* check if really copied */
}
{
int ret;
char *tmp;
errno = 0;
/* create a subdir */
/* go back */
/* and finally copy.. */
/* check if really copied */
}
{
int ret;
char *tmp;
errno = 0;
/* create a node */
/* go back */
/* and finally copy.. */
/* check if really copied and without special files */
}
{
int ret;
char *new_dir;
errno = 0;
/* create a dir */
/* check the dir has been created */
/* check the permissions are okay */
/* check the owner is okay */
}
{
suite_add_tcase(s, tc_files);
return s;
}
{
int number_failed;
int opt;
int debug = 0;
};
/* Set debug level to invalid value so we can decide if -d 0 was used. */
return 1;
}
Suite *s = files_suite();
/* If CK_VERBOSITY is set, use that, otherwise it defaults to CK_NORMAL */
}