Bug 5085 - smbtorture EATEST fails due to wrong case handling in torture
smbtorture EATEST fails due to wrong case handling in torture
Status: NEW
Product: Samba 3.0
Classification: Unclassified
Component: Client Tools
3.0.26a
All All
: P3 minor
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-15 07:32 UTC by Jens Nissen
Modified: 2007-11-27 10:10 UTC (History)
1 user (show)

See Also:


Attachments
STRACE of a smbtorture EATEST session (33.09 KB, text/plain)
2007-11-27 07:01 UTC, Jens Nissen
no flags Details
log on level 10 of a previous run o smbtorture EATEST (164.08 KB, text/plain)
2007-11-27 07:02 UTC, Jens Nissen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Nissen 2007-11-15 07:32:06 UTC
smbtorture's EATEST fails on case sensitive file systems such as EXT3 as it is creating extended attribute 'EA_0' and tries to delete attribute 'ea_0'
This is not allowed as the underlying file system may or may not handle extended attributes case insensitive. 
Suggested Bugfix (line 4548 ff of torture.c): 
Delete attribute with uppercase name "EA_"
----------------------------------------------------------------------
	/* Setting EA's to zero length deletes them. Test this */
	printf("Now deleting all EA's - case sensitive....\n");

#if 1
	cli_set_ea_path(cli, fname, "", "", 0);
#else
	for (i = 0; i < 20; i++) {
		fstring ea_name;
		slprintf(ea_name, sizeof(ea_name), "EA_%d", i);
		if (!cli_set_ea_path(cli, fname, ea_name, "", 0)) {
			printf("ea_set of name %s failed - %s\n", ea_name, cli_errstr(cli));
			talloc_destroy(mem_ctx);
			return False;
		}
	}
#endif
----------------------------------------------------------------------
Tested on 3.026a with extfs3 and posix acls
----------------------------------------------------------------------
Comment 1 Jens Nissen 2007-11-15 08:48:56 UTC
Must read of course 
#if 0
instead of 
#if 1
The code with transmitting a zero-length attribute name and value is not operational anyhow in Samba (see the vfs_posixacl code on this).
Comment 2 Volker Lendecke 2007-11-26 16:05:51 UTC
Just tested this with current git code: For me it works fine with ext3. Can you attach an strace of smbd while it fails to delete the EAs?

Volker
Comment 3 Jens Nissen 2007-11-27 07:01:51 UTC
Created attachment 3006 [details]
STRACE of a smbtorture EATEST session
Comment 4 Jens Nissen 2007-11-27 07:02:48 UTC
Created attachment 3007 [details]
log on level 10 of a previous run o smbtorture EATEST
Comment 5 Jens Nissen 2007-11-27 07:05:51 UTC
Note: Even though the STRACE might indicate a little-endian machine, it's not (I'm running an Intel XSCALE in big-endian mode).
This is the outpt of smbtorture by the way:

Running EATEST
starting eatest
num_eas = 20
0: ea_name = EA_0. Val = 1: ea_name = EA_1. Val = 2: ea_name = EA_2. Val = 3: ea_name = EA_3. Val = 4: ea_name = EA_4
. Val = 5: ea_name = EA_5. Val = 6: ea_name = EA_6. Val = 7: ea_name = EA_7. Val = 8: ea_name = EA_8. Val = 9: ea_nam
e = EA_9. Val = 10: ea_name = EA_10. Val = 11: ea_name = EA_11. Val = 12: ea_name = EA_12. Val = 13: ea_name = EA_13.
 Val = 14: ea_name = EA_14. Val = 15: ea_name = EA_15. Val = 16: ea_name = EA_16. Val = 17: ea_name = EA_17. Val = 18
: ea_name = EA_18. Val = 19: ea_name = EA_19. Val = Now deleting all EA's - case sensitive....
num_eas = 20
0: ea_name = EA_0. Val = 1: ea_name = EA_1. Val = 2: ea_name = EA_2. Val = 3: ea_name = EA_3. Val = 4: ea_name = EA_4
. Val = 5: ea_name = EA_5. Val = 6: ea_name = EA_6. Val = 7: ea_name = EA_7. Val = 8: ea_name = EA_8. Val = 9: ea_nam
e = EA_9. Val = 10: ea_name = EA_10. Val = 11: ea_name = EA_11. Val = 12: ea_name = EA_12. Val = 13: ea_name = EA_13.
 Val = 14: ea_name = EA_14. Val = 15: ea_name = EA_15. Val = 16: ea_name = EA_16. Val = 17: ea_name = EA_17. Val = 18
: ea_name = EA_18. Val = 19: ea_name = EA_19. Val = deleting EA's failed.
TEST EATEST FAILED!
EATEST took 1.35824 secs
Comment 6 Volker Lendecke 2007-11-27 10:10:00 UTC
Sorry, but the strace shows vm86old(0x9000e8) for all the xattr related syscalls, and these are the interesting ones here. So this trace is not useful I'm afraid.

Volker