From 81cdb5da681f54433d3d8442bf9aca8cbbbee390 Mon Sep 17 00:00:00 2001 From: Albert Chu Date: Fri, 1 Nov 2024 12:04:03 -0700 Subject: [PATCH] fixup! t: cover flow control --- t/t0005-exec.t | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/t/t0005-exec.t b/t/t0005-exec.t index d59b5fd94c23..b9236e5f40b0 100755 --- a/t/t0005-exec.t +++ b/t/t0005-exec.t @@ -251,7 +251,7 @@ test_expect_success 'stdin redirect from /dev/null works with -n' ' ' test_expect_success 'create large file for tests' ' - dd if=/dev/urandom of=50Mfile bs=5M count=10 + dd if=/dev/urandom of=5Mfile bs=5M count=1 ' test_expect_success 'create test script to redirect stdin to a file' ' @@ -263,20 +263,20 @@ test_expect_success 'create test script to redirect stdin to a file' ' chmod +x stdin2file ' -# piping a 50M file using a 4K buffer should overflow if flow control +# piping a 5M file using a 4K buffer should overflow if flow control # is not functioning correctly test_expect_success 'stdin flow control works (1 rank)' ' - cat 50Mfile | flux exec -r 0 --setopt=stdin_BUFSIZE=4096 ./stdin2file && - cmp 50Mfile cpy.0 && + cat 5Mfile | flux exec -r 0 --setopt=stdin_BUFSIZE=4096 ./stdin2file && + cmp 5Mfile cpy.0 && rm cpy.0 ' test_expect_success 'stdin flow control works (all ranks)' ' - cat 50Mfile | flux exec -r 0-3 --setopt=stdin_BUFSIZE=4096 ./stdin2file && - cmp 50Mfile cpy.0 && - cmp 50Mfile cpy.1 && - cmp 50Mfile cpy.2 && - cmp 50Mfile cpy.3 && + cat 5Mfile | flux exec -r 0-3 --setopt=stdin_BUFSIZE=4096 ./stdin2file && + cmp 5Mfile cpy.0 && + cmp 5Mfile cpy.1 && + cmp 5Mfile cpy.2 && + cmp 5Mfile cpy.3 && rm cpy.* ' @@ -292,11 +292,11 @@ test_expect_success 'create test script to redirect stdin to a file, one rank ex ' test_expect_success 'stdin flow control works (all ranks, one rank will exit early)' ' - cat 50Mfile | flux exec -r 0-3 --setopt=stdin_BUFSIZE=4096 ./stdin2file && + cat 5Mfile | flux exec -r 0-3 --setopt=stdin_BUFSIZE=4096 ./stdin2file && test_must_fail ls cpy.0 && - cmp 50Mfile cpy.1 && - cmp 50Mfile cpy.2 && - cmp 50Mfile cpy.3 && + cmp 5Mfile cpy.1 && + cmp 5Mfile cpy.2 && + cmp 5Mfile cpy.3 && rm cpy.* '