From 6ac2f14f0f622863c330b8b96da9373bad1abeb5 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Tue, 28 Apr 2015 10:27:13 -0400 Subject: [PATCH] LU-6245 tests: remove libcfs.h from test applications Since user land libcfs is mostly gone libcfs.h can be removed in the appilcations used for the test suite. Change-Id: I8104655a750533ece9c74b2ee06cd197abfd3354 Signed-off-by: James Simmons Reviewed-on: http://review.whamcloud.com/14629 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: frank zago Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- lustre/tests/check_fhandle_syscalls.c | 1 - lustre/tests/iam_ut.c | 2 -- lustre/tests/it_test.c | 1 - lustre/tests/lp_utils.c | 1 - lustre/tests/openfile.c | 1 - lustre/tests/rwv.c | 22 ++++++++++++++-------- lustre/tests/statmany.c | 1 - lustre/tests/statone.c | 1 - lustre/tests/test_brw.c | 12 +++++++----- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lustre/tests/check_fhandle_syscalls.c b/lustre/tests/check_fhandle_syscalls.c index 95e3002..4460dbf 100644 --- a/lustre/tests/check_fhandle_syscalls.c +++ b/lustre/tests/check_fhandle_syscalls.c @@ -43,7 +43,6 @@ #include #include -#include #include #define MAX_HANDLE_SZ 128 diff --git a/lustre/tests/iam_ut.c b/lustre/tests/iam_ut.c index d28e775..7c9988a 100644 --- a/lustre/tests/iam_ut.c +++ b/lustre/tests/iam_ut.c @@ -53,8 +53,6 @@ #include #endif -#include - enum { /* * Maximal format name length. diff --git a/lustre/tests/it_test.c b/lustre/tests/it_test.c index 6e00512..a31e0b3 100644 --- a/lustre/tests/it_test.c +++ b/lustre/tests/it_test.c @@ -45,7 +45,6 @@ #define EXPORT_SYMBOL(s) -#include #include <../ldlm/interval_tree.c> #define dprintf(fmt, args...) //printf(fmt, ##args) diff --git a/lustre/tests/lp_utils.c b/lustre/tests/lp_utils.c index 6a2eddd..f9ebea3 100644 --- a/lustre/tests/lp_utils.c +++ b/lustre/tests/lp_utils.c @@ -49,7 +49,6 @@ #include #include #include -#include #include "lustre/lustre_user.h" #include "lustre/tests/lp_utils.h" diff --git a/lustre/tests/openfile.c b/lustre/tests/openfile.c index da10c49..779fab6 100644 --- a/lustre/tests/openfile.c +++ b/lustre/tests/openfile.c @@ -49,7 +49,6 @@ #include #include #include -#include #include typedef struct flag_mapping { diff --git a/lustre/tests/rwv.c b/lustre/tests/rwv.c index 5b3474f..1bcca57 100644 --- a/lustre/tests/rwv.c +++ b/lustre/tests/rwv.c @@ -43,7 +43,6 @@ #include #include -#include #include #define ACT_NONE 0 @@ -175,13 +174,15 @@ int main(int argc, char** argv) iv->iov_len = strtoul(argv[optind++], &end, 0); if (*end) { printf("Error iov size\n"); - GOTO(out, rc = 1); + rc = 1; + goto out; } iv->iov_base = mmap(NULL, iv->iov_len, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, 0, 0); if (iv->iov_base == MAP_FAILED) { printf("No memory %s\n", strerror(errno)); - GOTO(out, rc = 1); + rc = 1; + goto out; } if (act & ACT_WRITE) memset(iv->iov_base, pad, iv->iov_len); @@ -196,7 +197,8 @@ int main(int argc, char** argv) if ((act & ACT_SEEK) && (lseek64(fd, offset, SEEK_SET) < 0)) { printf("Cannot seek %s\n", strerror(errno)); - GOTO(out, rc == 1); + rc = 1; + goto out; } if (act & ACT_WRITE) { @@ -204,19 +206,23 @@ int main(int argc, char** argv) if (rc != len) { printf("Write error: %s (rc = %d, len = %ld)\n", strerror(errno), rc, len); - GOTO(out, rc = 1); + rc = 1; + goto out; } } else if (act & ACT_READ) { rc = readv(fd, iov, iovcnt); if (rc != len) { printf("Read error: %s rc = %d\n", strerror(errno), rc); - GOTO(out, rc = 1); + rc = 1; + goto out; } /* It should return zeroed buf if the read hits hole.*/ if (((act & ACT_READHOLE) || (act & ACT_VERIFY)) && - data_verify(iov, iovcnt, pad)) - GOTO(out, rc = 1); + data_verify(iov, iovcnt, pad)) { + rc = 1; + goto out; + } } rc = 0; diff --git a/lustre/tests/statmany.c b/lustre/tests/statmany.c index 555bacd..b12a1ae 100644 --- a/lustre/tests/statmany.c +++ b/lustre/tests/statmany.c @@ -47,7 +47,6 @@ #include #include -#include #include struct option longopts[] = { diff --git a/lustre/tests/statone.c b/lustre/tests/statone.c index 7a0f4d1..202aa53 100644 --- a/lustre/tests/statone.c +++ b/lustre/tests/statone.c @@ -40,7 +40,6 @@ #include #include -#include #include int main(int argc, char **argv) diff --git a/lustre/tests/test_brw.c b/lustre/tests/test_brw.c index 36ffd68..d0773e9 100644 --- a/lustre/tests/test_brw.c +++ b/lustre/tests/test_brw.c @@ -48,8 +48,10 @@ #include #include #include +#include -#include +#include +#include #define READ 1 #define WRITE 2 @@ -77,24 +79,24 @@ int block_debug_check(char *who, void *addr, int size, __u64 off, __u64 id) ne_off = le64_to_cpu(off); id = le64_to_cpu(id); if (memcmp(addr, (char *)&ne_off, LPDS)) { - CERROR("%s: for offset "LPU64" off: "LPX64" != "LPX64"\n", + fprintf(stderr, "%s: for offset "LPU64" off: "LPX64" != "LPX64"\n", who, off, *(__u64 *)addr, ne_off); err = -EINVAL; } if (memcmp(addr + LPDS, (char *)&id, LPDS)) { - CERROR("%s: for offset "LPU64" id: "LPX64" != "LPX64"\n", + fprintf(stderr, "%s: for offset "LPU64" id: "LPX64" != "LPX64"\n", who, off, *(__u64 *)(addr + LPDS), id); err = -EINVAL; } addr += size - LPDS - LPDS; if (memcmp(addr, (char *)&ne_off, LPDS)) { - CERROR("%s: for offset "LPU64" end off: "LPX64" != "LPX64"\n", + fprintf(stderr, "%s: for offset "LPU64" end off: "LPX64" != "LPX64"\n", who, off, *(__u64 *)addr, ne_off); err = -EINVAL; } if (memcmp(addr + LPDS, (char *)&id, LPDS)) { - CERROR("%s: for offset "LPU64" end id: "LPX64" != "LPX64"\n", + fprintf(stderr, "%s: for offset "LPU64" end id: "LPX64" != "LPX64"\n", who, off, *(__u64 *)(addr + LPDS), id); err = -EINVAL; } -- 1.8.3.1