Commit cf090c6c authored by Karol Latecki's avatar Karol Latecki Committed by Ben Walker
Browse files

scripts: replace backticsk with dollar-parenthesis syntax



Scripts were using a mix of two approaches, lets unify that so
just dollar-parenthesis syntax is used.

Also update two scripts from spdk/test which we previously missed.

Change-Id: I429f9bc158076462b419fae597f716c329f9b7aa
Signed-off-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460344


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent dd414873
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ timing_exit "$make_timing_label"

# Check for generated files that are not listed in .gitignore
timing_enter generated_files_check
if [ `git status --porcelain --ignore-submodules | wc -l` -ne 0 ]; then
if [ $(git status --porcelain --ignore-submodules | wc -l) -ne 0 ]; then
	echo "Generated files missing from .gitignore:"
	git status --porcelain --ignore-submodules
	exit 1
@@ -112,11 +112,11 @@ timing_exit generated_files_check
#  capturing a binary's stat data before and after touching a
#  header file and re-making.
timing_enter dependency_check
STAT1=`stat examples/nvme/identify/identify`
STAT1=$(stat examples/nvme/identify/identify)
sleep 1
touch lib/nvme/nvme_internal.h
$MAKE $MAKEFLAGS
STAT2=`stat examples/nvme/identify/identify`
STAT2=$(stat examples/nvme/identify/identify)

if [ "$STAT1" == "$STAT2" ]; then
	echo "Header dependency check failed"
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ cd $rootdir
timing_enter porcelain_check
$MAKE clean

if [ `git status --porcelain --ignore-submodules | wc -l` -ne 0 ]; then
if [ $(git status --porcelain --ignore-submodules | wc -l) -ne 0 ]; then
	echo make clean left the following files:
	git status --porcelain --ignore-submodules
	exit 1
+3 −3
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ cp $ceph_conf /etc/ceph/ceph.conf

cp ${base_dir}/keyring /etc/ceph/keyring

ceph-run sh -c "ulimit -n 16384 && ulimit -c unlimited && exec ceph-mon -c ${ceph_conf} -i a --keyring=${base_dir}/keyring --pid-file=${base_dir}/pid/root@`hostname`.pid --mon-data=${mon_dir}" || true
ceph-run sh -c "ulimit -n 16384 && ulimit -c unlimited && exec ceph-mon -c ${ceph_conf} -i a --keyring=${base_dir}/keyring --pid-file=${base_dir}/pid/root@$(hostname).pid --mon-data=${mon_dir}" || true

# create osd

@@ -88,10 +88,10 @@ i=0

mkdir -p ${mnt_dir}

uuid=`uuidgen`
uuid=$(uuidgen)
ceph -c ${ceph_conf} osd create ${uuid} $i
ceph-osd -c ${ceph_conf} -i $i --mkfs --mkkey --osd-uuid ${uuid}
ceph -c ${ceph_conf} osd crush add osd.${i} 1.0 host=`hostname` root=default
ceph -c ${ceph_conf} osd crush add osd.${i} 1.0 host=$(hostname) root=default
ceph -c ${ceph_conf} -i ${mnt_dir}/osd-device-${i}-data/keyring auth add osd.${i} osd "allow *" mon "allow profile osd" mgr "allow"

# start osd
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ bdfs=()
# then most likely PCI_WHITELIST option was used for setup.sh
# and we do not want to use that disk.
for bdf in $(iter_pci_class_code 01 08 02); do
	driver=`grep DRIVER /sys/bus/pci/devices/$bdf/uevent | awk -F"=" '{print $2}'`
	driver=$(grep DRIVER /sys/bus/pci/devices/$bdf/uevent | awk -F"=" '{print $2}')
	if [ "$driver" != "nvme" ]; then
		bdfs+=("$bdf")
	fi
+2 −2
Original line number Diff line number Diff line
@@ -18,10 +18,10 @@ function configure_performance() {
	echo "Done"

	echo -n "Moving all interrupts off of core 0..."
	count=`expr $(nproc) / 4`
	count=$(expr $(nproc) / 4)
	cpumask="e"
	for ((i=1; i<$count; i++)); do
		if [ `expr $i % 8` -eq 0 ]; then
		if [ $(expr $i % 8) -eq 0 ]; then
			cpumask=",$cpumask"
		fi
		cpumask="f$cpumask"
Loading