From cff3180754e6400902ddab571bd030260777e811 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Wed, 26 Jul 2023 16:20:38 +0300 Subject: [PATCH] EX-7968 utils: lamigo to accept multi-word args so we can put something like the following into the config file: mirror-cmd=lfs mirror extend -N --stats --stats-interval=1 -W1M Test-Parameters: trivial testlist=hot-pools Signed-off-by: Alex Zhuravlev Change-Id: Ib01c4b4c76a46ee44189cc6fa763306b059886b3 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51768 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- lipe/src/lamigo.c | 2 +- lustre/tests/hot-pools.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lipe/src/lamigo.c b/lipe/src/lamigo.c index 4e70d09..3beabfa 100644 --- a/lipe/src/lamigo.c +++ b/lipe/src/lamigo.c @@ -2526,7 +2526,7 @@ static void load_config(char *name) } if (opt->has_arg == required_argument || opt->has_arg == optional_argument) { - optarg = strsep(&s, "\n "); + optarg = strsep(&s, "\n"); if (!optarg && opt->has_arg == required_argument) LX_FATAL("option '%s' requires an argument\n", t); diff --git a/lustre/tests/hot-pools.sh b/lustre/tests/hot-pools.sh index 941a3f0..e9c1300 100755 --- a/lustre/tests/hot-pools.sh +++ b/lustre/tests/hot-pools.sh @@ -358,7 +358,7 @@ create_one_lamigo_cfg() { [[ -z \\\"$LAMIGO_EXTRA\\\" ]] || echo \\\"$LAMIGO_EXTRA\\\" >> $cfg_file; [[ -z \\\"$LAMIGO_MIRROR_CMD\\\" ]] || - echo mirror-cmd=\'$LAMIGO_MIRROR_CMD\' >> $cfg_file; + echo mirror-cmd=$LAMIGO_MIRROR_CMD >> $cfg_file; [[ -z \\\"$LAMIGO_DUMP\\\" ]] || echo dump=\\\"${LAMIGO_DUMP}.$mdt\\\" >> $cfg_file; ! $LAMIGO_DEBUG || echo debug >> $cfg_file; -- 1.8.3.1