firesim / FireMarshal

Software workload management tool for RISC-V based SoC research. This is the default workload management tool for Chipyard and FireSim.
https://docs.fires.im/en/latest/Advanced-Usage/Workloads/index.html
Other
76 stars 51 forks source link

Use FireSim sudo scripts if available #304

Closed abejgonzalez closed 5 months ago

abejgonzalez commented 5 months ago

Try to use FireSim's sudo scripts when available (instead of defaulting to guestmount or using cpio with sudo).

abejgonzalez commented 5 months ago

I'm unsure why the fed-smoke0 test doesn't work (it runs locally) and all other tests pass. This should be good to merge.

jerryz123 commented 5 months ago

Does the CI have the same sudo settings as your machine? I see:

2024-06-17T22:07:36.2258753Z 2024-06-17 15:05:55,794 [run         ] [DEBUG]  DEBUG: cp: cannot create regular file '/scratch/buildbot/firemarshal-ci-shared/firemarshal-a21bc92476b0e8375efbee3bdc86ee567e97de48/disk-mount/etc/shadow': Permission denied

This feels like a related failure

abejgonzalez commented 5 months ago

Copying to/from the mountpoint is now more complicated. Now it recursively chmod's all directories in the mountpoint s.t. it can safely copy in/out files (these chmod's are reverted afterwards to keep the same permissions on the directories). This works around an issue where marshal build's mount would leave a sub-dir in the mountpoint with incorrect permissions while running a separate subprocess.run(... mount ...) (virtually the same way FireMarshal does the mount) has the proper permissions on the sub-dir.