-
Notifications
You must be signed in to change notification settings - Fork 60
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
Adding python test for net device #232
base: main
Are you sure you want to change the base?
Conversation
20a667a
to
61532c4
Compare
closes rust-vmm#224 Signed-off-by: Ramyak mehra <[email protected]>
version 16 has support for iproute2 package Signed-off-by: Ramyak Mehra <[email protected]>
61532c4
to
bc682fb
Compare
Signed-off-by: Ramyak mehra <[email protected]>
bc682fb
to
9698ee2
Compare
I wanted to get a review on this, I know this is an old PR, I will do a rebase and push the with latest commits once everything seems fine from the code perspective |
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.
Sorry for the late review.
# So we split the command at 63 bytes. 1 extra is reserved for \r at the end. | ||
# empty string is of size 33. sys.getsizeof(b'') = 33. |
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.
Hmmm, this is rather strange. Why would the empty string require 33 bytes? Do you know why that is the case?
|
||
vmm_process.stdin.write(cmd_i) | ||
vmm_process.stdin.flush() | ||
time.sleep(1) |
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.
Why do we need the sleep?
# booting the vmm. | ||
expect_string(vmm_process,prompt) | ||
|
||
add_addr_cmd = f"ip addr add {guest_ip_with_mask} dev eth0" |
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.
The name of the interface should also be sent as a parameter because it depends on the image with which you test.
|
||
# verifying that guest interface is setup properly | ||
output = run_cmd_inside_vm(show_interface_cmd.encode() , vmm_process ,prompt.encode() , timeout=10 ) | ||
output = b''.join(output).decode() |
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.
Why is this needed?
closes #224
Signed-off-by: Ramyak mehra [email protected]
Summary of the PR
This PR adds support for configuring a net device on the host and guest and verifying that net device works on the vm
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s
), and the commitmessage has max 60 characters for the summary and max 75 characters for each
description line.
test.
unsafe
code is properly documented.