Skip to content

Commit

Permalink
utils/tests/calc: test infinite cpusets
Browse files Browse the repository at this point in the history
Signed-off-by: Brice Goglin <[email protected]>
  • Loading branch information
bgoglin committed Jun 6, 2024
1 parent 95c0852 commit cdd9398
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
15 changes: 15 additions & 0 deletions utils/hwloc/test-hwloc-calc.output
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,18 @@ Waiting for locations to process on stdin...
0x00000001,,0x0
0xffffffff,0xffffffff

# Reading infinite cpusets from stdin
0xf...f
0xf...f,0x00abcd00
0xf...f,0x0000abcd,0x0000ef00
0xf...f,0xffffff00
0xf...f,0xffff0000,0xffff0000

# Reading infinite cpusets from stdin and exporting to taskset
Waiting for locations to process on stdin...
0xf...f
0xf...f00abcd00
0xf...f0000abcd0000ef00
0xf...fffffff00
0xf...fffff0000ffff0000

20 changes: 19 additions & 1 deletion utils/hwloc/test-hwloc-calc.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#
# Copyright © 2009 CNRS
# Copyright © 2009-2023 Inria. All rights reserved.
# Copyright © 2009-2024 Inria. All rights reserved.
# Copyright © 2009, 2011 Université Bordeaux
# Copyright © 2014 Cisco Systems, Inc. All rights reserved.
# See COPYING in top-level directory.
Expand Down Expand Up @@ -284,6 +284,24 @@ node:0 node:3
0x0000000000000000000000000000000000000000000000000000000000000000000000000000001
0x1,0x0,0x0
root
EOF
echo
echo "# Reading infinite cpusets from stdin"
cat << EOF | $calc --if synthetic --input "node:4 core:4 pu:4" -q
0xf...f
0xf...f,abcd00
0xf...f,abcd,ef00
0xf...ff00
0xf...fff0000ffff0000
EOF
echo
echo "# Reading infinite cpusets from stdin and exporting to taskset"
cat << EOF | $calc --if synthetic --input "node:4 core:4 pu:4" --taskset
0xf...f
0xf...f,abcd00
0xf...f,abcd,ef00
0xf...ff00
0xf...fff0000ffff0000
EOF
echo
) > "$file"
Expand Down

0 comments on commit cdd9398

Please sign in to comment.