summaryrefslogtreecommitdiffstats
path: root/tests/ts/fincore
diff options
context:
space:
mode:
authorRuediger Meier2017-04-06 09:56:02 +0200
committerKarel Zak2017-04-06 12:30:09 +0200
commit4a4a617d03e0ccd87e0f47e00bc2a6a7ae0f4cf6 (patch)
tree8553d37720226356b4668fed546dd69eb0feedff /tests/ts/fincore
parenttests: remove fincore SMALLER_THAN_PAGESIZE tests (diff)
downloadkernel-qcow2-util-linux-4a4a617d03e0ccd87e0f47e00bc2a6a7ae0f4cf6.tar.gz
kernel-qcow2-util-linux-4a4a617d03e0ccd87e0f47e00bc2a6a7ae0f4cf6.tar.xz
kernel-qcow2-util-linux-4a4a617d03e0ccd87e0f47e00bc2a6a7ae0f4cf6.zip
tests: fix fincore/count for PAGE_SIZE != 4096
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts/fincore')
-rwxr-xr-xtests/ts/fincore/count18
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/ts/fincore/count b/tests/ts/fincore/count
index 8f23fece5..be815527e 100755
--- a/tests/ts/fincore/count
+++ b/tests/ts/fincore/count
@@ -32,7 +32,7 @@ function run_dd_test
$DD if=/dev/zero of=$input count=1 bs=$bs $flags &> /dev/null
fi
- $TS_CMD_FINCORE --output PAGES,SIZE,FILE --bytes --noheadings $input
+ $TS_CMD_FINCORE --output $COLUMNS --bytes --noheadings $input
footer "$?"
}
@@ -51,7 +51,7 @@ function run_dd_dd_test
$DD if=/dev/zero of=$input count=1 bs=$bs $flags0 &> /dev/null
$DD if=/dev/zero of=$input count=1 bs=$bs $flags1 &> /dev/null
- $TS_CMD_FINCORE --output PAGES,SIZE,FILE --bytes --noheadings $input
+ $TS_CMD_FINCORE --output $COLUMNS --bytes --noheadings $input
footer "$?"
}
@@ -65,6 +65,16 @@ ts_init "$*"
PAGE_SIZE=$($TS_HELPER_SYSINFO pagesize)
WINDOW_SIZE=$(( 32 * 1024 * PAGE_SIZE ))
+# we use PAGE_SIZE dependent output for a few systems
+if test -f "$TS_EXPECTED.$PAGE_SIZE"; then
+ TS_EXPECTED+=".$PAGE_SIZE"
+ COLUMNS="PAGES,SIZE,FILE"
+else
+ TS_EXPECTED+=".nosize"
+ COLUMNS="PAGES,FILE"
+fi
+
+
# seems unsupported by some dd(1) version
#DD_FLAGS="status=none"
@@ -83,7 +93,7 @@ input=
INPUT="${INPUT} ${input}"
header "NO EXCITING FILE"
- $TS_CMD_FINCORE --output PAGES,SIZE,FILE --bytes --noheadings $input
+ $TS_CMD_FINCORE --output $COLUMNS --bytes --noheadings $input
footer "$?"
} >> $TS_OUTPUT 2>&1
@@ -181,7 +191,7 @@ input=
{
header "MULTIPLE FILES"
- $TS_CMD_FINCORE --output PAGES,SIZE,FILE --bytes $INPUT
+ $TS_CMD_FINCORE --output $COLUMNS --bytes $INPUT
footer "$?"
} >> $TS_OUTPUT 2>&1