X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Futils%2Futils.sh;h=da23f7abeb1780191b86e41a0a88219fd32eeb56;hp=42b344138d9f176ef2fcb39e37fbec9acc2e994b;hb=9e136324e6ac723dd66fcec57d90843ab16eaedf;hpb=891d74dd9877e2e025943d5d3911c42b81234011 diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 42b344138..da23f7abe 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"