Commit d47b0d2d authored by Tomasz Zawadzki's avatar Tomasz Zawadzki
Browse files

test/scheduler: remove unnecessary assignments of thread names



The "threadX_name" variables are not used anywhere except
creating the thread. Instead use the names directly.

Signed-off-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6bdb2eb1d1e96fe888a4d5d9765fc0b0dfa74272
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8794


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarMichal Berger <michalx.berger@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent 66a5b406
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -23,10 +23,8 @@ busy() {

	fold_list_onto_array selected_cpus "${cpus[@]:1:2}"

	thread0_name=thread0
	thread0=$(create_thread -n "$thread0_name" -m "$(mask_cpus "${selected_cpus[@]}")" -a 100)
	thread1_name=thread1
	thread1=$(create_thread -n "$thread1_name" -m "$(mask_cpus "${selected_cpus[@]}")" -a 100)
	thread0=$(create_thread -n "thread0" -m "$(mask_cpus "${selected_cpus[@]}")" -a 100)
	thread1=$(create_thread -n "thread1" -m "$(mask_cpus "${selected_cpus[@]}")" -a 100)

	local samples=0

@@ -94,8 +92,7 @@ balanced() {
	# Exclude main cpu
	fold_list_onto_array selected_cpus "${cpus[@]:1}"

	thread0_name=thread0
	thread0=$(create_thread -n "$thread0_name" -m "$(mask_cpus "${selected_cpus[@]}")" -a 0)
	thread0=$(create_thread -n "thread0" -m "$(mask_cpus "${selected_cpus[@]}")" -a 0)
	for cpu in "${selected_cpus[@]::${#selected_cpus[@]}-1}"; do
		extra_threads+=("$(create_thread -n "thread_cpu_$cpu" -m "$(mask_cpus "$cpu")" -a 100)")
	done