X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fregression%2Fust%2Fblocking%2Ftest_blocking;h=10c07a7e7644e1cf2cc5b3276d2d9174aa543852;hb=7bc12babbde0510e051f68b201c30d78c11b3b56;hp=f6c465d6e1d345097391b35f86c58c915757b670;hpb=087beb4af5384fd841de8c939b65d80e98d4d1dd;p=lttng-tools.git diff --git a/tests/regression/ust/blocking/test_blocking b/tests/regression/ust/blocking/test_blocking index f6c465d6e..10c07a7e7 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"