From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- src/test/cli/crushtool/adjust-item-weight.t | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/test/cli/crushtool/adjust-item-weight.t (limited to 'src/test/cli/crushtool/adjust-item-weight.t') diff --git a/src/test/cli/crushtool/adjust-item-weight.t b/src/test/cli/crushtool/adjust-item-weight.t new file mode 100644 index 00000000..16d7135c --- /dev/null +++ b/src/test/cli/crushtool/adjust-item-weight.t @@ -0,0 +1,17 @@ + $ crushtool -i "$TESTDIR/simple.template" --add-item 0 1.0 device0 --loc host host0 --loc cluster cluster0 -o one > /dev/null + +# +# add device0 into host=fake, the weight of device0 in host=host0 is 1.0, the weight of device0 in host=fake is 2.0 +# + + $ crushtool -i one --add-item 0 2.0 device0 --loc host fake --loc cluster cluster0 -o two > /dev/null + $ crushtool -d two -o final + $ cmp final "$TESTDIR/simple.template.adj.two" + +# +# update the weight of device0 in host=host0, it will not affect the weight of device0 in host=fake +# + + $ crushtool -i two --update-item 0 3.0 device0 --loc host host0 --loc cluster cluster0 -o three > /dev/null + $ crushtool -d three -o final + $ cmp final "$TESTDIR/simple.template.adj.three" -- cgit v1.2.3