Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smashbox tests running against master+encryption #15781

Closed
20 tasks done
nickvergessen opened this issue Apr 21, 2015 · 26 comments
Closed
20 tasks done

Smashbox tests running against master+encryption #15781

nickvergessen opened this issue Apr 21, 2015 · 26 comments

Comments

@nickvergessen
Copy link
Contributor

@nickvergessen nickvergessen added this to the 8.1-current milestone Apr 21, 2015
@oparoz
Copy link
Contributor

oparoz commented Apr 21, 2015

Those share bugs could come from the read-only cache bug fixed in #15721

@DeepDiver1975
Copy link
Member

#15721

was just merged - @nickvergessen please rebase and fire up the tests again please.

@oparoz THX for the hint - let's see ...

@nickvergessen
Copy link
Contributor Author

Nop, still failing, but it might be a problem on my (old) mashine, because they seem to fail on master without encryption aswell

@oparoz
Copy link
Contributor

oparoz commented Apr 21, 2015

:(

@nickvergessen
Copy link
Contributor Author

The tests fail, because the mount point for the shared file ends with a trailing slash.
Summoning @PVince81

@PVince81
Copy link
Contributor

Could be a regression due to this addition by myself: #15570
It would add a trailing slash to file shares too... but now removing the fix wouldn't work too because some places in the code call setMountPoint() with a missing trailing slash. Maybe the fix is to fix the caller instead (which isn't ideal) but also need to take care of the file share cases...

@PVince81
Copy link
Contributor

Hmmm no, this is not caused by the PR I mentioned. I ran test_shareDir.py and test_shareFile.py in much older versions in git, and I saw that:

  • test_shareDir.py already failed before that version (without -a)
  • test_shareFile.py works (without -a)

@jnfrmarks did test_shareDir.py ever pass before ?

@nickvergessen when running the tests don't forget to add -a to make sure it runs all test cases. It seems that there are more fails with it... (maybe they aren't finished)

I'll bisect the potential regression.

@PVince81
Copy link
Contributor

The fail for the test_shareFile.py appears since 6a59502 (#12006) from @icewind1991
Maybe we failed to update the etag of shared files or some hooks do not get fired.

@PVince81
Copy link
Contributor

I have raised this separately as I was able to reproduce something: #15786

@jnfrmarks
Copy link

I thought I fixed shareDir - it's a test issue - "shareeTwo" was creating the directory and sync'ing the same directory - causing two directories to be created locally.

@nickvergessen
Copy link
Contributor Author

@PVince81 yes it works reliable on stable8.
The line in the code that I found out is returning wrong stuff (empty string for a given path) is https://github.com/owncloud/core/pull/12006/files#diff-2e4a54e72d495abc750a9bc445da15a0R115
So that is why it is failing since then.

@MorrisJobke
Copy link
Contributor

@nickvergessen Can you retest shareFile.py? #15786 #15787 was merged.

@nickvergessen
Copy link
Contributor Author

Still fails with

2015-04-23 10:54:07,312 - ERROR - sharer -
md5 of modified file /home/nickv/ownCloud/Smashbox/tmpdir/test_shareFile/sharer/TEST_FILE_MODIFIED_USER_SHARE.dat did not change: expected 45b565af28a2998fa8d5dae7eb6e660e, got 45b565af28a2998fa8d5dae7eb6e660e
"md5 of modified file %s did not change: expected %s, got %s" % (fn, md5, actual_md5)) failed in expect_modified() ["/home/nickv/ownCloud/Smashbox/smashbox/python/smashbox/utilities/__init__.py" at line 670]

@DeepDiver1975
Copy link
Member

@jnfrmarks @nickvergessen @PVince81 can you please digg into this and find out what's going wrong here? THX

@PVince81
Copy link
Contributor

@nickvergessen does this test fail without encryption too ? Is it specific ? It could also be etag propagation issue.

@PVince81
Copy link
Contributor

Let's make it clearer, regression-wise for test_shareFile.py:

So this failing is not related to encryption.
But there's another regression somewhere, I'll bisect this.

@DeepDiver1975
Copy link
Member

But there's another regression somewhere, I'll bisect this.

thx

@PVince81
Copy link
Contributor

Wait, it's still 6a59502
The merged PR was not for the fix (#15781 (comment) was a misunderstanding).
The issue is still #15786

@PVince81
Copy link
Contributor

WebDAV PUT fails when putting a shared file, so obviously the file didn't change and smashbox says the md5 didn't change either.

@nickvergessen
Copy link
Contributor Author

Without Encryption

Test Status
test_scrapeLogFile.py
-
test_reshareDir.py
-
test_shareDir.py ❌ ERROR - shareeTwo - File .../tmpdir/test_shareDir/shareeTwo/localShareDir exists but should not error_check(not os.path.exists(fn), "File %s exists but should not" % fn) failed in expect_does_not_exist() [.../smashbox/python/smashbox/utilities/__init__.py at line 690]
worked before
test_shareFile.py ❌ ERROR - sharer - md5 of modified file .../tmpdir/test_shareFile/sharer/TEST_FILE_MODIFIED_USER_SHARE.dat did not change: expected 45b565af28a2998fa8d5dae7eb6e660e, got 45b565af28a2998fa8d5dae7eb6e660e "md5 of modified file %s did not change: expected %s, got %s" % (fn, md5, actual_md5)) failed in expect_modified() [.../smashbox/python/smashbox/utilities/__init__.py at line 670]
worked before, reported at #15786, PR at #16159
test_shareGroup.py ❌ ERROR - shareeTwo - File .../tmpdir/test_shareGroup/shareeTwo/TEST_FILE_GROUP_SHARE.dat should exist error_check(os.path.exists(sharedFile), "File %s should exist" %sharedFile) failed in shareeTwo() [.../smashbox/lib/oc-tests/test_shareGroup.py at line 213]
known to be broken
test_sharePermissions.py ❌ CRITICAL - recipient_worker - Exception occured: HTTP error: 404 -- Traceback (most recent call last): File python/smashbox/multiprocessing_engine.py, line 161, in worker_wrap -- f(step) -- File .../smashbox/lib/oc-tests/test_sharePermissions.py, line 233, in recipient_worker -- error_check(oc.file_info(SHARED_DIR_NAME) is not None, 'Recipient did not receive the shared folder')
known to be broken
test_uploadFiles.py
-

With Encryption

Test Status
test_scrapeLogFile.py
-
test_reshareDir.py ❌ ERROR - shareeTwo - File .../tmpdir/test_reshareDir/shareeTwo/TEST_FILE_USER_RESHARE.dat should exist error_check(os.path.exists(sharedFile), "File %s should exist" %sharedFile) failed in shareeTwo() [.../smashbox/lib/oc-tests/test_reshareDir.py at line 140]
works without encryption
test_shareDir.py ❌ ERROR - shareeOne - /home/nickv/ownCloud/Smashbox/tmpdir/test_shareDir/shareeOne/localShareDir/TEST_FILE_MODIFIED_USER_SHARE.dat does not exist -- ERROR - sharer - md5 of modified file .../tmpdir/test_shareDir/sharer/localShareDir/TEST_FILE_MODIFIED_USER_SHARE.dat did not change: expected 45b565af28a2998fa8d5dae7eb6e660e, got 45b565af28a2998fa8d5dae7eb6e660e "md5 of modified file %s did not change: expected %s, got %s" % (fn, md5, actual_md5)) failed in expect_modified() [.../smashbox/python/smashbox/utilities/__init__.py at line 670]
fails earlier then without encryption
test_shareFile.py ❌ ERROR - shareeOne - File .../tmpdir/test_shareFile/shareeOne/TEST_FILE_USER_SHARE.dat should exist error_check(os.path.exists(sharedFile), "File %s should exist" %sharedFile) failed in shareeOne() [.../smashbox/lib/oc-tests/test_shareFile.py at line 162] -- ERROR - sharer - md5 of modified file .../tmpdir/test_shareFile/sharer/TEST_FILE_MODIFIED_USER_SHARE.dat did not change: expected 45b565af28a2998fa8d5dae7eb6e660e, got 45b565af28a2998fa8d5dae7eb6e660e "md5 of modified file %s did not change: expected %s, got %s" % (fn, md5, actual_md5)) failed in expect_modified() [.../smashbox/python/smashbox/utilities/__init__.py at line 670]
fails earlier then without encryption
test_shareGroup.py
known to be broken
test_sharePermissions.py
known to be broken
test_uploadFiles.py ❌ ERROR - sharer02 - File .../tmpdir/test_uploadFiles/sharer02/localShareDir/TEST_FILE_NEW_USER_SHARE_1.dat should exist error_check(os.path.exists(sharedFile), "File %s should exist" %sharedFile) failed in checkFilesExist() [.../smashbox/lib/oc-tests/test_uploadFiles.py at line 213]
works without encryption

So the difference is: test_reshareDir and test_uploadFiles fail, while test_shareDir and test_shareFile fail earlier.
Not sure how much will be resolved by the fix for #15786 and we are still waiting for @icewind1991 to have a look at that.

@nickvergessen
Copy link
Contributor Author

owncloud/smashbox#70 fixes the encryption specific fails of smashbox.
Once we log in the users after creating them, the keys get generated, so sharing etc don't fail anymore.

New encryption result is then:

Test Status
test_scrapeLogFile.py
test_reshareDir.py
test_shareDir.py ❌ same as without
test_shareFile.py ❌ same as without
✅ with #16159
test_shareGroup.py ❌ same as without
test_sharePermissions.py ❌ same as without
test_uploadFiles.py

@nickvergessen
Copy link
Contributor Author

owncloud/smashbox#72 fixes shareDir.py (without and with encryption)
owncloud/smashbox#73 fixes shareGroup.py (without and with encryption)
owncloud/smashbox#74 fixes sharePermissions.py (without encryption)

@nickvergessen
Copy link
Contributor Author

We are now back to green without encryption

@DeepDiver1975
Copy link
Member

so i guess we can close this now - thx @nickvergessen for taking care

@PVince81
Copy link
Contributor

@nickvergessen did you run them always with -a ? Else it will only run the first test suite see cernbox/smashbox#12)

@nickvergessen
Copy link
Contributor Author

No, I run each test case individually owncloud/smashbox#88 (because I get problems otherwise with the rundir not being empty in the beginning, fixed by owncloud/smashbox#78 )

@lock lock bot locked as resolved and limited conversation to collaborators Aug 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants