Tests: Introduce conf_proc_count()
[lttng-tools.git] / tests / utils / utils.sh
index 35207929eca6afd63394c63a7f7d556c579f3489..0817e65bbd90dd344b05d14f9d2baaaa8b1e9212 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.024026 seconds and 4 git commands to generate.