mirror of
https://github.com/troglobit/libite.git
synced 2026-10-01 05:22:34 +07:00
test: fix build warnings for most tests
Let rsync.c continue to warn, it's not complete ... Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -17,12 +17,16 @@ static struct stat before, after;
|
||||
|
||||
static void sigterm_handler(int signo)
|
||||
{
|
||||
(void)signo;
|
||||
|
||||
PRINT("Exiting ...\n");
|
||||
remove(PIDFILE);
|
||||
}
|
||||
|
||||
static void sigalrm_handler(int signo)
|
||||
{
|
||||
(void)signo;
|
||||
|
||||
PRINT("Calling pidfile(%s)\n", pidfile_arg ?: "NULL");
|
||||
if (pidfile(pidfile_arg))
|
||||
err(1, "failed creating1 %s", pidfile_arg);
|
||||
|
||||
+4
-5
@@ -13,24 +13,23 @@
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int ret;
|
||||
FILE *fp;
|
||||
char buf[80] = "";
|
||||
FILE *fp;
|
||||
|
||||
printf("Before tempfile():\n");
|
||||
ret = system("ls -lrt " _PATH_TMP " | tail -3");
|
||||
system("ls -lrt " _PATH_TMP " | tail -3");
|
||||
|
||||
fp = tempfile();
|
||||
fail_unless(fp != NULL);
|
||||
|
||||
ret = fputs(READBACK, fp);
|
||||
fputs(READBACK, fp);
|
||||
rewind(fp);
|
||||
if (fgets(buf, sizeof(buf), fp))
|
||||
fprintf(stderr, "\nRead-back from tempfile: %s", buf);
|
||||
fail_unless(!strcmp(buf, READBACK));
|
||||
|
||||
printf("\nAfter tempfile(), should be same list:\n");
|
||||
ret = system("ls -lrt " _PATH_TMP " | tail -3");
|
||||
system("ls -lrt " _PATH_TMP " | tail -3");
|
||||
|
||||
return fclose(fp);
|
||||
}
|
||||
|
||||
+7
-7
@@ -11,13 +11,13 @@ int main(void)
|
||||
int result = 0;
|
||||
size_t i;
|
||||
struct tc test[] = {
|
||||
{ "executable", 1 },
|
||||
{ "executable -h", 1 },
|
||||
{ "executable-link", 1 },
|
||||
{ "regular", 0 },
|
||||
{ "ls", 1 },
|
||||
{ "/usr/bin/which", 1 },
|
||||
{ NULL, 0 }
|
||||
{ "executable", 1, 0 },
|
||||
{ "executable -h", 1, 0 },
|
||||
{ "executable-link", 1, 0 },
|
||||
{ "regular", 0, 0 },
|
||||
{ "ls", 1, 0 },
|
||||
{ "/usr/bin/which", 1, 0 },
|
||||
{ NULL, 0, 0 }
|
||||
};
|
||||
|
||||
setenv("PATH", "data/which:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin", 1);
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "check.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main(void)
|
||||
{
|
||||
int chan[2];
|
||||
int status;
|
||||
|
||||
Reference in New Issue
Block a user