xiongxu / s3fs

Automatically exported from code.google.com/p/s3fs
GNU General Public License v2.0
0 stars 0 forks source link

r309 breaks "make check" #152

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
run "sudo make check" on r309 after building

echo HELLO WORLD to test-s3fs.txt
echo HELLO WORLD to test-s3fs.txt
echo HELLO WORLD to test-s3fs.txt
echo HELLO WORLD to test-s3fs.txt
echo HELLO WORLD to test-s3fs.txt
echo HELLO WORLD to test-s3fs.txt
echo HELLO WORLD to test-s3fs.txt
echo HELLO WORLD to test-s3fs.txt
echo HELLO WORLD to test-s3fs.txt
echo HELLO WORLD to test-s3fs.txt
echo HELLO WORLD to test-s3fs.txt
echo HELLO WORLD to test-s3fs.txt
echo HELLO WORLD to test-s3fs.txt
echo HELLO WORLD to test-s3fs.txt
echo HELLO WORLD to test-s3fs.txt
Verifying length of test file
error: expected 15 , got 0
FAIL: small-integration-test.sh
==================
1 of 1 test failed
==================

r308 passes make check, but r309 does not.  What-ever patch got applied wrt to 
issue #150 broke this.

Original issue reported on code.google.com by dmoore4...@gmail.com on 9 Feb 2011 at 5:26

GoogleCodeExporter commented 9 years ago
Great catch, I'd completely missed the test/ directory. I'll see what I can 
find this AM.

Original comment by ben.lema...@gmail.com on 9 Feb 2011 at 5:00

GoogleCodeExporter commented 9 years ago
feel free to add additional checks if you like ;)

Original comment by dmoore4...@gmail.com on 9 Feb 2011 at 5:37

GoogleCodeExporter commented 9 years ago
Oh yeah,  make check needs to be run as root and you need a bucket named 
"${LOGNAME}-s3fs-integration-test"

Original comment by dmoore4...@gmail.com on 9 Feb 2011 at 5:40

GoogleCodeExporter commented 9 years ago
Thanks, I'll see what I can do about some additional tests.

In the mean time, I think I've got a fix in place for r309. The attached patch 
should pass without any issues. I was a little hasty erasing map nodes from the 
stat cache.

`git init` and the stat() hang issues should also be taken care of :)

Original comment by ben.lema...@gmail.com on 9 Feb 2011 at 5:51

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Wow, I've really opened up a can of worms here. After this latest patch, I 
decided to add another test to 'make check', a method to rename/move a 
directory. It failed. Checking against 1.35, it failed again (original stat() 
hang bug). 

So looking further into the original issue I noticed that get_local_fd() is 
unable to determine whether a file is a directory or not, causing s3fs_rename() 
to turn a destination directory into a plain file. 

So here we are again! I've modified s3fs_rename() to utilize s3fs_getattr(), 
and added a new test in ~/test/small-integration-test.sh which will fail if 
we're unable to rename a directory.

Ignore the previous comment and apply this! We _should_ be good now ;)

Original comment by ben.lema...@gmail.com on 9 Feb 2011 at 9:44

Attachments:

GoogleCodeExporter commented 9 years ago
These patches are against 1.35 ? r306   ...right?

Original comment by dmoore4...@gmail.com on 9 Feb 2011 at 11:26

GoogleCodeExporter commented 9 years ago
r309 sorry about the confusion

Original comment by ben.lema...@gmail.com on 9 Feb 2011 at 11:29

GoogleCodeExporter commented 9 years ago
I first applied the patch to test/small-integration-test.sh against r308 and it 
passed. So r308 was good against the new "move directory" test.  No hang.

...more updates coming...

Original comment by dmoore4...@gmail.com on 10 Feb 2011 at 12:51

GoogleCodeExporter commented 9 years ago
svn update to r309,  as expected "make check" fails:

Verifying length of test file
error: expected 15 , got 0
FAIL: small-integration-test.sh
==================
1 of 1 test failed
==================

...more updates coming...

Original comment by dmoore4...@gmail.com on 10 Feb 2011 at 12:53

GoogleCodeExporter commented 9 years ago
Applied remainder of .diff to src/s3fs.cpp,  make check now passes:

All tests complete.
PASS: small-integration-test.sh
=============
1 test passed
=============

svn commit on its way...

...and it appears git init is working too:

%  git init
Initialized empty Git repository in /mnt/s3/misc.suncup.org/.git/

Original comment by dmoore4...@gmail.com on 10 Feb 2011 at 1:04

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r310.

Original comment by dmoore4...@gmail.com on 10 Feb 2011 at 1:07