summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d813c75)
For debug and changelog mask names, allow a comma-separated list
of names to be given, so that the space-separated list does not
need to be quoted for use.
Change sanity-quota to use a comma-separated list to verify it works.
Fix a couple of test cases where the debug parameter is set and
printed overly verbosely during tests.
Test-Parameters: trivial testlist=sanity-quota
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Icf1e3ebc74f0e48b38a65486b2275ec4c33ebbe5
Reviewed-on: https://review.whamcloud.com/43741
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
int newmask = minmask, i, len, found = 0;
ENTRY;
int newmask = minmask, i, len, found = 0;
ENTRY;
- /* <str> must be a list of tokens separated by whitespace
+ /* <str> must be a list of tokens separated by whitespace or comma,
* and optionally an operator ('+' or '-'). If an operator
* appears first in <str>, '*oldmask' is used as the starting point
* (relative), otherwise minmask is used (absolute). An operator
* applies to all following tokens up to the next operator.
*/
while (*str != 0) {
* and optionally an operator ('+' or '-'). If an operator
* appears first in <str>, '*oldmask' is used as the starting point
* (relative), otherwise minmask is used (absolute). An operator
* applies to all following tokens up to the next operator.
*/
while (*str != 0) {
+ while (isspace(*str) || *str == ',')
str++;
if (*str == 0)
break;
str++;
if (*str == 0)
break;
/* find token length */
for (len = 0; str[len] != 0 && !isspace(str[len]) &&
/* find token length */
for (len = 0; str[len] != 0 && !isspace(str[len]) &&
- str[len] != '+' && str[len] != '-'; len++);
+ str[len] != '+' && str[len] != '-' && str[len] != ',';
+ len++);
/* match token */
found = 0;
/* match token */
found = 0;
# enable quota debug
quota_init() {
# enable quota debug
quota_init() {
- do_nodes $(comma_list $(nodes_list)) "lctl set_param debug=+quota+trace"
+ do_nodes $(comma_list $(nodes_list)) \
+ "$LCTL set_param -n debug=+quota,trace"
}
quota_init
reset_quota_settings
}
quota_init
reset_quota_settings
- do_nodes $(comma_list $(nodes_list)) "lctl set_param debug=-quota"
+ do_nodes $(comma_list $(nodes_list)) \
+ "lctl set_param -n debug=-quota,trace"
if $PQ_CLEANUP; then
disable_project_quota
fi
if $PQ_CLEANUP; then
disable_project_quota
fi
local saved_debug=$($LCTL get_param -n debug)
local list=$(comma_list $(all_nodes))
local saved_debug=$($LCTL get_param -n debug)
local list=$(comma_list $(all_nodes))
- do_nodes $list $LCTL set_param debug=0
+ do_nodes $list $LCTL set_param -n debug=0
}
$LUSTRE/tests/createmany $*
local rc=$?
(( count > 100 )) &&
}
$LUSTRE/tests/createmany $*
local rc=$?
(( count > 100 )) &&
- do_nodes $list "$LCTL set_param debug=\\\"$saved_debug\\\""
+ do_nodes $list "$LCTL set_param -n debug=\\\"$saved_debug\\\""
local saved_debug=$($LCTL get_param -n debug)
local list=$(comma_list $(all_nodes))
local saved_debug=$($LCTL get_param -n debug)
local list=$(comma_list $(all_nodes))
- do_nodes $list $LCTL set_param debug=0
+ do_nodes $list $LCTL set_param -n debug=0
}
$LUSTRE/tests/unlinkmany $*
local rc=$?
(( count > 100 )) &&
}
$LUSTRE/tests/unlinkmany $*
local rc=$?
(( count > 100 )) &&
- do_nodes $list "$LCTL set_param debug=\\\"$saved_debug\\\""
+ do_nodes $list "$LCTL set_param -n debug=\\\"$saved_debug\\\""