From: Richard D. <ric...@us...> - 2008-04-06 09:12:50
|
Update of /cvsroot/file-extattr/File-ExtAttr/t In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv18613/t Modified Files: 11basic.t 12empty.t 13long.t 14optional.t 15create.t 16replace.t 17createreplace.t 18list.t 20tie-basic.t 22tie-nonuser.t 30nsbasic.t 31nsmultiple.t 32nsnonuser.t 33nslong.t 39nsempty.t 80memleakget.t Log Message: Make sure that the errno value from any failed system calls is propagated into $! (#32679, #32680). This has only been implemented and tested on Linux so far. Index: 16replace.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/16replace.t,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 16replace.t 5 Jul 2007 08:36:34 -0000 1.5 --- 16replace.t 6 Apr 2008 09:12:48 -0000 1.6 *************** *** 32,36 **** my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 32,36 ---- my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. *************** *** 73,77 **** ########################## ! $fh = new IO::File("<$filename") || die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; --- 73,77 ---- ########################## ! $fh = new IO::File("<$filename") or die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; Index: 14optional.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/14optional.t,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** 14optional.t 5 Jul 2007 08:36:34 -0000 1.6 --- 14optional.t 6 Apr 2008 09:12:48 -0000 1.7 *************** *** 30,34 **** my $TESTDIR = ($ENV{ATTR_TEST_DIR} || '.'); my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 30,34 ---- my $TESTDIR = ($ENV{ATTR_TEST_DIR} || '.'); my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. *************** *** 50,54 **** #will die if xattr stuff doesn't work at all ! setfattr($_, "$key", $val) || die "setfattr failed on $_: $!"; #set it --- 50,54 ---- #will die if xattr stuff doesn't work at all ! setfattr($_, "$key", $val) or die "setfattr failed on $_: $!"; #set it Index: 33nslong.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/33nslong.t,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 33nslong.t 4 Nov 2007 09:00:11 -0000 1.5 --- 33nslong.t 6 Apr 2008 09:12:48 -0000 1.6 *************** *** 34,38 **** my $TESTDIR = ($ENV{ATTR_TEST_DIR} || '.'); my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 34,38 ---- my $TESTDIR = ($ENV{ATTR_TEST_DIR} || '.'); my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. *************** *** 61,67 **** #on my /var partition, and 920 is the biggest for my loopback partition. #What's up with that? ! #setfattr($_, "$key-2", ('x' x 3991)) || die "setfattr failed on $_: $!"; setfattr($_, "$key", $longval, { namespace => 'user' }) ! || die "setfattr failed on $_: $!"; #set it --- 61,67 ---- #on my /var partition, and 920 is the biggest for my loopback partition. #What's up with that? ! #setfattr($_, "$key-2", ('x' x 3991)) or die "setfattr failed on $_: $!"; setfattr($_, "$key", $longval, { namespace => 'user' }) ! or die "setfattr failed on $_: $!"; #set it *************** *** 95,99 **** ########################## ! $fh = new IO::File("<$filename") || die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; --- 95,99 ---- ########################## ! $fh = new IO::File("<$filename") or die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; *************** *** 104,110 **** #on my /var partition, and 920 is the biggest for my loopback partition. #What's up with that? ! #setfattr($filename, "$key-2", ('x' x 3991)) || die "setfattr failed on $filename: $!"; setfattr($fh, "$key", $longval, { namespace => 'user' }) ! || die "setfattr failed on file descriptor ".$fh->fileno().": $!"; #set it --- 104,110 ---- #on my /var partition, and 920 is the biggest for my loopback partition. #What's up with that? ! #setfattr($filename, "$key-2", ('x' x 3991)) or die "setfattr failed on $filename: $!"; setfattr($fh, "$key", $longval, { namespace => 'user' }) ! or die "setfattr failed on file descriptor ".$fh->fileno().": $!"; #set it Index: 15create.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/15create.t,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 15create.t 5 Jul 2007 08:36:34 -0000 1.5 --- 15create.t 6 Apr 2008 09:12:48 -0000 1.6 *************** *** 10,13 **** --- 10,14 ---- use strict; use Test::More; + use Errno; BEGIN { *************** *** 21,25 **** plan skip_all => 'Tests unsupported on this OS/filesystem'; } else { ! plan tests => 15; } --- 22,26 ---- plan skip_all => 'Tests unsupported on this OS/filesystem'; } else { ! plan tests => 16; } *************** *** 32,36 **** my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 33,37 ---- my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. *************** *** 73,77 **** ########################## ! $fh = new IO::File("<$filename") || die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; --- 74,78 ---- ########################## ! $fh = new IO::File("<$filename") or die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; *************** *** 81,85 **** #create it again -- should fail ! is (setfattr($fh, "$key", $val, { create => 1 }), 0); #read it back --- 82,89 ---- #create it again -- should fail ! my $ret = setfattr($fh, "$key", $val, { create => 1 }); ! my $err = int $!; ! is ($ret, 0); ! is ($err, $!{EEXIST}); #read it back Index: 31nsmultiple.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/31nsmultiple.t,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** 31nsmultiple.t 5 Jul 2007 08:36:35 -0000 1.4 --- 31nsmultiple.t 6 Apr 2008 09:12:48 -0000 1.5 *************** *** 32,36 **** my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 32,36 ---- my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. *************** *** 62,66 **** #will die if xattr stuff doesn't work at all setfattr($_, "$key", $val, { namespace => 'user' }) ! || die "setfattr failed on filename $_: $!"; #set it --- 62,66 ---- #will die if xattr stuff doesn't work at all setfattr($_, "$key", $val, { namespace => 'user' }) ! or die "setfattr failed on filename $_: $!"; #set it *************** *** 106,110 **** ########################## ! $fh = new IO::File("<$filename") || die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; --- 106,110 ---- ########################## ! $fh = new IO::File("<$filename") or die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; *************** *** 114,118 **** #will die if xattr stuff doesn't work at all setfattr($fh, "$key", $val, { namespace => 'user' }) ! || die "setfattr failed on file descriptor ".$fh->fileno().": $!"; #set it --- 114,118 ---- #will die if xattr stuff doesn't work at all setfattr($fh, "$key", $val, { namespace => 'user' }) ! or die "setfattr failed on file descriptor ".$fh->fileno().": $!"; #set it Index: 30nsbasic.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/30nsbasic.t,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** 30nsbasic.t 5 Jul 2007 08:36:35 -0000 1.6 --- 30nsbasic.t 6 Apr 2008 09:12:48 -0000 1.7 *************** *** 32,36 **** my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 32,36 ---- my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. *************** *** 59,63 **** #will die if xattr stuff doesn't work at all setfattr($_, "$key", $val, { namespace => 'user' }) ! || die "setfattr failed on filename $_: $!"; #set it --- 59,63 ---- #will die if xattr stuff doesn't work at all setfattr($_, "$key", $val, { namespace => 'user' }) ! or die "setfattr failed on filename $_: $!"; #set it *************** *** 88,92 **** ########################## ! $fh = new IO::File("<$filename") || die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; --- 88,92 ---- ########################## ! $fh = new IO::File("<$filename") or die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; *************** *** 96,100 **** #will die if xattr stuff doesn't work at all setfattr($fh, "$key", $val, { namespace => 'user' }) ! || die "setfattr failed on file descriptor ".$fh->fileno().": $!"; #set it --- 96,100 ---- #will die if xattr stuff doesn't work at all setfattr($fh, "$key", $val, { namespace => 'user' }) ! or die "setfattr failed on file descriptor ".$fh->fileno().": $!"; #set it Index: 13long.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/13long.t,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** 13long.t 5 Jul 2007 08:36:34 -0000 1.7 --- 13long.t 6 Apr 2008 09:12:47 -0000 1.8 *************** *** 34,38 **** my $TESTDIR = ($ENV{ATTR_TEST_DIR} || '.'); my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 34,38 ---- my $TESTDIR = ($ENV{ATTR_TEST_DIR} || '.'); my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. *************** *** 61,66 **** #on my /var partition, and 920 is the biggest for my loopback partition. #What's up with that? ! #setfattr($_, "$key-2", ('x' x 3991)) || die "setfattr failed on $_: $!"; ! setfattr($_, "$key", $longval) || die "setfattr failed on $_: $!"; #set it --- 61,66 ---- #on my /var partition, and 920 is the biggest for my loopback partition. #What's up with that? ! #setfattr($_, "$key-2", ('x' x 3991)) or die "setfattr failed on $_: $!"; ! setfattr($_, "$key", $longval) or die "setfattr failed on $_: $!"; #set it *************** *** 94,98 **** ########################## ! $fh = new IO::File("<$filename") || die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; --- 94,98 ---- ########################## ! $fh = new IO::File("<$filename") or die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; *************** *** 103,109 **** #on my /var partition, and 920 is the biggest for my loopback partition. #What's up with that? ! #setfattr($filename, "$key-2", ('x' x 3991)) || die "setfattr failed on $filename: $!"; setfattr($fh, "$key", $longval) ! || die "setfattr failed on file descriptor ".$fh->fileno().": $!"; #set it --- 103,109 ---- #on my /var partition, and 920 is the biggest for my loopback partition. #What's up with that? ! #setfattr($filename, "$key-2", ('x' x 3991)) or die "setfattr failed on $filename: $!"; setfattr($fh, "$key", $longval) ! or die "setfattr failed on file descriptor ".$fh->fileno().": $!"; #set it Index: 20tie-basic.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/20tie-basic.t,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** 20tie-basic.t 5 Jul 2007 08:36:35 -0000 1.9 --- 20tie-basic.t 6 Apr 2008 09:12:48 -0000 1.10 *************** *** 25,29 **** my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 25,29 ---- my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. Index: 39nsempty.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/39nsempty.t,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** 39nsempty.t 5 Jul 2007 08:36:35 -0000 1.4 --- 39nsempty.t 6 Apr 2008 09:12:48 -0000 1.5 *************** *** 21,25 **** plan skip_all => 'Tests unsupported on this OS/filesystem'; } else { ! plan tests => 12; } --- 21,25 ---- plan skip_all => 'Tests unsupported on this OS/filesystem'; } else { ! plan tests => 18; } *************** *** 32,36 **** my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 32,36 ---- my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. *************** *** 54,60 **** #set it - should fail ! undef $@; ! eval { setfattr($_, "$key", $val, { namespace => '' }); }; ! isnt ($@, undef); #read it back - should be missing --- 54,61 ---- #set it - should fail ! my $ret = setfattr($_, "$key", $val, { namespace => '' }); ! my $err = int $!; ! is ($ret, 0); ! is ($err, $!{EOPNOTSUPP}); #read it back - should be missing *************** *** 62,66 **** #delete it - should fail ! is (delfattr($_, "$key", { namespace => '' }), 0); #check that it's gone --- 63,70 ---- #delete it - should fail ! $ret = delfattr($_, "$key", { namespace => '' }); ! $err = int $!; ! is ($ret, 0); ! is ($err, $!{EOPNOTSUPP}); #check that it's gone *************** *** 72,91 **** ########################## ! $fh = new IO::File("<$filename") || die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; ! undef $@; ! eval { setfattr($fh->fileno(), "$key", $val, { namespace => '' }); }; ! isnt ($@, undef); #read it back - should be missing ! is (getfattr($fh->fileno(), "$key", { namespace => '' }), undef); #delete it - should fail ! is (delfattr($fh->fileno(), "$key", { namespace => '' }), 0); #check that it's gone ! is (getfattr($fh->fileno(), "$key", { namespace => '' }), undef); END { --- 76,99 ---- ########################## ! $fh = new IO::File("<$filename") or die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; ! my $ret = setfattr($fh, "$key", $val, { namespace => '' }); ! my $err = int $!; ! is ($ret, 0); ! is ($err, $!{EOPNOTSUPP}); #read it back - should be missing ! is (getfattr($fh, "$key", { namespace => '' }), undef); #delete it - should fail ! $ret = delfattr($fh, "$key", { namespace => '' }); ! $err = int $!; ! is ($ret, 0); ! is ($err, $!{EOPNOTSUPP}); #check that it's gone ! is (getfattr($fh, "$key", { namespace => '' }), undef); END { Index: 22tie-nonuser.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/22tie-nonuser.t,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 22tie-nonuser.t 5 Jul 2007 08:36:35 -0000 1.5 --- 22tie-nonuser.t 6 Apr 2008 09:12:48 -0000 1.6 *************** *** 33,37 **** my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 33,37 ---- my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. Index: 11basic.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/11basic.t,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** 11basic.t 5 Jul 2007 08:36:34 -0000 1.7 --- 11basic.t 6 Apr 2008 09:12:47 -0000 1.8 *************** *** 32,36 **** my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 32,36 ---- my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. *************** *** 56,60 **** #will die if xattr stuff doesn't work at all ! setfattr($_, "$key", $val) || die "setfattr failed on filename $_: $!"; #set it --- 56,60 ---- #will die if xattr stuff doesn't work at all ! setfattr($_, "$key", $val) or die "setfattr failed on filename $_: $!"; #set it *************** *** 77,81 **** ########################## ! $fh = new IO::File("<$filename") || die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; --- 77,81 ---- ########################## ! $fh = new IO::File("<$filename") or die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; *************** *** 85,89 **** #will die if xattr stuff doesn't work at all setfattr($fh, "$key", $val) ! || die "setfattr failed on file descriptor ".$fh->fileno().": $!"; #set it --- 85,89 ---- #will die if xattr stuff doesn't work at all setfattr($fh, "$key", $val) ! or die "setfattr failed on file descriptor ".$fh->fileno().": $!"; #set it Index: 12empty.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/12empty.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 12empty.t 15 Dec 2007 09:28:12 -0000 1.1 --- 12empty.t 6 Apr 2008 09:12:47 -0000 1.2 *************** *** 32,36 **** my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 32,36 ---- my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. *************** *** 56,60 **** #will die if xattr stuff doesn't work at all ! setfattr($_, "$key", $val) || die "setfattr failed on filename $_: $!"; #set it --- 56,60 ---- #will die if xattr stuff doesn't work at all ! setfattr($_, "$key", $val) or die "setfattr failed on filename $_: $!"; #set it *************** *** 77,81 **** ########################## ! $fh = new IO::File("<$filename") || die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; --- 77,81 ---- ########################## ! $fh = new IO::File("<$filename") or die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; *************** *** 85,89 **** #will die if xattr stuff doesn't work at all setfattr($fh, "$key", $val) ! || die "setfattr failed on file descriptor ".$fh->fileno().": $!"; #set it --- 85,89 ---- #will die if xattr stuff doesn't work at all setfattr($fh, "$key", $val) ! or die "setfattr failed on file descriptor ".$fh->fileno().": $!"; #set it Index: 80memleakget.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/80memleakget.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 80memleakget.t 13 Aug 2007 12:04:35 -0000 1.2 --- 80memleakget.t 6 Apr 2008 09:12:48 -0000 1.3 *************** *** 32,36 **** my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 32,36 ---- my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. *************** *** 54,58 **** print "# using $_\n"; ! setfattr($_, $key, $val) || die "setfattr failed on filename $_: $!"; for (my $i = 0; $i < 1000; $i++) { --- 54,58 ---- print "# using $_\n"; ! setfattr($_, $key, $val) or die "setfattr failed on filename $_: $!"; for (my $i = 0; $i < 1000; $i++) { *************** *** 72,81 **** ########################## ! $fh = new IO::File("<$filename") || die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; setfattr($fh, $key, $val) ! || die "setfattr failed on file descriptor ".$fh->fileno().": $!"; for (my $i = 0; $i < 1000; $i++) { --- 72,81 ---- ########################## ! $fh = new IO::File("<$filename") or die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; setfattr($fh, $key, $val) ! or die "setfattr failed on file descriptor ".$fh->fileno().": $!"; for (my $i = 0; $i < 1000; $i++) { Index: 17createreplace.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/17createreplace.t,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 17createreplace.t 5 Jul 2007 08:36:34 -0000 1.5 --- 17createreplace.t 6 Apr 2008 09:12:48 -0000 1.6 *************** *** 32,36 **** my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 32,36 ---- my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. *************** *** 66,70 **** ########################## ! $fh = new IO::File("<$filename") || die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; --- 66,70 ---- ########################## ! $fh = new IO::File("<$filename") or die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; Index: 32nsnonuser.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/32nsnonuser.t,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** 32nsnonuser.t 5 Jul 2007 08:36:35 -0000 1.7 --- 32nsnonuser.t 6 Apr 2008 09:12:48 -0000 1.8 *************** *** 35,39 **** my $TESTDIR = ($ENV{ATTR_TEST_DIR} || '.'); my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 35,39 ---- my $TESTDIR = ($ENV{ATTR_TEST_DIR} || '.'); my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. Index: 18list.t =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/t/18list.t,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** 18list.t 5 Jul 2007 08:36:34 -0000 1.4 --- 18list.t 6 Apr 2008 09:12:48 -0000 1.5 *************** *** 14,18 **** plan skip_all => 'Tests unsupported on this OS/filesystem'; } else { ! plan tests => 183; } --- 14,18 ---- plan skip_all => 'Tests unsupported on this OS/filesystem'; } else { ! plan tests => 213; } *************** *** 25,29 **** my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh || die "can't close $filename $!"; # Create a directory. --- 25,29 ---- my ($fh, $filename) = tempfile( DIR => $TESTDIR ); ! close $fh or die "can't close $filename $!"; # Create a directory. *************** *** 53,57 **** # create it again -- should fail ! is (setfattr($_, $k, $vals{$k}, { create => 1 }), 0); # read it back --- 53,60 ---- # create it again -- should fail ! my $ret = setfattr($_, $k, $vals{$k}, { create => 1 }); ! my $err = int $!; ! is ($ret, 0); ! is ($err, $!{EEXIST}); # read it back *************** *** 81,85 **** ########################## ! $fh = new IO::File("<$filename") || die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; --- 84,88 ---- ########################## ! $fh = new IO::File("<$filename") or die "Unable to open $filename"; print "# using file descriptor ".$fh->fileno()."\n"; *************** *** 91,95 **** # create it again -- should fail ! is (setfattr($fh, $_, $vals{$_}, { create => 1 }), 0); # read it back --- 94,101 ---- # create it again -- should fail ! my $ret = setfattr($fh, $_, $vals{$_}, { create => 1 }); ! my $err = int $!; ! is ($ret, 0); ! is ($err, $!{EEXIST}); # read it back |