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

smbtorture: Add Shadow Copy related tests #82

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Shwetha-Acharya
Copy link
Collaborator

No description provided.

@Shwetha-Acharya
Copy link
Collaborator Author

/retest all

@Shwetha-Acharya Shwetha-Acharya force-pushed the shadow-copy branch 3 times, most recently from caa7f90 to 2ba557d Compare August 6, 2024 16:04
@Shwetha-Acharya Shwetha-Acharya marked this pull request as draft August 7, 2024 02:08
@Shwetha-Acharya Shwetha-Acharya force-pushed the shadow-copy branch 2 times, most recently from 2b51132 to 2e8117a Compare August 7, 2024 06:30
Copy link
Collaborator

@obnoxxx obnoxxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, @Shwetha-Acharya !

I have a few questions inline in the patch. Additionally, on a higher level, I am not quite clear if the patch actually does what the title states: The title says that the patch adds shadow-copy related tests, but the patch seems to deal mostly with ioctl and sparse-file tests.

Please explain!

@@ -10,3 +10,6 @@

#https://github.com/gluster/samba-integration/issues/241
^samba3.smb2.deny.*

# Strictly checking ioctl tests against cephFS only
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does dropping a comment in the flapping.glusterfs file restrict these test to run against cephfs?

Copy link
Collaborator Author

@Shwetha-Acharya Shwetha-Acharya Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@obnoxxx idea here was to add these tests flapping(sometimes fails or sometimes passes) under all other filesystems other than cephFS. As of now I am trying to check this test strictly for cephFS, that is why it is not added under flapping.cephfs

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough.Makes sense!

@@ -5,3 +5,6 @@
# Ignore due to lack of proper multichannel setup.
^samba3.smb2.session.bind2
^samba3.smb2.session.two_logoff

# Strictly checking ioctl tests against cephFS only
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question as before: how does a comment to flapping.gpfs restrict tests to cephfs?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Shwetha-Acharya , please also investigate failed ci checks!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question as before: how does a comment to flapping.gpfs restrict tests to cephfs?

Same answer as above

@Shwetha-Acharya
Copy link
Collaborator Author

Thanks for the PR, @Shwetha-Acharya !

I have a few questions inline in the patch. Additionally, on a higher level, I am not quite clear if the patch actually does what the title states: The title says that the patch adds shadow-copy related tests, but the patch seems to deal mostly with ioctl and sparse-file tests.

Please explain!

Hi @obnoxxx Thanks for the review. Basically ioctl.c contains many ioctl and sparse file related tests as you have rightly pointed out but it also includes tests like https://github.com/samba-team/samba/blob/master/source4/torture/smb2/ioctl.c#L42

I thought it would be better to include all tests in ioctl.c in our test suite as they might be utilized while accessing/querying the snapshots. And sparse files can be snapshotted as well.

Their grouping together in smbtorture inside ioctl.c also lead me to similar speculations.

However, I am learning about the sparse files and ioctl through this PR itself. If you have any suggestions regarding the same, please let me know.

@obnoxxx
Copy link
Collaborator

obnoxxx commented Aug 16, 2024

Thanks for the PR, @Shwetha-Acharya !
I have a few questions inline in the patch. Additionally, on a higher level, I am not quite clear if the patch actually does what the title states: The title says that the patch adds shadow-copy related tests, but the patch seems to deal mostly with ioctl and sparse-file tests.
Please explain!

Hi @obnoxxx Thanks for the review. Basically ioctl.c contains many ioctl and sparse file related tests as you have rightly pointed out but it also includes tests like https://github.com/samba-team/samba/blob/master/source4/torture/smb2/ioctl.c#L42

I thought it would be better to include all tests in ioctl.c in our test suite as they might be utilized while accessing/querying the snapshots. And sparse files can be snapshotted as well.

Right, but this is more of a coincidence and the real link between ioctl tests and shadow copies is that the shadow copy operations are implemented in SMB2 as ioctl calls. So the ioctl test suite also contains shadow copy tests.

However, I am learning about the sparse files and ioctl through this PR itself.

That sounds like the perfect opportunity!

If you have any suggestions regarding the same, please let me know.

Meanwhile I reviewed the changes enough to be convinced that the PR will be ready to be moved out of draft status once the CI checks are passing more.

So please try and fix the CI failures is the only real request at this time.

@Shwetha-Acharya Shwetha-Acharya marked this pull request as ready for review August 19, 2024 05:56
@Shwetha-Acharya
Copy link
Collaborator Author

/retest all

1 similar comment
@obnoxxx
Copy link
Collaborator

obnoxxx commented Aug 21, 2024

/retest all

Copy link
Collaborator

@obnoxxx obnoxxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another thought:

Instead of filling just knownfail and flapping with tests, we could consider using the skip list that samba's selftest understands to really prevent tests from being executed at all.

Adding this mechanism would be a separate PR though that this one should be based on.

@Shwetha-Acharya
Copy link
Collaborator Author

Another thought:

Instead of filling just knownfail and flapping with tests, we could consider using the skip list that samba's selftest understands to really prevent tests from being execured at all.

Adding this mechanism would be a separate PR though that this one should be based on.

sure! that sounds like a good plan

@anoopcs9
Copy link
Collaborator

Another thought:

Instead of filling just knownfail and flapping with tests, we could consider using the skip list that samba's selftest understands to really prevent tests from being execured at all.

IIRC, we introduced dedicated flapping list for each backend in order to keep the selftest subdirectory, which is largely a clone from upstream samba sources, intact. We occasionally rebase/sync the contents from upstream to keep us updated.

Adding this mechanism would be a separate PR though that this one should be based on.

Having said that I am not sure why we didn't sync the skip list from upstream.

@spuiuk Any further thoughts?

@obnoxxx
Copy link
Collaborator

obnoxxx commented Aug 22, 2024

Another thought:
Instead of filling just knownfail and flapping with tests, we could consider using the skip list that samba's selftest understands to really prevent tests from being executed at all.

IIRC, we introduced dedicated flapping list for each backend in order to keep the selftest subdirectory, which is largely a clone from upstream samba sources, intact.

ok. I was somehow expecting that we copy the corresponding backend specific list(s) into the selftestdirectory *omitting the backend suffix) when executing selftest against that backend to control execution an expected results this way. If this is not the case, we might want to rethink our approach here :)

We occasionally rebase/sync the contents from upstream to keep us updated.

good but also good to keep our special variants separate.

Adding this mechanism would be a separate PR though that this one should be based on.

Having said that I am not sure why we didn't sync the skip list from upstream.

We might not need to figure out the why, but I think we should add a skip mechanism and configure it in a backend-specific way like the others.

If we agree on that, we could raise a separate issue for this feature.

@spuiuk Any further thoughts?

@spuiuk
Copy link
Collaborator

spuiuk commented Aug 22, 2024

We don't use the skip list because we don't use the test.py file which is called by "make tests" to generate a list of tests to be run. We instead list out the testsuites we want to run.

To work around these problems, I would instead of adding the entire smb2.ioctl test suite, simply add tests which I would like to run.

@spuiuk
Copy link
Collaborator

spuiuk commented Aug 22, 2024

Another thought:

Instead of filling just knownfail and flapping with tests, we could consider using the skip list that samba's selftest understands to really prevent tests from being executed at all.

Adding this mechanism would be a separate PR though that this one should be based on.

We do not have a skip list since we do not copy over the entire selftest directory and use only those parts which we need from the selftest directory. The skip list are used by make test to generate a list of tests to run. We took the easy approach which simply involved listing the tests we want to run.

This smbtorture test suite was built to run against the a single filesystem - glusterfs. When we added newer filesystems, we discovered that we had some tests which passed against one filesystem but failed against another. We needed to investigate these failures but wanted to see passing tests - so we add the failed tests to the issue tracker to investigate later and add the failing tests to the filesystem specific flapping list.

We have never encountered a uxsuccess until now. So the easiest workaround is to add the remaining tests we want to check for but avoid listing the tests which do a uxsuccess for now.

@Shwetha-Acharya
Copy link
Collaborator Author

Shwetha-Acharya commented Aug 22, 2024

Another thought:
Instead of filling just knownfail and flapping with tests, we could consider using the skip list that samba's selftest understands to really prevent tests from being executed at all.
Adding this mechanism would be a separate PR though that this one should be based on.

We do not have a skip list since we do not copy over the entire selftest directory and use only those parts which we need from the selftest directory. The skip list are used by make test to generate a list of tests to run. We took the easy approach which simply involved listing the tests we want to run.

This smbtorture test suite was built to run against the a single filesystem - glusterfs. When we added newer filesystems, we discovered that we had some tests which passed against one filesystem but failed against another. We needed to investigate these failures but wanted to see passing tests - so we add the failed tests to the issue tracker to investigate later and add the failing tests to the filesystem specific flapping list.

We have never encountered a uxsuccess until now. So the easiest workaround is to add the remaining tests we want to check for but avoid listing the tests which do a uxsuccess for now.

That is fair. But, tracking all these failures becomes a task considering existence of various file systems and different combinations of failures when we only add the tests we want to run.

@spuiuk
Copy link
Collaborator

spuiuk commented Aug 22, 2024

That is fair. But, tracking all these failures becomes a task considering existence of various file systems and different combinations of failures when we only add the tests we want to run.

The adding of the failing tests to the flapping lists is expected to be temporary while we investigate the failures and fix them.

@spuiuk
Copy link
Collaborator

spuiuk commented Aug 22, 2024

uxsuccess failures are reported when the test passes but is listed in the knownfail and expected failure lists.

knownfail.d/sparse_files:^samba3.smb2.ioctl.sparse_punch
knownfail.d/sparse_files:^samba3.smb2.ioctl.sparse_qar_ob1
knownfail.d/sparse_files:^samba3.smb2.ioctl.copy-chunk streams

causes the following failure reported.

uxsuccess: samba3.smb2.ioctl.sparse_punch_invalid

@Shwetha-Acharya Shwetha-Acharya force-pushed the shadow-copy branch 2 times, most recently from 5904166 to 96bfde8 Compare August 23, 2024 09:45
@Shwetha-Acharya
Copy link
Collaborator Author

/retest all

1 similar comment
@Shwetha-Acharya
Copy link
Collaborator Author

/retest all

@Shwetha-Acharya
Copy link
Collaborator Author

Shwetha-Acharya commented Sep 9, 2024

Current Status:

xfs:

All tests in xfs pass including the ioctl tests:
testcases/smbtorture/test_smbtorture.py::test_smbtorture[share-xfs-default-smb2.ioctl] PASSED [ 21%]

cephfs:

Here also there is one unrelated failure related smb2.charset.
Respective ioctl failures of kclient are already added as flapping under cephfs
However many other ioctl copy-chunk related tests are failing for cephfs-vfs and cephfs-vfs.new

test_smbtorture[share-cephfs-default-vfs-smb2.charset] – FAILED
test_smbtorture[share-cephfs-default-kclient-smb2.ioctl] – FAILED
test_smbtorture[share-cephfs-default-vfs-smb2.ioctl] – FAILED
test_smbtorture[share-cephfs-default-vfs.new-smb2.ioctl] – FAILED

gpfs:

ioctl tests passed:
testcases/smbtorture/test_smbtorture.py::test_smbtorture[share-gpfs-default-vfs-smb2.ioctl] PASSED [ 81%]

But there are other unrelated failures:
test_smbtorture[share-gpfs-default-kclient-smb2.timestamps] – FAILED
test_smbtorture[share-gpfs-default-kclient-smb2.session] – FAILED
test_smbtorture[share-gpfs-default-vfs-smb2.timestamps] – FAILED
test_smbtorture[share-gpfs-default-kclient-smb2.create] – FAILED
test_smbtorture[share-gpfs-default-vfs-smb2.session] – FAILED
test_smbtorture[share-gpfs-default-vfs-smb2.durable-open-disconnect] – FAILED
test_smbtorture[share-gpfs-default-vfs-smb2.lock] – FAILED
test_containers[192.168.123.20-share-gpfs-default-vfs-ltp] – FAILED

@anoopcs9
Copy link
Collaborator

cephfs:

Here also there is one unrelated failure related smb2.charset.

We already have an issue(#91) reported.

Respective ioctl failures of kclient are already added as flapping under cephfs However many other ioctl copy-chunk related tests are failing for cephfs-vfs and cephfs-vfs.new

test_smbtorture[share-cephfs-default-vfs-smb2.charset] – FAILED
test_smbtorture[share-cephfs-default-kclient-smb2.ioctl] – FAILED

This is a failure on kclient.

test_smbtorture[share-cephfs-default-vfs-smb2.ioctl] – FAILED
test_smbtorture[share-cephfs-default-vfs.new-smb2.ioctl] – FAILED

As we can see smb2.ioctl test suite still has some issues with CephFS(in any mode).

- Some of the sparse file related tests are expected to fail due
  to limitations in CephFS, mark the same
- Make sure that ioctl tests are expected to strictly pass against
  CephFS and CephFS.vfs only.

Signed-off-by: Shwetha K Acharya <[email protected]>
@Shwetha-Acharya
Copy link
Collaborator Author

Shwetha-Acharya commented Sep 10, 2024

cephfs:

Here also there is one unrelated failure related smb2.charset.

We already have an issue(#91) reported.

Respective ioctl failures of kclient are already added as flapping under cephfs However many other ioctl copy-chunk related tests are failing for cephfs-vfs and cephfs-vfs.new
test_smbtorture[share-cephfs-default-vfs-smb2.charset] – FAILED
test_smbtorture[share-cephfs-default-kclient-smb2.ioctl] – FAILED

This is a failure on kclient.

test_smbtorture[share-cephfs-default-vfs-smb2.ioctl] – FAILED
test_smbtorture[share-cephfs-default-vfs.new-smb2.ioctl] – FAILED

As we can see smb2.ioctl test suite still has some issues with CephFS(in any mode).

yes correct, with kclient, copy chunk streams test is failing.
While on vfs and vfs.new almost 15 copy chunk related tests are failing. Have opened a new issue to track the same: #93

NOTE: We have already have found that there is some limitation in cephfs with sparse files and have already added them under flapping list.

For now, I am adding all copy-chunk related tests under flapping list as well. We need to figure out why these failures are not found in kclient but are found only on vfs ceph @anoopcs9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants