Steps to reproduce:
$ lctl get_param -n ost.OSS.ost_io.nrs_tbf_rule
error: get_param: reading 'ost.OSS.ost_io.nrs_tbf_rule': No such device
$ echo $?
0
read_param() might return errors, fix to return errors to
caller.
Change-Id: Id165424342be3109669f173b9b72c16aa8c83425
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/32925
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
}
run_test 116 "big size MDT support"
}
run_test 116 "big size MDT support"
+test_117() {
+ setup
+ do_facet ost1 "$LCTL set_param ost.OSS.ost_io.nrs_policies=fifo"
+ do_facet ost1 "$LCTL get_param -n ost.OSS.ost_io.nrs_tbf_rule" &&
+ error "get_param should fail"
+ cleanup || error "cleanup failed with rc $?"
+}
+run_test 117 "lctl get_param return errors properly"
+
test_122() {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
[[ $(lustre_version_code ost1) -ge $(version_code 2.11.53) ]] ||
test_122() {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
[[ $(lustre_version_code ost1) -ge $(version_code 2.11.53) ]] ||
nodemap_test_setup
trap nodemap_test_cleanup EXIT
nodemap_test_setup
trap nodemap_test_cleanup EXIT
- do_nodes $(comma_list $(all_server_nodes)) $LCTL get_param -R nodemap ||
- error "proc readable file read failed"
+ do_nodes $(comma_list $(all_server_nodes)) $LCTL get_param -R nodemap
find $proc_dirs -exec cat '{}' \; &> /dev/null
# Second verifying readability.
find $proc_dirs -exec cat '{}' \; &> /dev/null
# Second verifying readability.
- $LCTL get_param -R '*' &> /dev/null || error "proc file read failed"
+ $LCTL get_param -R '*' &> /dev/null
# Verifing writability with badarea_io.
find $proc_dirs \
# Verifing writability with badarea_io.
find $proc_dirs \
switch (mode) {
case GET_PARAM:
/* Read the contents of file to stdout */
switch (mode) {
case GET_PARAM:
/* Read the contents of file to stdout */
- if (S_ISREG(st.st_mode))
- read_param(paths.gl_pathv[i], param_name, popt);
+ if (S_ISREG(st.st_mode)) {
+ rc2 = read_param(paths.gl_pathv[i], param_name,
+ popt);
+ if (rc2 < 0 && rc == 0)
+ rc = rc2;
+ }
break;
case SET_PARAM:
if (S_ISREG(st.st_mode)) {
break;
case SET_PARAM:
if (S_ISREG(st.st_mode)) {