From 5f48b0faf62b3fe0c2b142f485952400c18d7f31 Mon Sep 17 00:00:00 2001 From: Blaise Dias Date: Tue, 29 Oct 2024 10:54:16 +0000 Subject: [PATCH 1/2] chore: tools: e2e_fio: support FS file size in Mib Add support to specify files size on FS in MiB Signed-off-by: Blaise Dias --- tools/e2e-fio/build.sh | 2 +- tools/e2e-fio/e2e_fio.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/e2e-fio/build.sh b/tools/e2e-fio/build.sh index e8a7473..97ab7c2 100755 --- a/tools/e2e-fio/build.sh +++ b/tools/e2e-fio/build.sh @@ -11,7 +11,7 @@ # existing semantics. set -e IMAGE="openebs/e2e-fio" -TAG="v3.37-e2e-0" +TAG="v3.37-e2e-1" registry="" tag_as_latest="" diff --git a/tools/e2e-fio/e2e_fio.c b/tools/e2e-fio/e2e_fio.c index 1722cc1..cfb5c28 100644 --- a/tools/e2e-fio/e2e_fio.c +++ b/tools/e2e-fio/e2e_fio.c @@ -86,11 +86,12 @@ enum { * position of string in the array should match symbol position in enum */ const char* filesize_keywords[] = { - "availblockspercent", "availblockslessby", "bytes"}; + "availblockspercent", "availblockslessby", "bytes", "MiB"}; enum { BLOCKS_PERCENT, BLOCKS_LESSBY, SIZE_BYTES, + SIZE_MIBIBYTES, }; /* struct for linked list of child processes */ @@ -341,6 +342,11 @@ int do_makefile(const char **argv, int count) { use_blocks = (val + fs_stat.f_bsize - 1) / fs_stat.f_bsize; use_bytes = val; break; + case SIZE_MIBIBYTES: + val = val * (1024 * 1024); + use_blocks = (val + fs_stat.f_bsize - 1) / fs_stat.f_bsize; + use_bytes = val; + break; } printf("fs: %s, file: %s blocks: %ld bytes: %ld\n", fspath, fsfile, use_blocks, use_bytes); printf("creat %s\n", fsfile); @@ -911,11 +917,9 @@ int main(int argc, const char **argv) perror("unlink failed"); } eff = eff->next; - printf("#### 1 %p %p %s\n", files_list, eff, files_list->filename); free(files_list->filename); free(files_list); files_list = eff; - printf("#### 1 %p %p\n", eff, files_list); } } printf("Exit value is %d\n", exitv); From d71e374e1c743bdd80804fa32d1502ec0dc82e08 Mon Sep 17 00:00:00 2001 From: Blaise Dias Date: Tue, 29 Oct 2024 11:11:49 +0000 Subject: [PATCH 2/2] fix: update alpine to 3.38-r0 Build fails when using 3.37-r0, upgrade to 3.38-r0 Signed-off-by: Blaise Dias --- tools/e2e-fio/Dockerfile | 2 +- tools/e2e-fio/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/e2e-fio/Dockerfile b/tools/e2e-fio/Dockerfile index 0f6dabd..dd08c85 100644 --- a/tools/e2e-fio/Dockerfile +++ b/tools/e2e-fio/Dockerfile @@ -4,7 +4,7 @@ FROM alpine:edge MAINTAINER openebs openebs@openebs.io RUN apk --no-cache add \ - fio=3.37-r0 gcc musl-dev + fio=3.38-r0 gcc musl-dev ADD e2e_fio.c / ADD liveness.c / diff --git a/tools/e2e-fio/build.sh b/tools/e2e-fio/build.sh index 97ab7c2..2a89d1b 100755 --- a/tools/e2e-fio/build.sh +++ b/tools/e2e-fio/build.sh @@ -11,7 +11,7 @@ # existing semantics. set -e IMAGE="openebs/e2e-fio" -TAG="v3.37-e2e-1" +TAG="v3.38-e2e-0" registry="" tag_as_latest=""