lfs quota all should insert a delimiter between the name and certain
parameter(busage, bhardlimit, bsoftlimit ...).
Fixes:
7c02893e12 ("LU-18079 utils: argument parse opts for lfs quota")
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: Icace5752c4a169858792748c5f4b41e336d18cac
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59209
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
unlinkmany ${TFILE} $qid_cnt
}
-test_49()
+test_49a()
{
(( MDS1_VERSION >= $(version_code 2.15.60) )) ||
skip "Need MDS version at least 2.15.60"
formatall
setupall
}
-run_test 49 "lfs quota -a prints the quota usage for all quota IDs"
+run_test 49a "lfs quota -a prints the quota usage for all quota IDs"
+
+test_49b() {
+ local root_name
+
+ (( MDS1_VERSION >= $(version_code v2_15_61-145-g3edc718) )) ||
+ skip "Need MDS version >= 2.15.61 for lfs quota all support"
+
+ root_name=$($LFS quota -a -u --busage $DIR | awk '/root/ {print $1}')
+ # check username is not merged with the usage
+ [[ $root_name == "root" ]] || error "root name is insane: $root_name"
+}
+run_test 49b "lfs quota -a --blocks has a delimiter"
test_50() {
! is_project_quota_supported &&
static void print_quota_val(char *val, int cols, bool print_over,
struct quota_param *param)
{
- if ((param->qp_detail & (param->qp_detail - 1)) == 0) /* single value */
+ if ((param->qp_detail & (param->qp_detail - 1)) == 0 &&
+ !param->qp_show_qid) /* single value */
printf("%s", val);
else if (param->qp_delim[0])
printf("%*s%s", cols, val, param->qp_delim);