aboutsummaryrefslogtreecommitdiff
path: root/tests/fs-tests
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2017-06-22 13:37:40 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2017-06-28 10:27:31 +0200
commitca517e8b320c7a31c3a147fb1212ddb33cabd919 (patch)
treea26d535836a82ea241dc0389b061176ddfcd8329 /tests/fs-tests
parent3029b659e89caa79b6860c3bbe8cbc18b53af678 (diff)
Eliminate warnings about missing prototypes
This patch eliminates warnings generated by the -Wmissing-prototypes option. With this flag set, we are now forced to have prototypes for all global, exported functions, that have to be made visible to the definitions and we are forced to mark all local functions as static. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/fs-tests')
-rw-r--r--tests/fs-tests/integrity/integck.c2
-rw-r--r--tests/fs-tests/lib/tests.c4
-rw-r--r--tests/fs-tests/simple/ftrunc.c6
-rw-r--r--tests/fs-tests/simple/orph.c6
-rw-r--r--tests/fs-tests/simple/perf.c6
-rw-r--r--tests/fs-tests/simple/test_1.c6
-rw-r--r--tests/fs-tests/simple/test_2.c6
-rw-r--r--tests/fs-tests/stress/atoms/fwrite00.c6
-rw-r--r--tests/fs-tests/stress/atoms/gcd_hupper.c16
-rw-r--r--tests/fs-tests/stress/atoms/pdfrun.c8
-rw-r--r--tests/fs-tests/stress/atoms/rmdir00.c6
-rw-r--r--tests/fs-tests/stress/atoms/rndrm00.c6
-rw-r--r--tests/fs-tests/stress/atoms/rndrm99.c20
-rw-r--r--tests/fs-tests/stress/atoms/rndwrite00.c6
-rw-r--r--tests/fs-tests/stress/atoms/stress_1.c6
-rw-r--r--tests/fs-tests/stress/atoms/stress_2.c6
-rw-r--r--tests/fs-tests/stress/atoms/stress_3.c6
-rw-r--r--tests/fs-tests/utils/fstest_monitor.c14
18 files changed, 68 insertions, 68 deletions
diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c
index 827adc5..cac145d 100644
--- a/tests/fs-tests/integrity/integck.c
+++ b/tests/fs-tests/integrity/integck.c
@@ -1640,7 +1640,7 @@ static char *symlink_path(const char *path, const char *target_pathname)
return p;
}
-void symlink_check(const struct symlink_info *symlink)
+static void symlink_check(const struct symlink_info *symlink)
{
char *path, buf[8192], *target;
struct stat st1, st2;
diff --git a/tests/fs-tests/lib/tests.c b/tests/fs-tests/lib/tests.c
index 8a6a5f5..8d4d83a 100644
--- a/tests/fs-tests/lib/tests.c
+++ b/tests/fs-tests/lib/tests.c
@@ -530,7 +530,7 @@ void tests_check_filled_file(const char *file_name)
CHECK(close(fd) != -1);
}
-void tests_sync_directory(const char *file_name)
+static void tests_sync_directory(const char *file_name)
{
char *path;
char *dir;
@@ -949,7 +949,7 @@ int64_t tests_remove_entry(void)
}
/* Read mount information from /proc/mounts or /etc/mtab */
-int tests_get_mount_info(struct mntent *info)
+static int tests_get_mount_info(struct mntent *info)
{
FILE *f;
struct mntent *entry;
diff --git a/tests/fs-tests/simple/ftrunc.c b/tests/fs-tests/simple/ftrunc.c
index 86edf65..2df404b 100644
--- a/tests/fs-tests/simple/ftrunc.c
+++ b/tests/fs-tests/simple/ftrunc.c
@@ -32,7 +32,7 @@
#define WRITE_BUFFER_SIZE 32768
-void ftrunc(void)
+static void ftrunc(void)
{
int fd, i;
pid_t pid;
@@ -74,14 +74,14 @@ void ftrunc(void)
/* Title of this test */
-const char *ftrunc_get_title(void)
+static const char *ftrunc_get_title(void)
{
return "Truncate a large test file";
}
/* Description of this test */
-const char *ftrunc_get_description(void)
+static const char *ftrunc_get_description(void)
{
return
"Create a file named ftrunc_test_file. " \
diff --git a/tests/fs-tests/simple/orph.c b/tests/fs-tests/simple/orph.c
index f6d8956..c51fa2c 100644
--- a/tests/fs-tests/simple/orph.c
+++ b/tests/fs-tests/simple/orph.c
@@ -32,7 +32,7 @@
#define MAX_ORPHANS 1000000
-void orph(void)
+static void orph(void)
{
pid_t pid;
unsigned i, j, k, n;
@@ -133,14 +133,14 @@ void orph(void)
/* Title of this test */
-const char *orph_get_title(void)
+static const char *orph_get_title(void)
{
return "Create many open unlinked files";
}
/* Description of this test */
-const char *orph_get_description(void)
+static const char *orph_get_description(void)
{
return
"Create a directory named orph_test_dir_pid, where " \
diff --git a/tests/fs-tests/simple/perf.c b/tests/fs-tests/simple/perf.c
index b98b98b..aee8226 100644
--- a/tests/fs-tests/simple/perf.c
+++ b/tests/fs-tests/simple/perf.c
@@ -66,7 +66,7 @@ static unsigned speed(size_t bytes, long long usecs)
return (unsigned) k;
}
-void perf(void)
+static void perf(void)
{
pid_t pid;
int fd, i;
@@ -155,14 +155,14 @@ void perf(void)
/* Title of this test */
-const char *perf_get_title(void)
+static const char *perf_get_title(void)
{
return "Measure file system read and write speed";
}
/* Description of this test */
-const char *perf_get_description(void)
+static const char *perf_get_description(void)
{
return
"Syncs the file system (a newly created empty file system is " \
diff --git a/tests/fs-tests/simple/test_1.c b/tests/fs-tests/simple/test_1.c
index 79fd0b9..874e4b2 100644
--- a/tests/fs-tests/simple/test_1.c
+++ b/tests/fs-tests/simple/test_1.c
@@ -28,7 +28,7 @@
#include "tests.h"
-void test_1(void)
+static void test_1(void)
{
int fd;
pid_t pid;
@@ -112,14 +112,14 @@ void test_1(void)
/* Title of this test */
-const char *test_1_get_title(void)
+static const char *test_1_get_title(void)
{
return "Fill file system while holding deleted big file descriptor";
}
/* Description of this test */
-const char *test_1_get_description(void)
+static const char *test_1_get_description(void)
{
return
"Create a directory named test_1_test_dir_pid, where " \
diff --git a/tests/fs-tests/simple/test_2.c b/tests/fs-tests/simple/test_2.c
index 2094460..cef1536 100644
--- a/tests/fs-tests/simple/test_2.c
+++ b/tests/fs-tests/simple/test_2.c
@@ -28,7 +28,7 @@
#include "tests.h"
-void test_2(void)
+static void test_2(void)
{
pid_t pid;
int create, full;
@@ -163,14 +163,14 @@ void test_2(void)
/* Title of this test */
-const char *test_2_get_title(void)
+static const char *test_2_get_title(void)
{
return "Repeated write many small files and one big deleted file";
}
/* Description of this test */
-const char *test_2_get_description(void)
+static const char *test_2_get_description(void)
{
return
"Create a directory named test_2_test_dir_pid, where " \
diff --git a/tests/fs-tests/stress/atoms/fwrite00.c b/tests/fs-tests/stress/atoms/fwrite00.c
index fd691be..3406bba 100644
--- a/tests/fs-tests/stress/atoms/fwrite00.c
+++ b/tests/fs-tests/stress/atoms/fwrite00.c
@@ -34,7 +34,7 @@
#define HOLE_BLOCK_SIZE 10000000
-void filestress00(void)
+static void filestress00(void)
{
int fd, i, deleted;
pid_t pid;
@@ -153,14 +153,14 @@ void filestress00(void)
/* Title of this test */
-const char *filestress00_get_title(void)
+static const char *filestress00_get_title(void)
{
return "File stress test 00";
}
/* Description of this test */
-const char *filestress00_get_description(void)
+static const char *filestress00_get_description(void)
{
return
"Create a file named filestress00_test_file_pid, where " \
diff --git a/tests/fs-tests/stress/atoms/gcd_hupper.c b/tests/fs-tests/stress/atoms/gcd_hupper.c
index 31c175d..522250b 100644
--- a/tests/fs-tests/stress/atoms/gcd_hupper.c
+++ b/tests/fs-tests/stress/atoms/gcd_hupper.c
@@ -46,7 +46,7 @@ struct gcd_pid
struct gcd_pid *gcd_pid_list = NULL;
-int add_gcd_pid(const char *number)
+static int add_gcd_pid(const char *number)
{
int pid;
FILE *f;
@@ -86,7 +86,7 @@ int add_gcd_pid(const char *number)
return pid;
}
-int get_pid_list(void)
+static int get_pid_list(void)
{
DIR *dir;
struct dirent *entry;
@@ -107,7 +107,7 @@ int get_pid_list(void)
return 0;
}
-int parse_index_number(const char *name)
+static int parse_index_number(const char *name)
{
const char *p, *q;
int all_zero;
@@ -133,7 +133,7 @@ int parse_index_number(const char *name)
return index;
}
-int get_mtd_index(void)
+static int get_mtd_index(void)
{
FILE *f;
struct mntent *entry;
@@ -172,7 +172,7 @@ int get_mtd_index(void)
return mtd_index;
}
-int get_gcd_pid()
+static int get_gcd_pid(void)
{
struct gcd_pid *g;
int mtd_index;
@@ -188,7 +188,7 @@ int get_gcd_pid()
return 0;
}
-void gcd_hupper(void)
+static void gcd_hupper(void)
{
int64_t repeat;
int pid;
@@ -213,14 +213,14 @@ void gcd_hupper(void)
/* Title of this test */
-const char *gcd_hupper_get_title(void)
+static const char *gcd_hupper_get_title(void)
{
return "Send HUP signals to gcd";
}
/* Description of this test */
-const char *gcd_hupper_get_description(void)
+static const char *gcd_hupper_get_description(void)
{
return
"Determine the PID of the gcd process. " \
diff --git a/tests/fs-tests/stress/atoms/pdfrun.c b/tests/fs-tests/stress/atoms/pdfrun.c
index 46c70e1..094af66 100644
--- a/tests/fs-tests/stress/atoms/pdfrun.c
+++ b/tests/fs-tests/stress/atoms/pdfrun.c
@@ -32,7 +32,7 @@
#define WRITE_BUFFER_SIZE 32768
-void adjust_size(void)
+static void adjust_size(void)
{
char dummy[1024];
unsigned long total_memory;
@@ -49,7 +49,7 @@ void adjust_size(void)
tests_size_parameter = total_memory / 2;
}
-void run_pdf(void)
+static void run_pdf(void)
{
int fd, i;
pid_t pid;
@@ -99,14 +99,14 @@ void run_pdf(void)
/* Title of this test */
-const char *run_pdf_get_title(void)
+static const char *run_pdf_get_title(void)
{
return "Create / overwrite a large file in the current directory";
}
/* Description of this test */
-const char *run_pdf_get_description(void)
+static const char *run_pdf_get_description(void)
{
return
"Create a file named run_pdf_test_file_pid, " \
diff --git a/tests/fs-tests/stress/atoms/rmdir00.c b/tests/fs-tests/stress/atoms/rmdir00.c
index c1d0729..d855310 100644
--- a/tests/fs-tests/stress/atoms/rmdir00.c
+++ b/tests/fs-tests/stress/atoms/rmdir00.c
@@ -30,7 +30,7 @@
#include "tests.h"
-void rmdir00(void)
+static void rmdir00(void)
{
int64_t repeat;
int64_t size, this_size;
@@ -77,14 +77,14 @@ void rmdir00(void)
/* Title of this test */
-const char *rmdir00_get_title(void)
+static const char *rmdir00_get_title(void)
{
return "Create and remove directories and files";
}
/* Description of this test */
-const char *rmdir00_get_description(void)
+static const char *rmdir00_get_description(void)
{
return
"Create a directory named rmdir00_test_dir_pid, where " \
diff --git a/tests/fs-tests/stress/atoms/rndrm00.c b/tests/fs-tests/stress/atoms/rndrm00.c
index 724b1c3..75e163c 100644
--- a/tests/fs-tests/stress/atoms/rndrm00.c
+++ b/tests/fs-tests/stress/atoms/rndrm00.c
@@ -30,7 +30,7 @@
#include "tests.h"
-void rndrm00(void)
+static void rndrm00(void)
{
int64_t repeat;
int64_t size, this_size;
@@ -100,14 +100,14 @@ void rndrm00(void)
/* Title of this test */
-const char *rndrm00_get_title(void)
+static const char *rndrm00_get_title(void)
{
return "Randomly create and remove directories and files";
}
/* Description of this test */
-const char *rndrm00_get_description(void)
+static const char *rndrm00_get_description(void)
{
return
"Create a directory named rndrm00_test_dir_pid, where " \
diff --git a/tests/fs-tests/stress/atoms/rndrm99.c b/tests/fs-tests/stress/atoms/rndrm99.c
index 7751839..340fe5d 100644
--- a/tests/fs-tests/stress/atoms/rndrm99.c
+++ b/tests/fs-tests/stress/atoms/rndrm99.c
@@ -43,7 +43,7 @@ uint32_t dirs_created = 0;
uint32_t dirs_removed = 0;
int64_t *size_ptr = 0;
-void display_stats(void)
+static void display_stats(void)
{
printf( "\nrndrm99 stats:\n"
"\tNumber of files created = %u\n"
@@ -62,12 +62,12 @@ void display_stats(void)
struct timeval tv_before;
struct timeval tv_after;
-void before(void)
+static void before(void)
{
CHECK(gettimeofday(&tv_before, NULL) != -1);
}
-void after(const char *msg)
+static void after(const char *msg)
{
time_t diff;
CHECK(gettimeofday(&tv_after, NULL) != -1);
@@ -104,7 +104,7 @@ static void init_write_buffer()
/* Write size random bytes into file descriptor fd at the current position,
returning the number of bytes actually written */
-uint64_t fill_file(int fd, uint64_t size)
+static uint64_t fill_file(int fd, uint64_t size)
{
ssize_t written;
size_t sz;
@@ -142,7 +142,7 @@ uint64_t fill_file(int fd, uint64_t size)
}
/* Create a file of size file_size */
-uint64_t create_file(const char *file_name, uint64_t file_size)
+static uint64_t create_file(const char *file_name, uint64_t file_size)
{
int fd;
int flags;
@@ -176,7 +176,7 @@ uint64_t create_file(const char *file_name, uint64_t file_size)
}
/* Create an empty sub-directory or small file in the current directory */
-int64_t create_entry(char *return_name)
+static int64_t create_entry(char *return_name)
{
int fd;
char name[256];
@@ -217,7 +217,7 @@ int64_t create_entry(char *return_name)
}
/* Remove a random file of empty sub-directory from the current directory */
-int64_t remove_entry(void)
+static int64_t remove_entry(void)
{
DIR *dir;
struct dirent *entry;
@@ -291,7 +291,7 @@ int64_t remove_entry(void)
return result;
}
-void rndrm99(void)
+static void rndrm99(void)
{
int64_t repeat, loop_cnt;
int64_t size, this_size;
@@ -374,14 +374,14 @@ void rndrm99(void)
/* Title of this test */
-const char *rndrm99_get_title(void)
+static const char *rndrm99_get_title(void)
{
return "Randomly create and remove directories and files";
}
/* Description of this test */
-const char *rndrm99_get_description(void)
+static const char *rndrm99_get_description(void)
{
return
"Create a directory named rndrm99_test_dir_pid, where " \
diff --git a/tests/fs-tests/stress/atoms/rndwrite00.c b/tests/fs-tests/stress/atoms/rndwrite00.c
index 3c38e43..7dba6be 100644
--- a/tests/fs-tests/stress/atoms/rndwrite00.c
+++ b/tests/fs-tests/stress/atoms/rndwrite00.c
@@ -52,7 +52,7 @@ static void check_file(int fd, char *data, size_t length)
CHECK(n == length);
}
-void rndwrite00(void)
+static void rndwrite00(void)
{
int fd;
pid_t pid;
@@ -143,14 +143,14 @@ void rndwrite00(void)
/* Title of this test */
-const char *rndwrite00_get_title(void)
+static const char *rndwrite00_get_title(void)
{
return "Randomly write a large test file";
}
/* Description of this test */
-const char *rndwrite00_get_description(void)
+static const char *rndwrite00_get_description(void)
{
return
"Create a file named rndwrite00_test_file_pid, where " \
diff --git a/tests/fs-tests/stress/atoms/stress_1.c b/tests/fs-tests/stress/atoms/stress_1.c
index 86f94c2..678f8fa 100644
--- a/tests/fs-tests/stress/atoms/stress_1.c
+++ b/tests/fs-tests/stress/atoms/stress_1.c
@@ -32,7 +32,7 @@
#define WRITE_BUFFER_SIZE 32768
-void stress_1(void)
+static void stress_1(void)
{
int fd, i;
pid_t pid;
@@ -71,14 +71,14 @@ void stress_1(void)
/* Title of this test */
-const char *stress_1_get_title(void)
+static const char *stress_1_get_title(void)
{
return "Create / overwrite a large file";
}
/* Description of this test */
-const char *stress_1_get_description(void)
+static const char *stress_1_get_description(void)
{
return
"Create a file named stress_1_test_file_pid, " \
diff --git a/tests/fs-tests/stress/atoms/stress_2.c b/tests/fs-tests/stress/atoms/stress_2.c
index a9bc31a..5dea1b7 100644
--- a/tests/fs-tests/stress/atoms/stress_2.c
+++ b/tests/fs-tests/stress/atoms/stress_2.c
@@ -32,7 +32,7 @@
#define WRITE_BUFFER_SIZE 32768
-void stress_2(void)
+static void stress_2(void)
{
int fd, i;
pid_t pid;
@@ -77,14 +77,14 @@ void stress_2(void)
/* Title of this test */
-const char *stress_2_get_title(void)
+static const char *stress_2_get_title(void)
{
return "Create / overwrite a large deleted file";
}
/* Description of this test */
-const char *stress_2_get_description(void)
+static const char *stress_2_get_description(void)
{
return
"Create a file named stress_2_test_file. " \
diff --git a/tests/fs-tests/stress/atoms/stress_3.c b/tests/fs-tests/stress/atoms/stress_3.c
index 99fb05d..0272d52 100644
--- a/tests/fs-tests/stress/atoms/stress_3.c
+++ b/tests/fs-tests/stress/atoms/stress_3.c
@@ -32,7 +32,7 @@
#define WRITE_BUFFER_SIZE 32768
-void stress_3(void)
+static void stress_3(void)
{
int fd, i;
pid_t pid;
@@ -79,14 +79,14 @@ void stress_3(void)
/* Title of this test */
-const char *stress_3_get_title(void)
+static const char *stress_3_get_title(void)
{
return "Create a file with a large hole and fill it";
}
/* Description of this test */
-const char *stress_3_get_description(void)
+static const char *stress_3_get_description(void)
{
return
"Create a file named stress_3_test_file_pid, " \
diff --git a/tests/fs-tests/utils/fstest_monitor.c b/tests/fs-tests/utils/fstest_monitor.c
index 298ee26..58946cc 100644
--- a/tests/fs-tests/utils/fstest_monitor.c
+++ b/tests/fs-tests/utils/fstest_monitor.c
@@ -38,7 +38,7 @@ struct child_info {
struct child_info *children = 0;
-void kill_children(void)
+static void kill_children(void)
{
struct child_info *child;
@@ -57,7 +57,7 @@ void kill_children(void)
}
}
-void add_child(pid_t child_pid)
+static void add_child(pid_t child_pid)
{
struct child_info *child;
size_t sz;
@@ -70,7 +70,7 @@ void add_child(pid_t child_pid)
children = child;
}
-void mark_child_gone(pid_t child_pid)
+static void mark_child_gone(pid_t child_pid)
{
struct child_info *child;
@@ -84,7 +84,7 @@ void mark_child_gone(pid_t child_pid)
}
}
-int have_children(void)
+static int have_children(void)
{
struct child_info *child;
@@ -97,7 +97,7 @@ int have_children(void)
return 0;
}
-int parse_command_line(char *cmdline, int *pargc, char ***pargv)
+static int parse_command_line(char *cmdline, int *pargc, char ***pargv)
{
char **tmp;
char *p, *v, *q;
@@ -175,7 +175,7 @@ int parse_command_line(char *cmdline, int *pargc, char ***pargv)
return 0;
}
-void signal_handler(int signum)
+static void signal_handler(int signum)
{
kill_children();
}
@@ -183,7 +183,7 @@ void signal_handler(int signum)
int result = 0;
int alarm_gone_off = 0;
-void alarm_handler(int signum)
+static void alarm_handler(int signum)
{
if (!result)
alarm_gone_off = 1;