Adding python test for net device#232
Open
ramyak-mehra wants to merge 3 commits intorust-vmm:mainfrom
Open
Conversation
20a667a to
61532c4
Compare
closes rust-vmm#224 Signed-off-by: Ramyak mehra <rmehra_be19@thapar.edu>
version 16 has support for iproute2 package Signed-off-by: Ramyak Mehra <ramyak_mehra@thapar.edu>
61532c4 to
bc682fb
Compare
Signed-off-by: Ramyak mehra <rmehra_be19@thapar.edu>
bc682fb to
9698ee2
Compare
Contributor
Author
|
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 |
Member
andreeaflorescu
left a comment
There was a problem hiding this comment.
Sorry for the late review.
Comment on lines
+232
to
+233
| # 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. |
Member
There was a problem hiding this comment.
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) |
Member
There was a problem hiding this comment.
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" |
Member
There was a problem hiding this comment.
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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #224
Signed-off-by: Ramyak mehra rmehra_be19@thapar.edu
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.
unsafecode is properly documented.