From 20b38dca948e70b51cdd2b7c80318ab2cac9f23b Mon Sep 17 00:00:00 2001 From: Daniel Milroy Date: Wed, 25 Nov 2020 15:38:16 -0800 Subject: [PATCH] testsuite: add tests for unpack_at Add tests for unpack_at(). The test uses a JGF with one node with two CPUs, each containing 18 cores. After loading the base JGF, a match allocate ensures that the resource graph is fully allocated. Find() output verifies the resource graph contents at that point. Next, the shuffled JGF subgraph is added to the job allocation via update attach, and the resulting resource graph contents are verified by another find(). --- t/t3028-resource-grow.t | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 t/t3028-resource-grow.t diff --git a/t/t3028-resource-grow.t b/t/t3028-resource-grow.t new file mode 100755 index 000000000..d7a7627a7 --- /dev/null +++ b/t/t3028-resource-grow.t @@ -0,0 +1,20 @@ +#!/bin/sh + +test_description='Test emitted resource-set correctness for job growth' + +. $(dirname $0)/sharness.sh + +cmd_dir="${SHARNESS_TEST_SRCDIR}/data/resource/commands/elastic" +exp_dir="${SHARNESS_TEST_SRCDIR}/data/resource/expected/elastic" +jgf="${SHARNESS_TEST_SRCDIR}/data/resource/jgfs/elastic/node-test.json" +query="../../resource/utilities/resource-query" + +cmds001="${cmd_dir}/cmds01.in" +test001_desc="fully allocate node, find all resources, grow job and find all resources" +test_expect_success "${test001_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds001} > cmds001 && + ${query} -L ${jgf} -F jgf -f jgf -S CA -P low -t 001.R.out < cmds001 && + test_cmp 001.R.out ${exp_dir}/001.R.out +' + +test_done