From: Caspar Zhang <[email protected]> When -DNO_XFS disabled in Makefile, the compilation couldn't pass and many errors and warnings outputed. This patch fixes this issue.
Signed-off-by: Caspar Zhang <[email protected]> --- testcases/kernel/fs/fsstress/Makefile | 3 +++ testcases/kernel/fs/fsstress/fsstress.c | 16 ++++++++-------- testcases/kernel/fs/fsstress/global.h | 4 ++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/testcases/kernel/fs/fsstress/Makefile b/testcases/kernel/fs/fsstress/Makefile index 0a53891..f6527ed 100644 --- a/testcases/kernel/fs/fsstress/Makefile +++ b/testcases/kernel/fs/fsstress/Makefile @@ -27,6 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk CPPFLAGS += -DNO_XFS -I$(abs_srcdir) \ -D_LARGEFILE64_SOURCE -D_GNU_SOURCE +# if removed -DNO_XFS, you should unmask the following line +#CPPFLAGS += -lattr + # XXX (garrcoop): not -Wuninitialized clean. CPPFLAGS += -Wno-error diff --git a/testcases/kernel/fs/fsstress/fsstress.c b/testcases/kernel/fs/fsstress/fsstress.c index 37956f3..e774d22 100644 --- a/testcases/kernel/fs/fsstress/fsstress.c +++ b/testcases/kernel/fs/fsstress/fsstress.c @@ -1436,7 +1436,7 @@ allocsp_f(int opno, long r) e = ioctl(fd, XFS_IOC_ALLOCSP64, &fl) < 0 ? errno : 0; if (v) printf("%d/%d: ioctl(XFS_IOC_ALLOCSP64) %s %lld 0 %d\n", - procid, opno, f.path, off, e); + procid, opno, f.path, (long long)off, e); free_pathname(&f); close(fd); } @@ -1571,7 +1571,7 @@ bulkstat_f(int opno, long r) free(t); if (verbose) printf("%d/%d: bulkstat nent %d total %lld\n", - procid, opno, nent, total); + procid, opno, nent, (long long)total); close(fd); } @@ -1704,7 +1704,7 @@ creat_f(int opno, long r) geom.rtextsize * geom.blocksize * extsize; if (ioctl(fd, XFS_IOC_FSSETXATTR, &a) < 0) e1 = errno; - esz = a.fsx_estsize; + esz = a.fsx_extsize; } #endif @@ -2014,7 +2014,7 @@ freesp_f(int opno, long r) e = ioctl(fd, XFS_IOC_FREESP64, &fl) < 0 ? errno : 0; if (v) printf("%d/%d: ioctl(XFS_IOC_FREESP64) %s %lld 0 %d\n", - procid, opno, f.path, off, e); + procid, opno, f.path, (long long)off, e); free_pathname(&f); close(fd); } @@ -2386,8 +2386,8 @@ resvsp_f(int opno, long r) fl.l_len = (off64_t)(random() % (1024 * 1024)); e = ioctl(fd, XFS_IOC_RESVSP64, &fl) < 0 ? errno : 0; if (v) - printf("%d/%d: ioctl(XFS_IOC_RESVSP64) %s %lld %lld %d\n", - procid, opno, f.path, off, fl.l_len, e); + printf("%d/%d: ioctl(XFS_IOC_RESVSP64) %s %lld %ld %d\n", + procid, opno, f.path, (long long)off, fl.l_len, e); free_pathname(&f); close(fd); } @@ -2603,8 +2603,8 @@ unresvsp_f(int opno, long r) fl.l_len = (off64_t)(random() % (1 << 20)); e = ioctl(fd, XFS_IOC_UNRESVSP64, &fl) < 0 ? errno : 0; if (v) - printf("%d/%d: ioctl(XFS_IOC_UNRESVSP64) %s %lld %lld %d\n", - procid, opno, f.path, off, fl.l_len, e); + printf("%d/%d: ioctl(XFS_IOC_UNRESVSP64) %s %lld %ld %d\n", + procid, opno, f.path, (long long)off, fl.l_len, e); free_pathname(&f); close(fd); } diff --git a/testcases/kernel/fs/fsstress/global.h b/testcases/kernel/fs/fsstress/global.h index f788395..9644666 100644 --- a/testcases/kernel/fs/fsstress/global.h +++ b/testcases/kernel/fs/fsstress/global.h @@ -38,8 +38,8 @@ #if defined(NO_XFS) # include "xfscompat.h" #else -# include <libxfs.h> -# include <attributes.h> +# include <xfs/libxfs.h> +# include <attr/attributes.h> #endif /* libc includes */ -- 1.7.4.1 ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
