#3998 fCmd.test 27.5 and 27.6 failure on SPARC Solaris

obsolete: 8.6a0
open
Vince Darley
5
2008-05-13
2008-05-13
Larry W. Virden
No

The above two tests fail on SPARC Solaris (and probably other platforms) because the tests make the assumption that any user can change the group of a file.

On Solaris 2.8 (and a variety of older and newer versions as well), the user can only change the group of a file s/he owns, and only change it to a group to which s/he belongs.

The weird thing, to me, is that I would have thought this test should have worked - I mean, I am running it as me, so the file created should have been created in my default group.

However, what I am seeing is this:

fCmd.test

==== fCmd-27.5 TclFileAttrsCmd - setting one option FAILED
==== Contents of test case:

createfile foo.tmp
set attrs [file attributes foo.tmp]
file attributes foo.tmp {*}[lrange $attrs 0 1]

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: could not set group for file "foo.tmp": not owner
while executing
"file attributes foo.tmp {*}[lrange $attrs 0 1]"
("uplevel" body line 4)
invoked from within
"uplevel 1 $script"
---- errorCode: POSIX EPERM {not owner}
==== fCmd-27.5 FAILED

==== fCmd-27.6 TclFileAttrsCmd - setting more than one option FAILED
==== Contents of test case:

createfile foo.tmp
set attrs [file attributes foo.tmp]
file attributes foo.tmp {*}[lrange $attrs 0 3]

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: could not set group for file "foo.tmp": not owner
while executing
"file attributes foo.tmp {*}[lrange $attrs 0 3]"
("uplevel" body line 4)
invoked from within
"uplevel 1 $script"
---- errorCode: POSIX EPERM {not owner}
==== fCmd-27.6 FAILED

Discussion