[#59825] VirtIO: Make VirtIOFS scripts easier to interact
diff --git a/tests/peripherals/VirtIO.robot b/tests/peripherals/VirtIO.robot
index 01f369b..d11d827 100644
--- a/tests/peripherals/VirtIO.robot
+++ b/tests/peripherals/VirtIO.robot
@@ -11,10 +11,11 @@
 ${SCRIPT_FS}                    ${CURDIR}/../../tests/peripherals/virtio-vexriscv.resc
 ${INPUT}                        Quick Brown Fox Jumps Over the Lazy Dog
 ${PROMPT}                       #
-${SOCK_FILE}                    ${CURDIR}/fs.sock
+${SOCK_FILE}                    libfuse-passthrough-hp.sock
+${SOCK_PATH}                    ${TEMPDIR}${/}${SOCK_FILE}
 ${SHARED_FILE}                  testfile
 ${SHARED_DIR}                   shareddir
-${VIRTIOFS_TAG}                 "tag0"
+${VIRTIOFS_TAG}                 "MySharedDir"
 ${SYSTEM}=                      Evaluate         platform.system()    modules=platform
 
 *** Keywords ***
@@ -25,7 +26,6 @@
     ${DIR}  ${FILE_NAME}=       Split Path       ${TEMP_DRIVE}
     Copy File                   ${TEMP_DRIVE}    ${TEMPDIR}
     Set Suite Variable          ${DRIVE_PATH}    ${TEMPDIR}${/}${FILE_NAME}
-    Set Suite Variable          ${SOCK_PATH}     ${SOCK_FILE}
     ${TEMP_FS}=                 Download File    ${FS}
     ${DIR}  ${FILE_NAME}=       Split Path       ${TEMP_FS}
     Copy File                   ${TEMP_FS}       ${TEMPDIR}
@@ -48,9 +48,9 @@
     Execute Command             $dtb=@https://dl.antmicro.com/projects/renode/virtio-filesystem-rv32.dtb-s_1806-b2ad3ecaf517c6a6781d1cbb48eff6fca7972094
     Execute Command             $osbi=@https://dl.antmicro.com/projects/renode/litex_vexriscv_smp--opensbi.bin-s_45360-dcfe5f7b149bd1e0232609d87fb698f95f5e33c4
     Execute Command             $rootfs=@https://dl.antmicro.com/projects/renode/virtio-filesystem-rootfs.cpio-s_39962112-95a3591d189699f21b988b036a9843c882d8e42f
+    Execute Command             $sock_path=@${SOCK_PATH}
+    Execute Command             $virtiofs_tag=${VIRTIOFS_TAG}
     Execute Script              ${SCRIPT_FS}
-    Execute Command             machine LoadPlatformDescriptionFromString 'virtiofs: Storage.VirtIOFSDevice @ sysbus 0x100d0000 { IRQ -> plic@2 }'
-    Execute Command             virtiofs Create @${SOCK_PATH} ${VIRTIOFS_TAG}
 
 Setup Machine VirtIOBlock
     Wait For Prompt On Uart     buildroot login:
diff --git a/tests/peripherals/virtio-platform.repl b/tests/peripherals/virtio-platform.repl
index dbfb6ab..611dfa1 100644
--- a/tests/peripherals/virtio-platform.repl
+++ b/tests/peripherals/virtio-platform.repl
@@ -39,3 +39,5 @@
     init add:
         SilenceRange <4026544128 0x200> # ddrphy
         SilenceRange <4026546176 0x200> # sdram
+
+virtiofs: Storage.VirtIOFSDevice @ sysbus 0x100d0000 {IRQ -> plic@2}
diff --git a/tests/peripherals/virtio-vexriscv.resc b/tests/peripherals/virtio-vexriscv.resc
index f61d720..674de52 100644
--- a/tests/peripherals/virtio-vexriscv.resc
+++ b/tests/peripherals/virtio-vexriscv.resc
@@ -1,10 +1,17 @@
 using sysbus
 mach create
 
+$platform?=@tests/peripherals/virtio-platform.repl
+
 machine LoadPlatformDescription $platform
 
 showAnalyzer uart0
 
+$img?=@https://dl.antmicro.com/projects/renode/virtio-filesystem-image-s_8448188-414604e8f64c41ebdbffe0f9ae7525c20bb1b124
+$dtb?=@https://dl.antmicro.com/projects/renode/virtio-filesystem-rv32.dtb-s_1806-b2ad3ecaf517c6a6781d1cbb48eff6fca7972094
+$osbi?=@https://dl.antmicro.com/projects/renode/litex_vexriscv_smp--opensbi.bin-s_45360-dcfe5f7b149bd1e0232609d87fb698f95f5e33c4
+$rootfs?=@https://dl.antmicro.com/projects/renode/virtio-filesystem-rootfs.cpio-s_39962112-95a3591d189699f21b988b036a9843c882d8e42f
+
 sysbus LoadBinary $img 0x40000000
 sysbus LoadBinary $dtb 0x40ef0000
 sysbus LoadBinary $osbi 0x40f00000
@@ -12,4 +19,8 @@
 
 cpu PC 0x40f00000
 
+$sock_path?=@/tmp/libfuse-passthrough-hp.sock
+$virtiofs_tag?="MySharedDir"
+
 machine StartGdbServer 3333
+virtiofs Create $sock_path $virtiofs_tag