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

test-tool: support low level PDU manipulation #297

Closed
ddiss opened this issue Sep 11, 2019 · 4 comments
Closed

test-tool: support low level PDU manipulation #297

ddiss opened this issue Sep 11, 2019 · 4 comments

Comments

@ddiss
Copy link
Contributor

ddiss commented Sep 11, 2019

I'm currently working on a SendTargets test and would like to be able to modify some low-level PDU attributes, such as data segment, ISCSI_PDU_TEXT_FINAL, etc.
This doesn't appear to be possible using existing helpers, so I think it'd make sense to split out scsi_allocate_pdu(), iscsi_pdu_set_pduflags(), etc. into something that can be easily consumed by iscsi-test-cu.

@sahlberg
Copy link
Owner

Sure, that sounds like a good idea. Do you have a patch?

@ddiss
Copy link
Contributor Author

ddiss commented Sep 11, 2019

Sure, that sounds like a good idea. Do you have a patch?

Not yet, was just checking whether it'd be an acceptable approach. I'll take that as a yes :)

@ddiss
Copy link
Contributor Author

ddiss commented Sep 17, 2019

I've pushed changes which add a libiscsipriv convenience library for the test-tool to https://github.com/ddiss/libiscsi/tree/libiscsipriv . These are based atop the existing #299 PR.
I'll do some further testing and submit.

ddiss added a commit to ddiss/libiscsi that referenced this issue Sep 17, 2019
Add a new libiscsipriv.la noinst convenience library, which can then be
used by test-tool for low-level PDU manipulation.

Link: sahlberg#297
Signed-off-by: David Disseldorp <ddiss@suse.de>
ddiss added a commit to ddiss/libiscsi that referenced this issue Sep 17, 2019
libiscsipriv.la exposes all symbols, so allows tests to perform low
level PDU manipulation, etc. without duplicating code.
As a trade-off, this results in a larger iscsi-test-cu, with libiscsi.so
linking removed.

Link: sahlberg#297
Signed-off-by: David Disseldorp <ddiss@suse.de>
@ddiss
Copy link
Contributor Author

ddiss commented Sep 18, 2019

Merged, closing...

@ddiss ddiss closed this as completed Sep 18, 2019
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

No branches or pull requests

2 participants