From 65957e024dbd6f538e9af516b0022398ac887fad Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 18 Jun 2024 14:29:34 +0200 Subject: [PATCH] Transfer 2x16 MiB in wg_fetchurl test --- repos/dde_linux/run/wg_fetchurl.run | 40 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/repos/dde_linux/run/wg_fetchurl.run b/repos/dde_linux/run/wg_fetchurl.run index 69c95c5130..4bb94699e5 100644 --- a/repos/dde_linux/run/wg_fetchurl.run +++ b/repos/dde_linux/run/wg_fetchurl.run @@ -21,11 +21,7 @@ if {[have_spec linux]} { set not_linux 1 } -# -# Note that in the not_linux case, the file size is rounded -# down to a multiple of 100. -# -set file_size_in_bytes 1000000 +set file_size_in_bytes [expr 16*1024*1024] create_boot_directory @@ -36,6 +32,7 @@ import_from_depot [depot_user]/src/libc \ [depot_user]/src/posix \ [depot_user]/src/vfs \ [depot_user]/src/vfs_lwip \ + [depot_user]/src/vfs_pipe \ [depot_user]/src/zlib \ [depot_user]/pkg/wireguard @@ -71,6 +68,7 @@ append config { + @@ -100,7 +98,7 @@ append config { - + @@ -111,6 +109,7 @@ append config { + } append_if $linux config { @@ -125,8 +124,9 @@ append config { - + + @@ -142,7 +142,7 @@ append config { - + @@ -218,7 +218,7 @@ append config { - + @@ -332,15 +332,9 @@ append_if $linux config { } -if {$not_linux} { +append_if $not_linux config { - append config {} - for {set i 0} {$i < $file_size_in_bytes} {incr i 64} { - - # append 100 bytes of "0" - append config {0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000} - } - append config {} + } append config { @@ -373,8 +367,8 @@ append targets { core init timer lib/ld server/nic_router server/report_rom lib/curl app/fetchurl } +set boot_modules { } if $linux { - append targets { server/lx_fs } # create the lx_fs root of fetchurl where it will store the downloaded file @@ -385,17 +379,21 @@ if $linux { # create the lx_fs root of lighttpd and the downloadable file inside it exec rm -rf [lx_fs_root]/lighttpd_fs exec mkdir -p [lx_fs_root]/lighttpd_fs - exec head -c $file_size_in_bytes /dev/zero > [lx_fs_root]/lighttpd_fs/index.html + copy_file bin/wg_fetchurl.data [lx_fs_root]/lighttpd_fs/index.html +} else { + append boot_modules { wg_fetchurl.data } } build $targets -build_boot_image [build_artifacts] +exec head -c $file_size_in_bytes < /dev/urandom > bin/wg_fetchurl.data + +build_boot_image [list {*}[build_artifacts] {*}$boot_modules] append qemu_args "-nographic " # run the scenario till fetchurl succeeded to download the file -run_genode_until "fetchurl. exited with exit value 0.*\n" 60 +run_genode_until "fetchurl. exited with exit value 0.*\n" 90 if {$linux} {