[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Proposed updated for next version of lsb-distribution-test



I'm planning on doing an update to the binary version of the test
suites (and source ones where necessary) tommorow. I'm trying to keep
the scope of the changes fairly minimal to reduce the risk of
introducing new problems. If a problem you have seen is not on the
list or you object to a change please let me know ASAP. I've included
patches where relevant so if you're familiar with the pieces of code
in question please take the time to review it. The patches have
already been applied to CVS but of course can be reverted if there is
a need.

* Dynamically link getspnam in the test suite binaries
  So far I've been unable to determine exactly why statically linking
  getspnam causes problems so until that can be resolved the
  interface will be dynamically linked even though its not an
  LSB interface

* LSB.usersgroups/commands/misc/T.misc 21
  There is a logic bug in this test causing the test to erroneously
  fail when it should suceed (and vice-versa)

--- command_tests.sh	2001/11/21 01:14:08	1.21
+++ command_tests.sh	2002/01/17 01:05:41	1.22
@@ -11,9 +11,12 @@
 # Revision 1.1 2001/01/19 15:25:57 Apham & Ahayden 
 #		Added more descriptive comments.
 #
-# $Revision: 1.21 $
+# $Revision: 1.22 $
 #
 # $Log: command_tests.sh,v $
+# Revision 1.22  2002/01/17 01:05:41  cyeoh
+# Fix logic in tp21 - was grepping for wrong user
+#
 # Revision 1.21  2001/11/21 01:14:08  cyeoh
 # Fix spelling typo in CVS tag
 #
@@ -819,9 +822,9 @@
 	FAIL=Y
     else
 #Check to see the testfile's owner is actually changed.
-      ls -l $TestFile | grep $OTHER_USER2 > /dev/null 2>&1
+      ls -l $TestFile | grep $OTHER_USER1 > /dev/null 2>&1
       TC_EXIT_VALUE=$?
-      if [ ! $TC_EXIT_VALUE -eq 0 ]; then
+      if [ $TC_EXIT_VALUE -ne 0 ]; then
         tet_infoline "chown --from=CUR_OWNER:CUR_GRP: fail.  Expected TestFile's owner to change but did not."
 	FAIL=Y
       else

* LSB.fhs/root/bin/bin-tc 46
 "Reference 3.4-46 (A)"
 "If /bin/sh is bash, then /bin/sh shall be a symbolic"
 "or hard link to /bin/bash"
 "(See the LSB_BIN_SHELL_BASH parameter)"

  Has a problem if /bin/sh is a link to bash, but bash
  is a link to /bin/bash2. This is a problem with 
  lsb_test_symlink. The following patch changes the function's
  behaviour so lsb_test_symlink follows symlinks both on the
  "from" and "to" arguments. This changes the semantics slightly
  so it returns true if both files passed end up pointing
  to the same thing. This is not quite the same as before
  as it will return true even if the symlink path through which
  the 'from' parameter doesn't pass through 'to'. Effectively
  I think we're testing for the behaviour which is desired though 
  but not as confident about making this change.

--- lsbfuncs.sh	2001/07/20 11:49:47	1.5
+++ lsbfuncs.sh	2002/01/17 02:21:24	1.6
@@ -18,9 +18,15 @@
 #	DATE CREATED:	21 Dec 1998
 ##########################################################################
 
-# This is $Revision: 1.5 $
+# This is $Revision: 1.6 $
 #
 # $Log: lsbfuncs.sh,v $
+# Revision 1.6  2002/01/17 02:21:24  cyeoh
+# modifies lsb_test_symlink soboth symlink "from" and "to" are followed
+# for symlinks. This changes the behaviour such that if the "to" is
+# a symlink but "from" does point to what "to" points to then it returns
+# true.
+#
 # Revision 1.5  2001/07/20 11:49:47  ajosey
 # add further diagnostics
 #
@@ -110,8 +116,14 @@
 		if test $? -ne 0
 		then
 			return 3 # unresolved
+		fi
+                pathptr_to=`lsb_realpath $to`
+		if test $? -ne 0
+		then
+                        # Destination does not point anywhere
+			return 3 # unresolved
 		fi
-		if test "$pathptr" = "$to"
+		if test "$pathptr" = "$pathptr_to"
 		then
 			return 0 # pass
 		else


* Add a warning message to the package description. The package contains
  setuid/setgid binaries and may also create further setuid/setgid
  programs during the execution of the test suites (possibly leaving
  them around afterwards). For security reasons you not leave this
  package installed on production systems.

* Fix version number for lsb-distribution-test package

Regards,

Chris
-- 
cyeoh@au.ibm.com
IBM OzLabs Linux Development Group
Canberra, Australia



Reply to: