X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Fregression%2Fust%2Fblocking%2Ftest_blocking;h=9fdde5b4fc379e7c56b10445dd75982a18fc6f76;hb=9ecc3a7b9a935e2c06e550f724fb8c67950711d1;hp=fcf1ad94d016445c58b273772469f963976f1728;hpb=a51eef24d40920e7e0f492290cf089ef634ac00f;p=lttng-tools.git diff --git a/tests/regression/ust/blocking/test_blocking b/tests/regression/ust/blocking/test_blocking index fcf1ad94d..9fdde5b4f 100755 --- a/tests/regression/ust/blocking/test_blocking +++ b/tests/regression/ust/blocking/test_blocking @@ -30,6 +30,19 @@ function run_app() ok $? "Application done" } +function check_disk_space() +{ + local path + + path="${1:?}" + kb_free=$(df -k -P "${path}" | tail -n 1 | awk '{ print $4 }') + if [ "${kb_free}" -lt "1048576" ] ; then + return 1 + fi + + return 0 +} + function test_ust_implicit_no_blocking() { NUM_EVENT=5000000 @@ -134,6 +147,10 @@ plan_tests $NUM_TESTS print_test_banner "$TEST_DESC" +if ! check_disk_space "${TMPDIR:-/tmp}"; then + BAIL_OUT "Not enough free space to run blocking tests" +fi + TESTS=( "test_ust_implicit_no_blocking" "test_ust_implicit_no_blocking_with_channel_blocking"