Since upstream changed to print new line in module
parameter callback instead of kernel self. So we
need test output of param_get_byte to determine
whether output the new line.
(upstream: v4.14-rc3-148-g96802e6b1dbf)
Also output filename and file content when test
failed for santy 133h.
Test-Parameters: trivial testlist=sanity clientdistro=el8.1 serverdistro=el8.1
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: Ibb5961e4de8b05d9dd59875e4fd38a42fa07d0d6
Reviewed-on: https://review.whamcloud.com/38699
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
{
unsigned int d = *(unsigned int *)kp->arg;
- return sprintf(buffer, "%lu", jiffies_to_msecs(d * 10) / MSEC_PER_SEC);
+ param_get_byte(buffer, kp);
+ return sprintf(buffer, "%lu%c", jiffies_to_msecs(d * 10) / MSEC_PER_SEC,
+ strnchr(buffer, PAGE_SIZE, '\n') ? '\n' : '\0');
}
unsigned int libcfs_console_max_delay;
skip "Need MDS version at least 2.9.54"
local facet
-
for facet in client mds1 ost1; do
# Get the list of files that are missing the terminating newline
- #local missing=($(do_facet $facet \
local plist=$(do_facet $facet
$LCTL list_param -FR '*' | grep '=' | tr -d =)
local ent
awk -v FS='\v' -v RS='\v\v' \
"'END { if(NR>0 && \\\$NF !~ /.*\\\n\$/) \
print FILENAME}'" 2>/dev/null)
- [ -z $missing ] ||
- error "files do not end with newline: $missing"
+ [ -z $missing ] || {
+ do_facet $facet $LCTL get_param $ent | od -An -tx1
+ error "file does not end with newline: $facet-$ent"
+ }
done
done
}