-
Notifications
You must be signed in to change notification settings - Fork 32
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
riscv64: Mount tmpfs
to support unit-tests expecting /tmp
#117
Conversation
3d0397d
to
e781f69
Compare
😵💫 Finally worked, going to flesh out this skeleton after dinner |
591b664
to
ea3a3b1
Compare
445b75f
to
a2f982b
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.
Please check the order of the patch. IMHO the first patch should be applied only when we have the new way to build the rootfs, otherwise we can break the bisectabiliy.
So you can move that patch after riscv64: Update container build workflow
, or just merge with it.
76184c4
to
ff8bcfa
Compare
Mh, shouldn't |
ff8bcfa
to
b1cf97e
Compare
I'm not sure about the cause of this issue :( I normally develop and test in an normally booted vm, i.e., the I tried to address that issue with in |
I found some random documentation about using a 9p rootfs with qemu (https://wiki.qemu.org/Documentation/9p_root_fs#Let's_start_the_Installation). It seems similar to enough to what we're doing. Maybe this section also applies to us:
Could you try explicitly mounting a tmpfs inside the qemu guest? |
Yes, I'll try it now |
It worked 🎉, by mounting the I just recollected I have tried something similar, I was mounting tmpfs from the outside, i.e. the container which prevents me from mounting 😵💫 I will repurpose this PR. Thanks to @roypat @stefano-garzarella :) |
b1cf97e
to
9397d6c
Compare
tmpfs
to support unit-tests expecting /tmp
As `9p` rootfs documented [1], mount a `tmpfs` onto `/tmp` could avoid `E: Unable to determine file size for fd 7 - fstat (2: No such file or directory)`. And various unittests in `linux-loader`, `vm-memory` and etc. explicitly expect `/tmp` to exist, and were failing on riscv because no `tmpfs` was mounted. Modify `/etc/fstab` to apply the mount operation during boot. [1] https://wiki.qemu.org/Documentation/9p_root_fs#Let's_start_the_Installation Signed-off-by: Ruoqing He <[email protected]>
Previous implementation uses `netcat` to test existence of pre-configured target port, but that port is occupied in advance of `sshd` inside VM is ready. Replace `netcat` with `ssh` with `ConnectTimeout` set to directly verify the connectivity of `sshd`. Signed-off-by: Ruoqing He <[email protected]>
9397d6c
to
22eafe4
Compare
This version [1] incorporates: - Support of running unit-tests of `linux-loader`, `vm-memory` and etc. by mounting `tmpfs` onto `/tmp` - Improvement on `sshd` inside QEMU VM connectivity test. [1] rust-vmm/rust-vmm-container#117 Signed-off-by: Ruoqing He <[email protected]>
This version [1] incorporates: - Support of running unit-tests of `linux-loader`, `vm-memory` and etc. by mounting `tmpfs` onto `/tmp` - Improvement on `sshd` inside QEMU VM connectivity test. [1] rust-vmm/rust-vmm-container#117 Signed-off-by: Ruoqing He <[email protected]>
Summary of the PR
9p
rootfs documented [1], mount atmpfs
onto/tmp
to avoidE: Unable to determine file size for fd 7 - fstat (2: No such file or directory)
.Modify
/etc/fstab
to apply the mount operation during boot.[1] https://wiki.qemu.org/Documentation/9p_root_fs#Let's_start_the_Installation
netcat
to test existence ofpre-configured target port, but that port is occupied in advance of
sshd
inside VM is ready.Replace
netcat
withssh
withConnectTimeout
set to directly verifythe connectivity of
sshd
.Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s
), and the commit message has max 60 characters for thesummary and max 75 characters for each description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafe
code is properly documented.