From 33a2605d2e5ba257f8842812aa1a3d347736a2ce Mon Sep 17 00:00:00 2001 From: Kirill Reshke Date: Tue, 18 Aug 2026 21:07:21 +0500 Subject: [PATCH 1/4] Test for yproxy multipart read --- test/regress/expected/20_multipart_small_chunk.txt | 3 +++ test/regress/tests/20_multipart_small_chunk.sh | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 test/regress/expected/20_multipart_small_chunk.txt create mode 100755 test/regress/tests/20_multipart_small_chunk.sh diff --git a/test/regress/expected/20_multipart_small_chunk.txt b/test/regress/expected/20_multipart_small_chunk.txt new file mode 100644 index 0000000..b284d94 --- /dev/null +++ b/test/regress/expected/20_multipart_small_chunk.txt @@ -0,0 +1,3 @@ +1 +Object: {Name: "/multipart_file", size: 30} +multipart chunk test data here diff --git a/test/regress/tests/20_multipart_small_chunk.sh b/test/regress/tests/20_multipart_small_chunk.sh new file mode 100755 index 0000000..d1cb199 --- /dev/null +++ b/test/regress/tests/20_multipart_small_chunk.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -ex + +# Force multipart upload with a tiny chunk size so 30 bytes split into multiple parts +printf 'multipart chunk test data here' | yp-client --config test/regress/conf/yproxy.yaml -l fatal put --multipart-chunk-size 8 'multipart_file' +yp-client --config test/regress/conf/yproxy.yaml -l fatal list '' +yp-client --config test/regress/conf/yproxy.yaml -l fatal cat 'multipart_file' From 9d4d01b3d894cc930da39c268d2f054dc81249d1 Mon Sep 17 00:00:00 2001 From: reshke Date: Tue, 18 Aug 2026 18:15:36 +0000 Subject: [PATCH 2/4] f --- .../regress/tests/20_multipart_small_chunk.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/test/regress/tests/20_multipart_small_chunk.sh b/test/regress/tests/20_multipart_small_chunk.sh index d1cb199..d7f2f77 100755 --- a/test/regress/tests/20_multipart_small_chunk.sh +++ b/test/regress/tests/20_multipart_small_chunk.sh @@ -1,7 +1,22 @@ #!/bin/bash set -ex + +# Multipart should be at least 5242880 bytes, so we generate 3 full +# part and one small tail +set +x +value=$(tr -dc 'A-Za-z0-9' < /dev/urandom | head -c $((5242880 * 3 + 67))) + # Force multipart upload with a tiny chunk size so 30 bytes split into multiple parts -printf 'multipart chunk test data here' | yp-client --config test/regress/conf/yproxy.yaml -l fatal put --multipart-chunk-size 8 'multipart_file' +printf $value | yp-client --config test/regress/conf/yproxy.yaml -l fatal put --multipart-chunk-size 5242880 'multipart_file' +value_cat=$(yp-client --config test/regress/conf/yproxy.yaml -l fatal cat 'multipart_file') + +set -x + yp-client --config test/regress/conf/yproxy.yaml -l fatal list '' -yp-client --config test/regress/conf/yproxy.yaml -l fatal cat 'multipart_file' + +set +x +[ $value -eq $value_cat ] || exit 1 +set -x + +echo ok From 89d39872b889e15b0d1926e980d798b7305634de Mon Sep 17 00:00:00 2001 From: reshke Date: Tue, 18 Aug 2026 18:27:17 +0000 Subject: [PATCH 3/4] f --- test/regress/expected/20_multipart_small_chunk.txt | 4 ++-- test/regress/tests/20_multipart_small_chunk.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/regress/expected/20_multipart_small_chunk.txt b/test/regress/expected/20_multipart_small_chunk.txt index b284d94..ff16d52 100644 --- a/test/regress/expected/20_multipart_small_chunk.txt +++ b/test/regress/expected/20_multipart_small_chunk.txt @@ -1,3 +1,3 @@ 1 -Object: {Name: "/multipart_file", size: 30} -multipart chunk test data here +Object: {Name: "/multipart_file", size: 15728707} +ok diff --git a/test/regress/tests/20_multipart_small_chunk.sh b/test/regress/tests/20_multipart_small_chunk.sh index d7f2f77..bb03935 100755 --- a/test/regress/tests/20_multipart_small_chunk.sh +++ b/test/regress/tests/20_multipart_small_chunk.sh @@ -16,7 +16,7 @@ set -x yp-client --config test/regress/conf/yproxy.yaml -l fatal list '' set +x -[ $value -eq $value_cat ] || exit 1 +[[ $value == $value_cat ]] || exit 1 set -x echo ok From 6566c4262b85486ecf6b17b34ed693c5ba4ba7ef Mon Sep 17 00:00:00 2001 From: reshke Date: Tue, 18 Aug 2026 23:32:18 +0500 Subject: [PATCH 4/4] Update expect.txt --- .github/actions/spelling/expect.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 56c04fe..53144ec 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -286,3 +286,4 @@ dmsg untrash untrashify roundtrip +urandom