[Libsysio-commit] cplant: libsysio/tests Makefile.am helper.pm sysio_stubs.c sysio_tests.c test_driv
Brought to you by:
lward
From: Ruth K. <rk...@us...> - 2003-08-21 16:59:49
|
Update of /cvsroot/libsysio/libsysio/tests In directory sc8-pr-cvs1:/tmp/cvs-serv20601/tests Modified Files: Tag: cplant Makefile.am helper.pm sysio_stubs.c sysio_tests.c test_driver.c test_path.pl test_stats.c Log Message: backport to RH6.2 cplant environment Index: Makefile.am =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/Makefile.am,v retrieving revision 1.12.2.1 retrieving revision 1.12.2.2 diff -u -w -b -B -p -r1.12.2.1 -r1.12.2.2 --- Makefile.am 18 Aug 2003 19:47:17 -0000 1.12.2.1 +++ Makefile.am 20 Aug 2003 21:05:49 -0000 1.12.2.2 @@ -36,7 +36,7 @@ endif if WITH_CPLANT_YOD YOD_DRIVER_NAME=yod YOD_DRIVER_CFLAGS= -DCPLANT_YOD -YOD_DRIVER_LIB= $(top_builddir)/drivers/yod/libyod.a +YOD_DRIVER_LIB= $(top_builddir)/drivers/yod/libsysio_yod.a else YOD_DRIVER_NAME= YOD_DRIVER_CFLAGS= @@ -46,7 +46,7 @@ DRIVERS=$(NATIVE_DRIVER_NAME) $(INCORE_D CMNSRC=drv_init_all.c drv_data.c BUILT_SOURCES=drv_data.c -check_PROGRAMS=test_driver +#check_PROGRAMS=test_driver if TEST_ALPHA_ARG TESTS_ENVIRONMENT=IS_ALPHA=yes else @@ -54,7 +54,7 @@ TESTS_ENVIRONMENT=IS_ALPHA=no endif TESTS=test_all.pl -CFL=$(AM_CFLAGS) $(AM_CPPFLAGS) \ +AM_CFLAGS = $(AM_CPPFLAGS) \ $(NATIVE_DRIVER_CFLAGS) $(INCORE_DRIVER_CFLAGS) \ $(STDFD_DEV_CFLAGS) $(YOD_DRIVER_CFLAGS) @@ -63,42 +63,42 @@ LIBS=$(NATIVE_DRIVER_LIB) $(INCORE_DRIVE $(top_builddir)/src/libsysio.a test_copy_SOURCES=test_copy.c $(CMNSRC) -test_copy_CFLAGS=$(CFL) +test_copy_CFLAGS=$(AM_CFLAGS) test_copy_LDADD=$(LIBS) test_copy_DEPENDENCIES=$(LIBS) test_stats_SOURCES=test_stats.c $(CMNSRC) -test_stats_CFLAGS=$(CFL) +test_stats_CFLAGS=$(AM_CFLAGS) test_stats_LDADD=$(LIBS) test_stats_DEPENDENCIES=$(LIBS) test_path_SOURCES=test_path.c $(CMNSRC) -test_path_CFLAGS=$(CFL) +test_path_CFLAGS=$(AM_CFLAGS) test_path_LDADD=$(LIBS) test_path_DEPENDENCIES=$(LIBS) test_mounts_SOURCES=test_mounts.c $(CMNSRC) -test_mounts_CFLAGS=$(CFL) +test_mounts_CFLAGS=$(AM_CFLAGS) test_mounts_LDADD=$(LIBS) test_mounts_DEPENDENCIES=$(LIBS) test_list_SOURCES=test_list.c $(CMNSRC) -test_list_CFLAGS=$(CFL) +test_list_CFLAGS=$(AM_CFLAGS) test_list_LDADD=$(LIBS) test_list_DEPENDENCIES=$(LIBS) test_getcwd_SOURCES=test_getcwd.c $(CMNSRC) -test_getcwd_CFLAGS=$(CFL) +test_getcwd_CFLAGS=$(AM_CFLAGS) test_getcwd_LDADD=$(LIBS) test_getcwd_DEPENDENCIES=$(LIBS) test_stdfd_SOURCES=test_stdfd.c $(CMNSRC) -test_stdfd_CFLAGS=$(CFL) +test_stdfd_CFLAGS=$(AM_CFLAGS) test_stdfd_LDADD=$(LIBS) test_stdfd_DEPENDENCIES=$(LIBS) test_driver_SOURCES=test_driver.c sysio_tests.c sysio_stubs.c help.c $(CMNSRC) -test_driver_CFLAGS=$(CFL) +test_driver_CFLAGS=$(AM_CFLAGS) test_driver_LDADD=$(LIBS) test_driver_DEPENDENCIES=$(LIBS) Index: helper.pm =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/helper.pm,v retrieving revision 1.2 retrieving revision 1.2.6.1 diff -u -w -b -B -p -r1.2 -r1.2.6.1 --- helper.pm 14 Aug 2003 21:16:33 -0000 1.2 +++ helper.pm 20 Aug 2003 21:05:49 -0000 1.2.6.1 @@ -7,7 +7,7 @@ package helper; use strict; -use Fcntl ':mode'; +use POSIX; BEGIN{} Index: sysio_stubs.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/sysio_stubs.c,v retrieving revision 1.2 retrieving revision 1.2.6.1 diff -u -w -b -B -p -r1.2 -r1.2.6.1 --- sysio_stubs.c 14 Aug 2003 21:16:33 -0000 1.2 +++ sysio_stubs.c 20 Aug 2003 21:05:49 -0000 1.2.6.1 @@ -7,7 +7,7 @@ #include <fcntl.h> #include <unistd.h> #include <sys/uio.h> -#include <linux/fs.h> +#include <sys/mount.h> #include <sys/stat.h> #include <sys/statvfs.h> @@ -1251,6 +1251,7 @@ struct cmd_map ioctl_cmds[] = { { "BLKGETSIZE", BLKGETSIZE, 3 }, { "BLKRASET", BLKRASET, 3 }, { "BLKRAGET", BLKRAGET, 3 }, +#if 0 { "BLKSECTSET", BLKSECTSET, 3 }, { "BLKSECTGET", BLKSECTGET, 3 }, { "BLKSSZGET", BLKSSZGET, 3 }, @@ -1260,6 +1261,7 @@ struct cmd_map ioctl_cmds[] = { { "BLKBSZSET", BLKBSZSET, 3 }, { "FIBMAP", FIBMAP, 3 }, { "FIGETBSZ", FIGETBSZ, 3}, +#endif { NULL, -1, 0 } }; Index: sysio_tests.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/sysio_tests.c,v retrieving revision 1.2 retrieving revision 1.2.6.1 diff -u -w -b -B -p -r1.2 -r1.2.6.1 --- sysio_tests.c 14 Aug 2003 21:16:33 -0000 1.2 +++ sysio_tests.c 20 Aug 2003 21:05:49 -0000 1.2.6.1 @@ -824,7 +824,11 @@ void print_statvfs(struct statvfs *st) DBG(3, sprintf(output, "%s f_ffree: %x\n", output, (unsigned int) st->f_ffree)); DBG(3, sprintf(output, "%s f_favail: %x\n", output, (unsigned int) st->f_favail)); DBG(3, sprintf(output, "%s f_files: %x\n", output, (unsigned int) st->f_files)); +#if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 1) + DBG(3, sprintf(output, "%s f_fsid: %x\n", output, (unsigned int) st->f_fsid.__val[1])); +#else DBG(3, sprintf(output, "%s f_fsid: %x\n", output, (unsigned int) st->f_fsid)); +#endif DBG(3, sprintf(output, "%s f_flag: %x\n", output, (unsigned int) st->f_flag)); DBG(3, sprintf(output, "%s f_fnamemax: %x\n", output, (unsigned int) st->f_namemax)); } Index: test_driver.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_driver.c,v retrieving revision 1.2 retrieving revision 1.2.6.1 diff -u -w -b -B -p -r1.2 -r1.2.6.1 --- test_driver.c 14 Aug 2003 21:16:33 -0000 1.2 +++ test_driver.c 20 Aug 2003 21:05:49 -0000 1.2.6.1 @@ -120,8 +120,8 @@ void * alloc_buff32(unsigned int size, i long buf_ptr; int err; /* - if ((err = posix_memalign(&buf, align, size)) != 0) { - perror("posix_memalign"); + if ((err = memalign(&buf, align, size)) != 0) { + perror("memalign"); return 0; } */ @@ -145,7 +145,7 @@ long alloc_buff64(unsigned int size, int char * buf; long ret_value; - if (posix_memalign((void **)&buf, align, size)) + if (memalign((void **)&buf, align, size)) return 0; ret_value = (long)buf; Index: test_path.pl =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_path.pl,v retrieving revision 1.2 retrieving revision 1.2.6.1 diff -u -w -b -B -p -r1.2 -r1.2.6.1 --- test_path.pl 14 Aug 2003 21:16:33 -0000 1.2 +++ test_path.pl 20 Aug 2003 21:05:49 -0000 1.2.6.1 @@ -9,7 +9,7 @@ use IPC::Open2; use strict; use helper; -use Fcntl ':mode'; +use POSIX; sub usage { Index: test_stats.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_stats.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -w -b -B -p -r1.4 -r1.4.2.1 --- test_stats.c 14 Aug 2003 18:39:33 -0000 1.4 +++ test_stats.c 20 Aug 2003 21:05:49 -0000 1.4.2.1 @@ -170,7 +170,14 @@ do_stats(const char *path) (void )fprintf(stderr, "%s: [f]stat info mismatch\n", path); goto out; } - if (stvfsbuf1.f_fsid != stvfsbuf2.f_fsid) { + if ( +#if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 1) + stvfsbuf1.f_fsid.__val[0] != stvfsbuf2.f_fsid.__val[0] || + stvfsbuf1.f_fsid.__val[1] != stvfsbuf2.f_fsid.__val[1] +#else + stvfsbuf1.f_fsid != stvfsbuf2.f_fsid +#endif + ) { (void )fprintf(stderr, "%s: [f]statvfs info mismatch\n", path); } printf("%s:" |