-
Notifications
You must be signed in to change notification settings - Fork 58
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
umockdev-record not capturing USB mass storage ioctl calls #251
Comments
Right, umockdev doesn't do mass storage. That's too complicated to emulate, you are better off with using |
I've spent several hours trying to achieve this with umockdev. Based on your response, it seems like updating the documentation to explicitly mention that mass storage devices are not currently supported would be helpful for future users. |
I see, loop device could be used...Yes, I don't need to mount the devices for my integration/unit tests. But right now I'm unsure, how to achieve this with loop devices. Am I right, that I need to create an image file, format it for example with ext4 and map it onto a loop device to get the filesystem information (label, model serial no.) for example with the "blkid" library? |
What is the easiest solution probably depends a lot on what you need. One could:
Those are just a few ideas, I am sure there are other possible solutions. What makes sense for you likely depends a lot on what exactly you need to test. |
Description:
I am trying to use
umockdev-record
to capture the behavior of my application that interacts with a USB mass storage device. My trivial application, namedget_usb_stick_info
, uses theioctl
system call with theSG_IO
command to retrieve information from the device.The application code is provided below:
However, when I record the interaction using the following command:
The generated file
usb_stick.ioctl
file only contains the line@dev /dev/sda
.It seems that
umockdev-record
is not capturing the actual ioctl system calls being made by my application.Expected Behavior:
The
usb_stick.ioctl
file should contain the details of the ioctl system call. This would allow me to replay the interaction with the USB device in a mock environment.System Information:
The text was updated successfully, but these errors were encountered: