From cdd93984a08cc08a343615d4fc172b926bc2328c Mon Sep 17 00:00:00 2001 From: Brice Goglin Date: Thu, 6 Jun 2024 15:27:50 +0200 Subject: [PATCH] utils/tests/calc: test infinite cpusets Signed-off-by: Brice Goglin --- utils/hwloc/test-hwloc-calc.output | 15 +++++++++++++++ utils/hwloc/test-hwloc-calc.sh.in | 20 +++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/utils/hwloc/test-hwloc-calc.output b/utils/hwloc/test-hwloc-calc.output index 2779f0335..385869dc9 100644 --- a/utils/hwloc/test-hwloc-calc.output +++ b/utils/hwloc/test-hwloc-calc.output @@ -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 + diff --git a/utils/hwloc/test-hwloc-calc.sh.in b/utils/hwloc/test-hwloc-calc.sh.in index 7e127c863..2f3965f82 100644 --- a/utils/hwloc/test-hwloc-calc.sh.in +++ b/utils/hwloc/test-hwloc-calc.sh.in @@ -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. @@ -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"