[Libsysio-commit] namespace_assembly: libsysio/tests Makefile.am cleanup.pl setup.pl sysio_stubs.c s
Brought to you by:
lward
Update of /cvsroot/libsysio/libsysio/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15431/tests Modified Files: Tag: namespace_assembly Makefile.am cleanup.pl setup.pl sysio_stubs.c sysio_tests.c test_all.pl test_copy.pl test_driver.c test_getcwd.pl test_list.pl test_mounts.c test_path.pl test_stats.pl test_symlink.pl Log Message: Bring in changes from the HEAD. Index: Makefile.am =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/Makefile.am,v retrieving revision 1.16.2.1 retrieving revision 1.16.2.2 diff -u -w -b -B -p -r1.16.2.1 -r1.16.2.2 --- Makefile.am 18 Dec 2003 18:44:02 -0000 1.16.2.1 +++ Makefile.am 28 Jan 2004 13:16:57 -0000 1.16.2.2 @@ -36,7 +36,16 @@ YOD_DRIVER_NAME= YOD_DRIVER_CFLAGS= endif -DRIVERS=$(NATIVE_DRIVER_NAME) $(INCORE_DRIVER_NAME) $(YOD_DRIVER_NAME) $(STFD_DEV_NAME) +if WITH_SOCKETS_DRIVER +SOCKETS_DRIVER_NAME=sockets +SOCKETS_DRIVER_CFLAGS= -I$(top_srcdir)/drivers/sockets +else +SOCKETS_DRIVER_NAME= +SOCKETS_DRIVER_CFLAGS= +endif + +DRIVERS=$(NATIVE_DRIVER_NAME) $(INCORE_DRIVER_NAME) $(YOD_DRIVER_NAME) \ + $(STFD_DEV_NAME) $(SOCKETS_DRIVER_NAME) CMNSRC=drv_init_all.c drv_data.c Index: cleanup.pl =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/cleanup.pl,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -u -w -b -B -p -r1.1 -r1.1.4.1 --- cleanup.pl 30 Oct 2003 15:22:19 -0000 1.1 +++ cleanup.pl 28 Jan 2004 13:16:57 -0000 1.1.4.1 @@ -46,8 +46,7 @@ if ((@ARGV > 1) && ($ARGV[$currarg++] eq my $cwd = $ARGV[$currarg]; # Get tests directory -my $testdir = $0; -$testdir =~ s/\/\w+.pl$//; +my $testdir = $FindBin::Bin; eval { if ($is_alpha == 0) { Index: setup.pl =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/setup.pl,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -u -w -b -B -p -r1.1 -r1.1.4.1 --- setup.pl 30 Oct 2003 15:22:19 -0000 1.1 +++ setup.pl 28 Jan 2004 13:16:57 -0000 1.1.4.1 @@ -40,8 +40,7 @@ if ((@ARGV > 1) && ($ARGV[$currarg++] eq my $cwd = $ARGV[$currarg]; # Get tests directory -my $testdir = $0; -$testdir =~ s/\/\w+.pl$//; +my $testdir = $FindBin::Bin; eval { if ($is_alpha == 0) { Index: sysio_stubs.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/sysio_stubs.c,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -w -b -B -p -r1.6 -r1.6.2.1 --- sysio_stubs.c 28 Oct 2003 20:59:39 -0000 1.6 +++ sysio_stubs.c 28 Jan 2004 13:16:57 -0000 1.6.2.1 @@ -241,14 +241,14 @@ int test_do_printbuf(int argc, char **ar index = mobj->obj; buf_st = buflist[index]; - DBG(2, fprintf(outfp, "buf_st is %x:\n", buf_st)); + DBG(2, fprintf(outfp, "buf_st is %p:\n", buf_st)); buf = buf_st->buf; DBG(2, fprintf(outfp, "buf %s:\n", argv[0])); if (mobj->type == STR) { sprintf(output, "\n%s", (char *)buf); } else { sprintf(output,"%s\n", output); - DBG(2, fprintf(outfp, "buf_st->len is %d, buf is %x\n", buf_st->len, buf)); + DBG(2, fprintf(outfp, "buf_st->len is %d, buf is %p\n", buf_st->len, buf)); if (argc == 1) { for (i = 0; i < buf_st->len/4; i++) DBG(2, fprintf(outfp, "%#x ", ((int *)buf)[i])); Index: sysio_tests.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/sysio_tests.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -u -w -b -B -p -r1.3 -r1.3.2.1 --- sysio_tests.c 10 Oct 2003 18:50:31 -0000 1.3 +++ sysio_tests.c 28 Jan 2004 13:16:57 -0000 1.3.2.1 @@ -268,7 +268,6 @@ out: int sysio_chdir(char *newdir) { - char *buf; if (chdir(newdir) != 0) { my_perror(newdir); @@ -744,12 +743,6 @@ int sysio_getdirentries(int fd, char *bu (unsigned long long )dp->d_off, dp->d_reclen, (char )dp->d_type)); - DBG(3, fprintf(outfp, "\t%s: ino %x off %x len %x type %x\n", - dp->d_name, - (unsigned long long )dp->d_ino, - (unsigned long long )dp->d_off, - dp->d_reclen, - (char )dp->d_type)); err -= dp->d_reclen; dp = (void *)dp + dp->d_reclen; } Index: test_all.pl =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_all.pl,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -w -b -B -p -r1.6 -r1.6.2.1 --- test_all.pl 30 Oct 2003 15:22:19 -0000 1.6 +++ test_all.pl 28 Jan 2004 13:16:57 -0000 1.6.2.1 @@ -6,6 +6,8 @@ # use strict; +use FindBin; + use Cwd 'abs_path'; my $alpha_arg = ""; @@ -31,8 +33,7 @@ my $success = 0; my $cwd = $ENV{PWD}; # Get tests directory -my $testdir = $0; -$testdir =~ s/\/\w+.pl$//; +my $testdir = $FindBin::Bin; my $res; Index: test_copy.pl =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_copy.pl,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -u -w -b -B -p -r1.3 -r1.3.2.1 --- test_copy.pl 10 Oct 2003 18:50:31 -0000 1.3 +++ test_copy.pl 28 Jan 2004 13:16:57 -0000 1.3.2.1 @@ -23,8 +23,7 @@ sub process_cmd my ($src, $dest, $is_alpha) = @_; # Get tests directory -my $testdir = $0; -$testdir =~ s/\/\w+.pl$//; + my $testdir = $FindBin::Bin; eval { if ($is_alpha == 0) { Index: test_driver.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_driver.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_driver.c 28 Oct 2003 20:59:39 -0000 1.4 +++ test_driver.c 28 Jan 2004 13:16:57 -0000 1.4.2.1 @@ -118,7 +118,7 @@ void * alloc_buff32(unsigned int size, i { void* buf; long buf_ptr; - int err; + /* if ((err = memalign(&buf, align, size)) != 0) { perror("memalign"); @@ -145,10 +145,14 @@ long alloc_buff64(unsigned int size, int char * buf; long ret_value; + /* if (memalign((void **)&buf, align, size)) return 0; - - ret_value = (long)buf; + */ + size += align; + buf = malloc(size); + align--; + ret_value = (long)buf + ((long)buf & align); return ret_value; } @@ -230,7 +234,7 @@ int get_obj(char *var_name) * Check for '|', indicates that one or more values are or'd * together */ - for (i=0; i < strlen(var_name); i++) { + for (i=0; (unsigned int)i < strlen(var_name); i++) { if (var_name[i] == '|') { char *str1 = malloc(i+1); char *str2 = malloc(strlen(var_name)-i+1); Index: test_getcwd.pl =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_getcwd.pl,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -w -b -B -p -r1.4 -r1.4.2.1 --- test_getcwd.pl 30 Oct 2003 15:22:19 -0000 1.4 +++ test_getcwd.pl 28 Jan 2004 13:16:57 -0000 1.4.2.1 @@ -46,8 +46,7 @@ sub process_cmd my ($dir, $is_alpha) = @_; # Get tests directory - my $testdir = $0; - $testdir =~ s/\/\w+.pl$//; + my $testdir = $FindBin::Bin; eval { if ($is_alpha == 0) { Index: test_list.pl =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_list.pl,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -u -w -b -B -p -r1.3 -r1.3.2.1 --- test_list.pl 10 Oct 2003 18:50:31 -0000 1.3 +++ test_list.pl 28 Jan 2004 13:16:57 -0000 1.3.2.1 @@ -129,8 +129,7 @@ sub process_cmd my $done_files = 0; # Get tests directory -my $testdir = $0; -$testdir =~ s/\/\w+.pl$//; + my $testdir = $FindBin::Bin; eval { if ($is_alpha == 1) { Index: test_mounts.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_mounts.c,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -w -b -B -p -r1.5 -r1.5.2.1 --- test_mounts.c 10 Oct 2003 18:50:31 -0000 1.5 +++ test_mounts.c 28 Jan 2004 13:16:57 -0000 1.5.2.1 @@ -436,7 +436,7 @@ mountit(const char *arg) /* * Eat leading white. */ - while (*s && *s == ' ' || *s == '\t') + while (*s && ((*s == ' ') || (*s == '\t'))) s++; /* * Get opts. @@ -456,7 +456,7 @@ mountit(const char *arg) /* * Eat leading white. */ - while (*s && *s == ' ' || *s == '\t') + while (*s && ((*s == ' ') || (*s == '\t'))) s++; /* * Get target @@ -471,7 +471,7 @@ mountit(const char *arg) if (*cp) *cp++ = '\0'; - err = mkdir(target, "0777"); + err = mkdir(target, 0777); if (err && errno != EEXIST) perror(target); err = mount(source, target, fstype, 0, opts); Index: test_path.pl =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_path.pl,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -u -w -b -B -p -r1.3 -r1.3.2.1 --- test_path.pl 10 Oct 2003 18:50:31 -0000 1.3 +++ test_path.pl 28 Jan 2004 13:16:57 -0000 1.3.2.1 @@ -87,8 +87,7 @@ sub process_cmd my $path; # Get tests directory - my $testdir = $0; - $testdir =~ s/\/\w+.pl$//; + my $testdir = $FindBin::Bin; eval { if ($isalpha == 0) { Index: test_stats.pl =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_stats.pl,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -w -b -B -p -r1.5 -r1.5.2.1 --- test_stats.pl 30 Oct 2003 15:22:19 -0000 1.5 +++ test_stats.pl 28 Jan 2004 13:16:57 -0000 1.5.2.1 @@ -95,8 +95,7 @@ sub process_cmd my ($file, $use_system, $is_alpha) = @_; # Get tests directory -my $testdir = $0; -$testdir =~ s/\/\w+.pl$//; + my $testdir = $FindBin::Bin; eval { if ($is_alpha == 0) { Index: test_symlink.pl =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_symlink.pl,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -u -w -b -B -p -r1.3 -r1.3.4.1 --- test_symlink.pl 30 Oct 2003 15:22:19 -0000 1.3 +++ test_symlink.pl 28 Jan 2004 13:16:57 -0000 1.3.4.1 @@ -58,8 +58,7 @@ sub process_cmd my ($src, $dest, $is_alpha) = @_; # Get tests directory - my $testdir = $0; - $testdir =~ s/\/\w+.pl$//; + my $testdir = $FindBin::Bin; eval { if ($is_alpha == 0) { |