scripts/setup: use test -e to test for msr presence

Current `test -f` never succeeds, because `/dev/cpu/0/msr` is a
character device file.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Iaa28f04866ab24140668ad43351a37f0ccccef65
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7166
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Konrad Sztyber 2021-03-31 17:35:36 +02:00 committed by Tomasz Zawadzki
parent 180d281c7f
commit 4f11fa5b6c

View File

@ -509,7 +509,7 @@ function configure_linux() {
fi
fi
if [ ! -f /dev/cpu/0/msr ]; then
if [ ! -e /dev/cpu/0/msr ]; then
# Some distros build msr as a module. Make sure it's loaded to ensure
# DPDK can easily figure out the TSC rate rather than relying on 100ms
# sleeps.