X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Futils%2Futils.sh;h=0817e65bbd90dd344b05d14f9d2baaaa8b1e9212;hb=f664a99613e1ef4acfa680318c203e8a9fadd3aa;hp=35207929eca6afd63394c63a7f7d556c579f3489;hpb=53a14ff2aa1807502913b404e99fff81e1a32098;p=lttng-tools.git diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 35207929e..0817e65bb 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -86,6 +86,16 @@ function randstring() echo } +# Return the number of _configured_ CPUs. +function conf_proc_count() +{ + getconf _NPROCESSORS_CONF + if [ $? -ne 0 ]; then + diag "Failed to get the number of configured CPUs" + fi + echo +} + function enable_kernel_lttng_event { local expected_to_fail="$1"