Tests: Introduce conf_proc_count()
[lttng-tools.git] / tests / utils / utils.sh
index 35207929eca6afd63394c63a7f7d556c579f3489..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"
@@ -362,7 +372,7 @@ function start_lttng_sessiond_opt()
        if [ -z $(pgrep --full lt-$SESSIOND_BIN) ]; then
                # Have a load path ?
                if [ -n "$load_path" ]; then
-                       $DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --load "$1" --background --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd"
+                       $DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --load "$load_path" --background --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd"
                else
                        $DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --background --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd"
                fi
This page took 0.02407 seconds and 4 git commands to generate.