files-tests.c revision 9e2c64c6d4f5560e27207193efea6536a566865e
/*
* 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"
#include "tools/tools_util.h"
static char tpl_dir[] = "file-tests-dir-XXXXXX";
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;
char *tmp;
int fd = -1;
errno = 0;
/* create a file */
/* create a subdir and file inside it */
/* go back */
/* and finally copy.. */
/* 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 */
}
static Suite *files_suite(void)
{
suite_add_tcase(s, tc_files);
return s;
}
{
int number_failed;
int opt;
int debug = 0;
struct poptOption long_options[] = {
};
/* Set debug level to invalid value so we can deside if -d 0 was used. */
return 1;
}
Suite *s = files_suite();
/* If CK_VERBOSITY is set, use that, otherwise it defaults to CK_NORMAL */
}