-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add tests for remove subgraph
problem: the reemove subgrapgh feature added new code that needs to be tested as a part of automated ci add tests for this new feature
- Loading branch information
1 parent
f474106
commit 99a505e
Showing
8 changed files
with
332 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
remove /tiny0/rack0/node1/socket1 | ||
find status=up | ||
quit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
remove /tiny0/rack0/node1/socket1/core30 | ||
remove /tiny0/rack0/node1/socket1/core31 | ||
remove /tiny0/rack0/node1/socket1/core32 | ||
remove /tiny0/rack0/node1/socket1/core33 | ||
remove /tiny0/rack0/node1/socket1/core34 | ||
remove /tiny0/rack0/node1/socket1/core35 | ||
find status=up | ||
quit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
remove /does/not/exist | ||
find status=up | ||
quit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
---------------core0[1:x] | ||
---------------core1[1:x] | ||
---------------core2[1:x] | ||
---------------core3[1:x] | ||
---------------core4[1:x] | ||
---------------core5[1:x] | ||
---------------core6[1:x] | ||
---------------core7[1:x] | ||
---------------core8[1:x] | ||
---------------core9[1:x] | ||
---------------core10[1:x] | ||
---------------core11[1:x] | ||
---------------core12[1:x] | ||
---------------core13[1:x] | ||
---------------core14[1:x] | ||
---------------core15[1:x] | ||
---------------core16[1:x] | ||
---------------core17[1:x] | ||
---------------gpu0[1:x] | ||
---------------memory0[2:x] | ||
---------------memory1[2:x] | ||
---------------memory2[2:x] | ||
---------------memory3[2:x] | ||
------------socket0[1:x] | ||
---------------core18[1:x] | ||
---------------core19[1:x] | ||
---------------core20[1:x] | ||
---------------core21[1:x] | ||
---------------core22[1:x] | ||
---------------core23[1:x] | ||
---------------core24[1:x] | ||
---------------core25[1:x] | ||
---------------core26[1:x] | ||
---------------core27[1:x] | ||
---------------core28[1:x] | ||
---------------core29[1:x] | ||
---------------core30[1:x] | ||
---------------core31[1:x] | ||
---------------core32[1:x] | ||
---------------core33[1:x] | ||
---------------core34[1:x] | ||
---------------core35[1:x] | ||
---------------gpu1[1:x] | ||
---------------memory4[2:x] | ||
---------------memory5[2:x] | ||
---------------memory6[2:x] | ||
---------------memory7[2:x] | ||
------------socket1[1:x] | ||
---------node0[1:x] | ||
---------------core0[1:x] | ||
---------------core1[1:x] | ||
---------------core2[1:x] | ||
---------------core3[1:x] | ||
---------------core4[1:x] | ||
---------------core5[1:x] | ||
---------------core6[1:x] | ||
---------------core7[1:x] | ||
---------------core8[1:x] | ||
---------------core9[1:x] | ||
---------------core10[1:x] | ||
---------------core11[1:x] | ||
---------------core12[1:x] | ||
---------------core13[1:x] | ||
---------------core14[1:x] | ||
---------------core15[1:x] | ||
---------------core16[1:x] | ||
---------------core17[1:x] | ||
---------------gpu0[1:x] | ||
---------------memory0[2:x] | ||
---------------memory1[2:x] | ||
---------------memory2[2:x] | ||
---------------memory3[2:x] | ||
------------socket0[1:x] | ||
---------node1[1:x] | ||
------rack0[1:x] | ||
---tiny0[1:x] | ||
INFO: ============================= | ||
INFO: EXPRESSION="status=up" | ||
INFO: ============================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
---------------core0[1:x] | ||
---------------core1[1:x] | ||
---------------core2[1:x] | ||
---------------core3[1:x] | ||
---------------core4[1:x] | ||
---------------core5[1:x] | ||
---------------core6[1:x] | ||
---------------core7[1:x] | ||
---------------core8[1:x] | ||
---------------core9[1:x] | ||
---------------core10[1:x] | ||
---------------core11[1:x] | ||
---------------core12[1:x] | ||
---------------core13[1:x] | ||
---------------core14[1:x] | ||
---------------core15[1:x] | ||
---------------core16[1:x] | ||
---------------core17[1:x] | ||
---------------gpu0[1:x] | ||
---------------memory0[2:x] | ||
---------------memory1[2:x] | ||
---------------memory2[2:x] | ||
---------------memory3[2:x] | ||
------------socket0[1:x] | ||
---------------core18[1:x] | ||
---------------core19[1:x] | ||
---------------core20[1:x] | ||
---------------core21[1:x] | ||
---------------core22[1:x] | ||
---------------core23[1:x] | ||
---------------core24[1:x] | ||
---------------core25[1:x] | ||
---------------core26[1:x] | ||
---------------core27[1:x] | ||
---------------core28[1:x] | ||
---------------core29[1:x] | ||
---------------core30[1:x] | ||
---------------core31[1:x] | ||
---------------core32[1:x] | ||
---------------core33[1:x] | ||
---------------core34[1:x] | ||
---------------core35[1:x] | ||
---------------gpu1[1:x] | ||
---------------memory4[2:x] | ||
---------------memory5[2:x] | ||
---------------memory6[2:x] | ||
---------------memory7[2:x] | ||
------------socket1[1:x] | ||
---------node0[1:x] | ||
---------------core0[1:x] | ||
---------------core1[1:x] | ||
---------------core2[1:x] | ||
---------------core3[1:x] | ||
---------------core4[1:x] | ||
---------------core5[1:x] | ||
---------------core6[1:x] | ||
---------------core7[1:x] | ||
---------------core8[1:x] | ||
---------------core9[1:x] | ||
---------------core10[1:x] | ||
---------------core11[1:x] | ||
---------------core12[1:x] | ||
---------------core13[1:x] | ||
---------------core14[1:x] | ||
---------------core15[1:x] | ||
---------------core16[1:x] | ||
---------------core17[1:x] | ||
---------------gpu0[1:x] | ||
---------------memory0[2:x] | ||
---------------memory1[2:x] | ||
---------------memory2[2:x] | ||
---------------memory3[2:x] | ||
------------socket0[1:x] | ||
---------------core18[1:x] | ||
---------------core19[1:x] | ||
---------------core20[1:x] | ||
---------------core21[1:x] | ||
---------------core22[1:x] | ||
---------------core23[1:x] | ||
---------------core24[1:x] | ||
---------------core25[1:x] | ||
---------------core26[1:x] | ||
---------------core27[1:x] | ||
---------------core28[1:x] | ||
---------------core29[1:x] | ||
---------------gpu1[1:x] | ||
---------------memory4[2:x] | ||
---------------memory5[2:x] | ||
---------------memory6[2:x] | ||
---------------memory7[2:x] | ||
------------socket1[1:x] | ||
---------node1[1:x] | ||
------rack0[1:x] | ||
---tiny0[1:x] | ||
INFO: ============================= | ||
INFO: EXPRESSION="status=up" | ||
INFO: ============================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
---------------core0[1:x] | ||
---------------core1[1:x] | ||
---------------core2[1:x] | ||
---------------core3[1:x] | ||
---------------core4[1:x] | ||
---------------core5[1:x] | ||
---------------core6[1:x] | ||
---------------core7[1:x] | ||
---------------core8[1:x] | ||
---------------core9[1:x] | ||
---------------core10[1:x] | ||
---------------core11[1:x] | ||
---------------core12[1:x] | ||
---------------core13[1:x] | ||
---------------core14[1:x] | ||
---------------core15[1:x] | ||
---------------core16[1:x] | ||
---------------core17[1:x] | ||
---------------gpu0[1:x] | ||
---------------memory0[2:x] | ||
---------------memory1[2:x] | ||
---------------memory2[2:x] | ||
---------------memory3[2:x] | ||
------------socket0[1:x] | ||
---------------core18[1:x] | ||
---------------core19[1:x] | ||
---------------core20[1:x] | ||
---------------core21[1:x] | ||
---------------core22[1:x] | ||
---------------core23[1:x] | ||
---------------core24[1:x] | ||
---------------core25[1:x] | ||
---------------core26[1:x] | ||
---------------core27[1:x] | ||
---------------core28[1:x] | ||
---------------core29[1:x] | ||
---------------core30[1:x] | ||
---------------core31[1:x] | ||
---------------core32[1:x] | ||
---------------core33[1:x] | ||
---------------core34[1:x] | ||
---------------core35[1:x] | ||
---------------gpu1[1:x] | ||
---------------memory4[2:x] | ||
---------------memory5[2:x] | ||
---------------memory6[2:x] | ||
---------------memory7[2:x] | ||
------------socket1[1:x] | ||
---------node0[1:x] | ||
---------------core0[1:x] | ||
---------------core1[1:x] | ||
---------------core2[1:x] | ||
---------------core3[1:x] | ||
---------------core4[1:x] | ||
---------------core5[1:x] | ||
---------------core6[1:x] | ||
---------------core7[1:x] | ||
---------------core8[1:x] | ||
---------------core9[1:x] | ||
---------------core10[1:x] | ||
---------------core11[1:x] | ||
---------------core12[1:x] | ||
---------------core13[1:x] | ||
---------------core14[1:x] | ||
---------------core15[1:x] | ||
---------------core16[1:x] | ||
---------------core17[1:x] | ||
---------------gpu0[1:x] | ||
---------------memory0[2:x] | ||
---------------memory1[2:x] | ||
---------------memory2[2:x] | ||
---------------memory3[2:x] | ||
------------socket0[1:x] | ||
---------------core18[1:x] | ||
---------------core19[1:x] | ||
---------------core20[1:x] | ||
---------------core21[1:x] | ||
---------------core22[1:x] | ||
---------------core23[1:x] | ||
---------------core24[1:x] | ||
---------------core25[1:x] | ||
---------------core26[1:x] | ||
---------------core27[1:x] | ||
---------------core28[1:x] | ||
---------------core29[1:x] | ||
---------------core30[1:x] | ||
---------------core31[1:x] | ||
---------------core32[1:x] | ||
---------------core33[1:x] | ||
---------------core34[1:x] | ||
---------------core35[1:x] | ||
---------------gpu1[1:x] | ||
---------------memory4[2:x] | ||
---------------memory5[2:x] | ||
---------------memory6[2:x] | ||
---------------memory7[2:x] | ||
------------socket1[1:x] | ||
---------node1[1:x] | ||
------rack0[1:x] | ||
---tiny0[1:x] | ||
INFO: ============================= | ||
INFO: EXPRESSION="status=up" | ||
INFO: ============================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
|
||
test_description='Test resource graph remove subgraph' | ||
|
||
. $(dirname $0)/sharness.sh | ||
|
||
cmd_dir="${SHARNESS_TEST_SRCDIR}/data/resource/commands/remove" | ||
exp_dir="${SHARNESS_TEST_SRCDIR}/data/resource/expected/remove" | ||
jgf="${SHARNESS_TEST_SRCDIR}/data/resource/jgfs/tiny.json" | ||
query="../../resource/utilities/resource-query" | ||
|
||
cmds001="${cmd_dir}/cmds01.in" | ||
test001_desc="remove a single socket" | ||
test_expect_success "${test001_desc}" ' | ||
sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds001} > cmds001 && | ||
${query} -L ${jgf} -f jgf -t 001.R.out \ | ||
< cmds001 && | ||
test_cmp 001.R.out ${exp_dir}/001.R.out | ||
' | ||
|
||
cmds002="${cmd_dir}/cmds02.in" | ||
test002_desc="remove several cpus" | ||
test_expect_success "${test002_desc}" ' | ||
sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds002} > cmds002 && | ||
${query} -L ${jgf} -f jgf -t 002.R.out \ | ||
< cmds002 && | ||
test_cmp 002.R.out ${exp_dir}/002.R.out | ||
' | ||
|
||
cmds003="${cmd_dir}/cmds03.in" | ||
test003_desc="remove non existent node" | ||
test_expect_success "${test003_desc}" ' | ||
sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds003} > cmds003 && | ||
${query} -L ${jgf} -f jgf -t 003.R.out \ | ||
< cmds003 && | ||
test_cmp 003.R.out ${exp_dir}/003.R.out | ||
' | ||
test_done |