-
Notifications
You must be signed in to change notification settings - Fork 6k
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
src/test: add libcephfs tests for async(nonblocking) calls #54435
base: main
Are you sure you want to change the base?
Conversation
c0ef42b
to
2e7f65f
Compare
cb22b10
to
cc60032
Compare
b1aac0e
to
be7ab35
Compare
3e2898a
to
d429557
Compare
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
d429557
to
ba7868c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
hey venky, the testcases in 55f5cb6 aren't making use of the helpers that in f5f0f3c because the helpers were introduced after i wrote those test cases and this thing went unnoticed. I'll have to change this and I think this should be the final change (I promise :P). EDIT: please see #54435 (comment) |
this is temp, will be removed once ceph#54435 is merged Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit f5f0f3c)
this is temp, will be removed once ceph#54435 is merged Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit f5f0f3c)
this is just a cleanup and doesn't impact the code in any other way, since you've already reviewed it and we have a cleanup tracker waiting already for nonblocking test cases, i think i can do this cleanup in that tracker itself. So I think this is good to go for testing. |
This is a dependency for a call in the test case but exists in ceph#54435. This commit will be removed once that PR is merged. Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
This PR is under test in https://tracker.ceph.com/issues/67020. |
- workunit: | ||
clients: | ||
client.0: | ||
- client/test_full.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dparmar18 What mode is test_full.sh
created with? I ask since this fails with:
File "/home/teuthworker/src/git.ceph.com_ceph-c_5f7f38f6943da1b8f6e6fe9aed0202920c629e98/qa/tasks/workunit.py", line 388, in _run_tests
raise RuntimeError('Spec did not match any workunits: {spec!r}'.format(spec=spec))
RuntimeError: Spec did not match any workunits: 'client/test_full.sh'
See: /a/vshankar-2024-08-01_09:58:56-fs-wip-vshankar-testing-20240801.064407-debug-testing-default-smithi/7829964
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Oh lord) Fixed it now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL at the failure.
542ae49
to
1b844d4
Compare
fixed |
@@ -611,3 +612,499 @@ TEST_F(TestClient, LlreadvLlwritevInvalidFileHandle) { | |||
ASSERT_EQ(bytes_read, -CEPHFS_EBADF); | |||
ASSERT_EQ(bl.length(), 0); | |||
} | |||
|
|||
TEST_F(TestClient, LlreadvLlwritevOverlimit) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/a/vshankar-2024-08-01_09:58:56-fs-wip-vshankar-testing-20240801.064407-debug-testing-default-smithi/7829908
I see the following crash
INFO:tasks.workunit.client.0.smithi142.stderr: -1> 2024-08-02T07:09:20.600+0000 7f987f000640 20 client.4689 put_inode on 0x1.head(faked_ino=0 nref=9 ll_ref=2 cap_refs={} open={} mode=40755 size=0/0 nlink=1 btime=2024-08-02T07:08:01.737249+0000 mtime=2024-08-02T07:09:20.594231+0000 ctime=2024-08-02T07:09:20.594231+0000 change_attr=18 caps=pAsLsXs(0=pAsLsXs) has_dir_layout 0x7f986000c330) n = 1
2024-08-02T07:09:20.717 INFO:tasks.workunit.client.0.smithi142.stderr: 0> 2024-08-02T07:09:20.601+0000 7f988880c480 -1 *** Caught signal (Aborted) **
2024-08-02T07:09:20.717 INFO:tasks.workunit.client.0.smithi142.stderr: in thread 7f988880c480 thread_name:ceph_test_clien
2024-08-02T07:09:20.717 INFO:tasks.workunit.client.0.smithi142.stderr:
2024-08-02T07:09:20.717 INFO:tasks.workunit.client.0.smithi142.stderr: ceph version 19.0.0-5453-g5f7f38f6 (5f7f38f6943da1b8f6e6fe9aed0202920c629e98) squid (dev)
2024-08-02T07:09:20.717 INFO:tasks.workunit.client.0.smithi142.stderr: 1: /lib64/libc.so.6(+0x3e6f0) [0x7f988863e6f0]
2024-08-02T07:09:20.717 INFO:tasks.workunit.client.0.smithi142.stderr: 2: /lib64/libc.so.6(+0x8b94c) [0x7f988868b94c]
2024-08-02T07:09:20.717 INFO:tasks.workunit.client.0.smithi142.stderr: 3: raise()
2024-08-02T07:09:20.718 INFO:tasks.workunit.client.0.smithi142.stderr: 4: abort()
2024-08-02T07:09:20.718 INFO:tasks.workunit.client.0.smithi142.stderr: 5: /lib64/libc.so.6(+0x29130) [0x7f9888629130]
2024-08-02T07:09:20.718 INFO:tasks.workunit.client.0.smithi142.stderr: 6: /lib64/libc.so.6(+0x11d77b) [0x7f988871d77b]
2024-08-02T07:09:20.718 INFO:tasks.workunit.client.0.smithi142.stderr: 7: /lib64/libc.so.6(+0x11c0e6) [0x7f988871c0e6]
2024-08-02T07:09:20.718 INFO:tasks.workunit.client.0.smithi142.stderr: 8: __strcat_chk()
2024-08-02T07:09:20.718 INFO:tasks.workunit.client.0.smithi142.stderr: 9: (TestClient_LlreadvLlwritevOverlimit_Test::TestBody()+0x2c4) [0x55e475d8bd5c]
2024-08-02T07:09:20.718 INFO:tasks.workunit.client.0.smithi142.stderr: 10: ceph_test_client(+0x1fee96) [0x55e475ec2e96]
2024-08-02T07:09:20.718 INFO:tasks.workunit.client.0.smithi142.stderr: 11: ceph_test_client(+0x204b8c) [0x55e475ec8b8c]
2024-08-02T07:09:20.718 INFO:tasks.workunit.client.0.smithi142.stderr: 12: (testing::Test::Run()+0xb8) [0x55e475ea60a2]
2024-08-02T07:09:20.718 INFO:tasks.workunit.client.0.smithi142.stderr: 13: (testing::TestInfo::Run()+0x108) [0x55e475ea61ac]
2024-08-02T07:09:20.718 INFO:tasks.workunit.client.0.smithi142.stderr: 14: (testing::TestSuite::Run()+0xb6) [0x55e475ea6264]
2024-08-02T07:09:20.718 INFO:tasks.workunit.client.0.smithi142.stderr: 15: (testing::internal::UnitTestImpl::RunAllTests()+0x2dd) [0x55e475eb8be5]
2024-08-02T07:09:20.718 INFO:tasks.workunit.client.0.smithi142.stderr: 16: ceph_test_client(+0x1feef6) [0x55e475ec2ef6]
2024-08-02T07:09:20.719 INFO:tasks.workunit.client.0.smithi142.stderr: 17: ceph_test_client(+0x205026) [0x55e475ec9026]
2024-08-02T07:09:20.719 INFO:tasks.workunit.client.0.smithi142.stderr: 18: (testing::UnitTest::Run()+0x95) [0x55e475eb48a3]
2024-08-02T07:09:20.719 INFO:tasks.workunit.client.0.smithi142.stderr: 19: main()
2024-08-02T07:09:20.719 INFO:tasks.workunit.client.0.smithi142.stderr: 20: /lib64/libc.so.6(+0x29590) [0x7f9888629590]
2024-08-02T07:09:20.719 INFO:tasks.workunit.client.0.smithi142.stderr: 21: __libc_start_main()
2024-08-02T07:09:20.719 INFO:tasks.workunit.client.0.smithi142.stderr: 22: _start()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's complaining about string concatenation, should be this line strcat(out_str, num);
in TEST_F(TestClient, LlreadvLlwritevOverlimit)
.
As per https://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/libc---strcat-chk-1.html: __strcat_chk() shall check for buffer overflow before computing a result. If an overflow is anticipated, the function shall abort and the program calling it shall exit.
Looks like there was buffer overflow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1b844d4
to
7c42357
Compare
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
This is a dependency for a call in the test case but exists in ceph#54435. This commit will be removed once that PR is merged. Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
Fixes: https://tracker.ceph.com/issues/63104 Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
Fixes: https://tracker.ceph.com/issues/63104 Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
This requires a new suite, cannot be run with other async i/o test cases therefore apart from adding the test case, add a binary, a shell script to run it and a YAML file to pick it up in teuthology. Fixes: https://tracker.ceph.com/issues/63104 Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
7c42357
to
fbff10a
Compare
@vshankar PTAL, fixed the conflicts |
this is temp, will be removed once ceph#54435 is merged Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit f5f0f3c)
add async i/o test cases
Fixes: https://tracker.ceph.com/issues/63104
Signed-off-by: Dhairya Parmar dparmar@redhat.com
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
x
between the brackets:[x]
. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox
jenkins test windows
jenkins test rook e2e