Hello community,
here is the log from the commit of package acl for openSUSE:Factory
checked in at Fri Jan 9 01:24:37 CET 2009.
--------
--- acl/acl.changes 2008-12-10 13:41:56.000000000 +0100
+++ /mounts/work_src_done/STABLE/acl/acl.changes 2009-01-09 01:21:30.840591000 +0100
@@ -1,0 +2,5 @@
+Thu Jan 8 13:16:22 PST 2009 - bphilips@novell.com
+
+- Added a number of unit test improvements
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
New:
----
acl-add-getfacl-r-l-p-tests.patch
acl-add-make-test-target-and-use-make-to-run-tests.patch
acl-minor-fix-to-cp.test.patch
acl-move-nfs-tests-to-their-own-folder.patch
acl-move-root-tests-to-their-own-folder.patch
acl-various-improvements-for-test-run.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ acl.spec ++++++
--- /var/tmp/diff_new_pack.P12866/_old 2009-01-09 01:24:06.000000000 +0100
+++ /var/tmp/diff_new_pack.P12866/_new 2009-01-09 01:24:06.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package acl (Version 2.2.47)
#
-# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,11 +24,17 @@
AutoReqProv: on
Summary: Commands for Manipulating POSIX Access Control Lists
Version: 2.2.47
-Release: 27
+Release: 28
Source: %name-%version.src.tar.bz2
Patch0: builddefs.in.diff
Patch1: walk-tree-fix-for-deref.patch
Patch2: null-pointer-access.diff
+Patch3: acl-add-make-test-target-and-use-make-to-run-tests.patch
+Patch4: acl-various-improvements-for-test-run.patch
+Patch5: acl-move-root-tests-to-their-own-folder.patch
+Patch6: acl-move-nfs-tests-to-their-own-folder.patch
+Patch7: acl-minor-fix-to-cp.test.patch
+Patch8: acl-add-getfacl-r-l-p-tests.patch
Url: ftp://oss.sgi.com/projects/xfs/cmd_tars
License: GPL v2 or later
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -95,6 +101,12 @@
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
%build
export OPTIMIZER="$RPM_OPT_FLAGS -fPIC"
@@ -202,6 +214,8 @@
/%{_lib}/libacl.so.1*
%changelog
+* Thu Jan 08 2009 bphilips@novell.com
+- Added a number of unit test improvements
* Wed Dec 10 2008 olh@suse.de
- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade
(bnc#437293)
@@ -218,7 +232,7 @@
* Sat Oct 27 2007 agruen@suse.de
- Don't exhaust the number of file descriptors in the path walking
code, and make sure each directory is only visited once.
-* Fri Oct 26 2007 agruen@suse.de
+* Thu Oct 25 2007 agruen@suse.de
- A large jump to the current upstream version 2.2.45.
- Fix the upstream path walking code.
* Sat Mar 18 2006 agruen@suse.de
@@ -257,11 +271,11 @@
* Thu Jan 01 2004 agruen@suse.de
- Update to version 2.2.21. Bug fix in directory tree walking
code.
-* Wed Oct 22 2003 kukuk@suse.de
+* Tue Oct 21 2003 kukuk@suse.de
- Fix provides for update case
* Thu Aug 28 2003 agruen@suse.de
- Fix a bug with error handling while walking directory trees.
-* Thu Aug 28 2003 ro@suse.de
+* Wed Aug 27 2003 ro@suse.de
- fix patch depth in specfile
* Tue Aug 26 2003 agruen@suse.de
- Fix SIGSEGV if the quote function.
@@ -322,7 +336,7 @@
- Update to version 2.0.17
* Thu Jun 20 2002 uli@suse.de
- fixed for lib64
-* Thu Jun 20 2002 lmuelle@suse.de
+* Wed Jun 19 2002 lmuelle@suse.de
- Remove DESTDIR patch, use DIST_ROOT of package instead
- Fix library location in the devel package
- Update to version 2.0.11
++++++ acl-add-getfacl-r-l-p-tests.patch ++++++
Subject: [PATH] acl: add getfacl -R -L -P tests
Test fixes to walk_tree.c by Andreas.
Signed-off-by: Brandon Philips
---
test/getfacl-recursive.test | 194 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 194 insertions(+)
Index: acl-2.2.47/test/getfacl-recursive.test
===================================================================
--- /dev/null
+++ acl-2.2.47/test/getfacl-recursive.test
@@ -0,0 +1,194 @@
+Tests for proper path recursion
+
+ $ mkdir -p 1/2/3
+ $ mkdir 1/link
+ $ touch 1/link/file
+ $ ln -s `pwd`/1/link 1/2/link
+ $ getfacl -P -R 1/2
+ > # file: 1/2
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/2/3
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+
+ $ getfacl -R 1/2
+ > # file: 1/2
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/2/3
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+
+ $ getfacl -R -L 1/2
+ > # file: 1/2
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/2/3
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/2/link
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/2/link/file
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rw-
+ > group::r--
+ > other::r--
+ >
+
+ $ getfacl -P -R 1
+ > # file: 1
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/2
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/2/3
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/link
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/link/file
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rw-
+ > group::r--
+ > other::r--
+ >
+
+ $ getfacl -R 1
+ > # file: 1
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/2
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/2/3
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/link
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/link/file
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rw-
+ > group::r--
+ > other::r--
+ >
+
+ $ getfacl -R -L 1
+ > # file: 1
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/2
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/2/3
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/2/link
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/2/link/file
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rw-
+ > group::r--
+ > other::r--
+ >
+ > # file: 1/link
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rwx
+ > group::r-x
+ > other::r-x
+ >
+ > # file: 1/link/file
+ > # owner: %TUSER
+ > # group: %TGROUP
+ > user::rw-
+ > group::r--
+ > other::r--
+ >
+
+ $ rm -R 1/
++++++ acl-add-make-test-target-and-use-make-to-run-tests.patch ++++++
Subject: [PATCH] acl: add make test target and use make to run tests
The tests are difficult to run. So, this patch adds a Make target that
sets up the path and runs *.test files in the test/ directory.
nfs specific tests can be ran from the test directory by running
`make nfs`
tests requiring root can be ran from the test directory by running
`make nfs`
Signed-off-by: Brandon Philips
---
Makefile | 6 +++++-
test/Makefile | 26 +++++++++++++++++++-------
2 files changed, 24 insertions(+), 8 deletions(-)
Index: acl-2.2.47/test/Makefile
===================================================================
--- acl-2.2.47.orig/test/Makefile
+++ acl-2.2.47/test/Makefile
@@ -2,13 +2,25 @@
# Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
#
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
+TEST = $(wildcard *.test)
+ROOT = $(wildcard root/*.test)
+NFS = $(wildcard nfs/*.test)
-LSRCFILES = run make-tree \
- cp.test getfacl-noacl.test misc.test nfs-dir.test \
- nfsacl.test permissions.test setfacl.test
+PATH := $(abspath ../getfacl/):$(abspath ../setfacl/):$(abspath ../chacl/):$(PATH)
-include $(BUILDRULES)
+all: $(TEST)
+root: $(ROOT)
+nfs: $(NFS)
-default install install-dev install-lib:
+
+$(TEST):
+ @echo "*** $@ ***"; perl run $@
+
+$(NFS):
+ @echo "NFS specific tests"; @echo "*** $@ ***"; perl run $@
+
+$(ROOT):
+ @echo "Note: Tests must run as root"; @echo "*** $@ ***"; perl run $@
+
+.PHONY: $(TEST) $(ROOT) $(NFS) default
+.NOTPARALLEL:
Index: acl-2.2.47/Makefile
===================================================================
--- acl-2.2.47.orig/Makefile
+++ acl-2.2.47/Makefile
@@ -17,7 +17,7 @@ LDIRT = config.log .dep config.status co
Logs/* built .census install.* install-dev.* install-lib.* *.gz
SUBDIRS = include libmisc libacl getfacl setfacl chacl m4 man doc po \
- test examples build debian
+ examples build debian
default: $(CONFIGURE)
ifeq ($(HAVE_BUILDDEFS), no)
@@ -65,3 +65,7 @@ install-lib: default
realclean distclean: clean
rm -f $(LDIRT) $(CONFIGURE)
rm -rf autom4te.cache Logs
+
+.PHONY: test
+test: default
+ $(MAKE) -C test/
++++++ acl-minor-fix-to-cp.test.patch ++++++
Subject: [PATCH] acl: minor fix to cp.test
X -> x
Signed-off-by: Brandon Philips
---
test/cp.test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: acl-2.2.47/test/cp.test
===================================================================
--- acl-2.2.47.orig/test/cp.test
+++ acl-2.2.47/test/cp.test
@@ -24,7 +24,7 @@ The cp utility should only copy ACLs if
> blubb
$ rm -r i
- $ setfacl -R -m u:bin:rwX h
+ $ setfacl -R -m u:bin:rwx h
$ getfacl --omit-header h/x
> user::rw-
> user:bin:rwx
++++++ acl-move-nfs-tests-to-their-own-folder.patch ++++++
Subject: [PATCH] acl: move nfs tests to their own folder
Since these tests require nfs mounts to run move them into a seperate
folder so they don't run by default.
Signed-off-by: Brandon Philips
---
test/nfs-dir.test | 50 --------------------------------------------------
test/nfs/nfs-dir.test | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
test/nfs/nfsacl.test | 42 ++++++++++++++++++++++++++++++++++++++++++
test/nfsacl.test | 42 ------------------------------------------
4 files changed, 92 insertions(+), 92 deletions(-)
Index: acl-2.2.47/test/nfs-dir.test
===================================================================
--- acl-2.2.47.orig/test/nfs-dir.test
+++ /dev/null
@@ -1,50 +0,0 @@
-This is a regression test for a bug in 2.4 kernels. The test must be run
-as root on a machine that has a loopback mounted NFS export. The mount
-must have root squashing enabled. The test must be run in the root of
-the nfs mount, and requires the following environment variable:
-
-EXPORT_PATH => the path that is mounted at the working directory.
-
- Create a test directory and file.
-
- $ umask 022
- $ mkdir %{EXPORT_PATH}/test
- $ echo blah > %{EXPORT_PATH}/test/blah
-
- Make sure the file can be accessed before.
-
- $ su bin
- $ cat test/blah
- > blah
-
- Set up a situation that triggers the bug.
-
- $ su
- $ chmod go-rwx %{EXPORT_PATH}/test
- $ setfacl -m u:bin:rx %{EXPORT_PATH}/test
- $ ls -dl %{EXPORT_PATH}/test | awk '{print $1, $3, $4}'
- > drwxr-x---+ root root
- $ getfacl --omit-header %{EXPORT_PATH}/test 2> /dev/null
- > user::rwx
- > user:bin:r-x
- > group::---
- > mask::r-x
- > other::---
- >
-
- This should also succeed. With the bug, reading the file would
- fail with "Stale NFS file handle" or "Input/output error".
-
- $ su bin
- $ cat test/blah
- > blah
- $ sleep 3
- $ cat test/blah
- > blah
- $ cat test/blah
- > blah
-
- Clean up.
-
- $ su
- $ rm -rf %{EXPORT_PATH}/test
Index: acl-2.2.47/test/nfs/nfs-dir.test
===================================================================
--- /dev/null
+++ acl-2.2.47/test/nfs/nfs-dir.test
@@ -0,0 +1,50 @@
+This is a regression test for a bug in 2.4 kernels. The test must be run
+as root on a machine that has a loopback mounted NFS export. The mount
+must have root squashing enabled. The test must be run in the root of
+the nfs mount, and requires the following environment variable:
+
+EXPORT_PATH => the path that is mounted at the working directory.
+
+ Create a test directory and file.
+
+ $ umask 022
+ $ mkdir %{EXPORT_PATH}/test
+ $ echo blah > %{EXPORT_PATH}/test/blah
+
+ Make sure the file can be accessed before.
+
+ $ su bin
+ $ cat test/blah
+ > blah
+
+ Set up a situation that triggers the bug.
+
+ $ su
+ $ chmod go-rwx %{EXPORT_PATH}/test
+ $ setfacl -m u:bin:rx %{EXPORT_PATH}/test
+ $ ls -dl %{EXPORT_PATH}/test | awk '{print $1, $3, $4}'
+ > drwxr-x---+ root root
+ $ getfacl --omit-header %{EXPORT_PATH}/test 2> /dev/null
+ > user::rwx
+ > user:bin:r-x
+ > group::---
+ > mask::r-x
+ > other::---
+ >
+
+ This should also succeed. With the bug, reading the file would
+ fail with "Stale NFS file handle" or "Input/output error".
+
+ $ su bin
+ $ cat test/blah
+ > blah
+ $ sleep 3
+ $ cat test/blah
+ > blah
+ $ cat test/blah
+ > blah
+
+ Clean up.
+
+ $ su
+ $ rm -rf %{EXPORT_PATH}/test
Index: acl-2.2.47/test/nfs/nfsacl.test
===================================================================
--- /dev/null
+++ acl-2.2.47/test/nfs/nfsacl.test
@@ -0,0 +1,42 @@
+This is a regression test for bugs in the nfsacl protocol extension.
+The test should be run on an NFS export mount with ACL support.
+
+ Create a test directory and file.
+
+ $ umask 022
+ $ mkdir -p test/sub
+ $ echo blah > test/sub/blah
+
+ $ cp -rp test/sub test/sub2
+ $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}'
+ > drwxr-xr-x test/sub2
+ > -rw-r--r-- test/sub2/blah
+
+ $ rm -rf test/sub2
+
+ $ setfacl -m u:daemon:rwx test/sub
+ $ setfacl -dm u:daemon:rwx test/sub
+ $ getfattr -m- test/sub
+ > # file: test/sub
+ > system.posix_acl_access
+ > system.posix_acl_default
+ >
+
+ $ cp -rp test/sub test/sub2
+ $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}'
+ > drwxrwxr-x+ test/sub2
+ > -rw-r--r-- test/sub2/blah
+
+ $ rm -rf test/sub2
+
+ $ setfacl -m u:daemon:rw test/sub/blah
+ $ cp -rp test/sub test/sub2
+ $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}'
+ > drwxrwxr-x+ test/sub2
+ > -rw-rw-r--+ test/sub2/blah
+
+ $ rm -rf test/sub2
+
+ Clean up.
+
+ $ rm -rf test
Index: acl-2.2.47/test/nfsacl.test
===================================================================
--- acl-2.2.47.orig/test/nfsacl.test
+++ /dev/null
@@ -1,42 +0,0 @@
-This is a regression test for bugs in the nfsacl protocol extension.
-The test should be run on an NFS export mount with ACL support.
-
- Create a test directory and file.
-
- $ umask 022
- $ mkdir -p test/sub
- $ echo blah > test/sub/blah
-
- $ cp -rp test/sub test/sub2
- $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}'
- > drwxr-xr-x test/sub2
- > -rw-r--r-- test/sub2/blah
-
- $ rm -rf test/sub2
-
- $ setfacl -m u:daemon:rwx test/sub
- $ setfacl -dm u:daemon:rwx test/sub
- $ getfattr -m- test/sub
- > # file: test/sub
- > system.posix_acl_access
- > system.posix_acl_default
- >
-
- $ cp -rp test/sub test/sub2
- $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}'
- > drwxrwxr-x+ test/sub2
- > -rw-r--r-- test/sub2/blah
-
- $ rm -rf test/sub2
-
- $ setfacl -m u:daemon:rw test/sub/blah
- $ cp -rp test/sub test/sub2
- $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}'
- > drwxrwxr-x+ test/sub2
- > -rw-rw-r--+ test/sub2/blah
-
- $ rm -rf test/sub2
-
- Clean up.
-
- $ rm -rf test
++++++ acl-move-root-tests-to-their-own-folder.patch ++++++
++++ 880 lines (skipped)
++++++ acl-various-improvements-for-test-run.patch ++++++
Subject: [PATCH] acl: various improvements for test/run
First move process_test to avoid a warning:
main::process_test() called too early to check prototype at ./run line 47.
main::process_test() called too early to check prototype at ./run line 60.
Create two ENV variables TUSER and TGROUP to get the user/group
running the test.
Add a | test line that is similar to > but is interpreted as a regular
expression.
Signed-off-by: Brandon Philips
---
test/run | 99 ++++++++++++++++++++++++++++++++-------------------------------
1 file changed, 51 insertions(+), 48 deletions(-)
Index: acl-2.2.47/test/run
===================================================================
--- acl-2.2.47.orig/test/run
+++ acl-2.2.47/test/run
@@ -25,26 +25,69 @@ if (isatty(fileno(STDOUT))) {
$FAILED = "\033[31m\033[1m" . $FAILED . "\033[m";
}
+$ENV{"TUSER"} = getpwuid($>);
+$ENV{"TGROUP"} = getgrgid($));
+
sub exec_test($$);
-my ($prog, $in, $out) = ([], [], []);
+my ($prog, $in, $out, $outmatch) = ([], [], [], []);
my $line_number = 0;
my $prog_line;
my ($tests, $failed) = (0,0);
+sub process_test($$$$$) {
+ my ($prog, $prog_line, $in, $out, $outmatch) = @_;
+
+ return unless @$prog;
+
+ my $p = [ @$prog ];
+ print "[$prog_line] \$ ", join(' ',
+ map { s/\s/\\$&/g; $_ } @$p), " -- ";
+ my $result = exec_test($prog, $in);
+ my $good = 1;
+ my $nmax = (@$outmatch > @$result) ? @$outmatch : @$result;
+ for (my $n=0; $n < $nmax; $n++) {
+ if (!defined($outmatch->[$n]) || !defined($result->[$n]) ||
+ $result->[$n] !~ /($outmatch->[$n])/) {
+ $good = 0;
+ }
+ }
+ $tests++;
+ $failed++ unless $good;
+ print $good ? $OK : $FAILED, "\n";
+ if (!$good) {
+ for (my $n=0; $n < $nmax; $n++) {
+ my $l = defined($out->[$n]) ? $out->[$n] : "~";
+ chomp $l;
+ my $r = defined($result->[$n]) ? $result->[$n] : "~";
+ chomp $r;
+ print sprintf("%-37s %s %-39s\n", $l, $l eq $r ? "|" : "?", $r);
+ }
+ } elsif ($opt_v) {
+ print join('', @$result);
+ }
+}
+
+
+
for (;;) {
my $line = <>; $line_number++;
if (defined $line) {
# Substitute %VAR and %{VAR} with environment variables.
- $line =~ s[%(?:(\w+)|\{(\w+)\})][$ENV{"$1$2"}]eg;
+ $line =~ s[%\{(\w+)\}][$ENV{"$1"}]eg;
+ $line =~ s[%(\w+)][$ENV{"$1"}]eg;
}
if (defined $line) {
if ($line =~ s/^\s*< ?//) {
push @$in, $line;
- } elsif ($line =~ s/^\s*> ?//) {
+ } elsif ($line =~ s/^\s*> ?//) { # explicit matching
+ push @$outmatch, "^(\Q$line\E)\$";
+ push @$out, $line;
+ } elsif ($line =~ s/^\s*\| ?//) { # regex case
+ push @$outmatch, $line;
push @$out, $line;
} else {
- process_test($prog, $prog_line, $in, $out);
+ process_test($prog, $prog_line, $in, $out, $outmatch);
$prog = [];
$prog_line = 0;
@@ -55,9 +98,10 @@ for (;;) {
$prog_line = $line_number;
$in = [];
$out = [];
+ $outmatch = [];
}
} else {
- process_test($prog, $prog_line, $in, $out);
+ process_test($prog, $prog_line, $in, $out, $outmatch);
last;
}
}
@@ -75,39 +119,6 @@ print $status, "\n";
exit $failed ? 1 : 0;
-sub process_test($$$$) {
- my ($prog, $prog_line, $in, $out) = @_;
-
- return unless @$prog;
-
- my $p = [ @$prog ];
- print "[$prog_line] \$ ", join(' ',
- map { s/\s/\\$&/g; $_ } @$p), " -- ";
- my $result = exec_test($prog, $in);
- my $good = 1;
- my $nmax = (@$out > @$result) ? @$out : @$result;
- for (my $n=0; $n < $nmax; $n++) {
- if (!defined($out->[$n]) || !defined($result->[$n]) ||
- $out->[$n] ne $result->[$n]) {
- $good = 0;
- }
- }
- $tests++;
- $failed++ unless $good;
- print $good ? $OK : $FAILED, "\n";
- if (!$good) {
- for (my $n=0; $n < $nmax; $n++) {
- my $l = defined($out->[$n]) ? $out->[$n] : "~";
- chomp $l;
- my $r = defined($result->[$n]) ? $result->[$n] : "~";
- chomp $r;
- print sprintf("%-37s %s %-39s\n", $l, $l eq $r ? "|" : "?", $r);
- }
- } elsif ($opt_v) {
- print join('', @$result);
- }
-}
-
sub su($) {
my ($user) = @_;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org