Bug 8578 - Some tests are failling if <samba_source> or <samba_source>/st are mounted on tmpfs
Summary: Some tests are failling if <samba_source> or <samba_source>/st are mounted on...
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: smbtorture (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: samba4-qa@samba.org
Depends on:
Reported: 2011-11-05 11:38 UTC by Matthieu Patou
Modified: 2011-11-05 23:26 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Patou 2011-11-05 11:38:00 UTC
On a workstation where <samba_source> is mounted on a tmpfs I have this error:
failure: readdir [
Failed for rmdir - 39 = Directory not empty

in samba4.local.replace
and in
samba4.raw.search with 
Testing OS/2 style delete on 700 files
error: samba4.raw.search.deleted 352 - expected to delete 700 [
_StringException: _StringException: No reason specified

time: 2011-11-05 12:34:43.933537Z
error: samba4.raw.search.os2 delete [
_StringException: _StringException: Unknown error/failure


If it's only <samba_source>/st that is mounted on tmpfs volume then it's just samba4.raw.search that is having problem.

This is due to the fact that samba4.local.replace create the temporary dir in <samba_source> rather than in <samba_source>/st.

To reproduce:

make test TESTS=samba4.raw.search
cd st; ../bin/smbtorture //localhost local.replace

I'm pretty sure that the problem boils down to the os2_delete function that behave strangely in a tmpfs volume.
Comment 1 Stefan Metzmacher 2011-11-05 13:13:39 UTC
This is know, if you want to use non disk storage try to create a
large file in /dev/shm/ and format it as ext4 and loop mount it.
Comment 2 Andrew Bartlett 2011-11-05 21:50:09 UTC
As I recall, this is considered to be a kernel bug, due to the way readdir works on tmpfs.  Implementing OS/2 compatible directory listing (with deletes during that list) is dependent on very, very specific readdir semantics.
Comment 3 Matthieu Patou 2011-11-05 23:26:20 UTC
The answer of metze is quite satisfying, I think we should eventually fix the script/devel/tmpfs to use a block of shm backed by a loop device.