obdfilter-survey uses PAGE_SIZE in KBytes. After LU-11597
PAGE_SIZE exported from test-framework.sh in bytes. So it confuses
obdfilter-survey and lead to error:
/usr/bin/obdfilter-survey: line 509: size * 1024 / (actual_rsz * thr):
division by 0 (error token is ")")
Patch changes the name to PAGE_SIZE_KB.
Fixes:
f602b5ec7f4 ("LU-11597 tests: fix O_DIRECT test usage for ARM")
Test-Parameters: trivial testlist=obdfilter-survey
Signed-off-by: Alexander Boyko <c17825@cray.com>
Cray-bug-id: LUS-7214
Change-Id: Ie8be852c9634569c59a770ba49c3d1c36f53fdb2
Reviewed-on: https://review.whamcloud.com/34754
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
restart_nobj=1
# machine's page size (KB)
-PAGE_SIZE=${PAGE_SIZE:-$(($(getconf PAGE_SIZE) / 1024))}
-PAGE_SIZE=${PAGE_SIZE:-4}
+PAGE_SIZE_KB=${PAGE_SIZE_KB:-$(( ${PAGE_SIZE:-$(getconf PAGE_SIZE)} / 1024))}
+PAGE_SIZE_KB=${PAGE_SIZE_KB:-4}
snap=1
clean_srv_OSS=0
# compute parameters
total_thr=$((ndevs * thr))
total_nobj=$((ndevs * nobj))
- pages=$((rsz / PAGE_SIZE))
- actual_rsz=$((pages * PAGE_SIZE))
+ pages=$(( (rsz + PAGE_SIZE_KB - 1) / PAGE_SIZE_KB))
+ actual_rsz=$((pages * PAGE_SIZE_KB))
count=$((size * 1024 / (actual_rsz * thr)))
actual_size=$((actual_rsz * count * thr))
total_size=$((actual_size * ndevs))