Tests: Introduce conf_proc_count()
[lttng-tools.git] / tests / utils / utils.sh
index 42b344138d9f176ef2fcb39e37fbec9acc2e994b..da23f7abeb1780191b86e41a0a88219fd32eeb56 100644 (file)
@@ -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"
This page took 0.022897 seconds and 4 git commands to generate.