Skip to content

Instantly share code, notes, and snippets.

@mcgrof
Created December 13, 2022 21:41
Show Gist options
  • Save mcgrof/b1f7dd67fe44870adbd0c773ac752dcb to your computer and use it in GitHub Desktop.
Save mcgrof/b1f7dd67fe44870adbd0c773ac752dcb to your computer and use it in GitHub Desktop.
ndctl main meson test -C build --suite cxl failures
Log of Meson test suite run on 2022-12-13T21:39:13.839811
Inherited environment: LANG=C.UTF-8 LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:' TERM=screen.xterm-256color PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MAIL=/var/mail/root LOGNAME=root USER=root HOME=/root SHELL=/bin/bash SUDO_COMMAND='/usr/bin/meson test -C build --suite cxl' SUDO_USER=vagrant SUDO_UID=1000 SUDO_GID=1000
==================================== 1/4 =====================================
test: ndctl:cxl / cxl-topology.sh
start time: 21:39:13
duration: 0.96s
result: exit status 1
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=123 /bin/bash /data/ndctl/test/cxl-topology.sh
----------------------------------- stdout -----------------------------------
test/cxl-topology.sh: failed at line 35
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
No TPM handle discovered.
failed to open file /etc/ndctl/keys/nvdimm-master.blob: No such file or directory
+ udevadm settle
++ ./cxl/cxl list -b cxl_test
+ json='[
{
"bus":"root0",
"provider":"cxl_test"
}
]'
++ jq length
+ count=1
+ (( count == 1 ))
++ jq -r '.[] | .bus'
+ root=root0
+ port_sort='sort_by(.port | .[4:] | tonumber)'
++ ./cxl/cxl list -b cxl_test -BP
+ json='[
{
"bus":"root0",
"provider":"cxl_test",
"ports:root0":[
{
"port":"port1",
"host":"cxl_host_bridge.0",
"depth":1,
"ports:port1":[
{
"port":"port8",
"host":"cxl_switch_uport.2",
"depth":2
},
{
"port":"port4",
"host":"cxl_switch_uport.0",
"depth":2
}
]
},
{
"port":"port3",
"host":"cxl_host_bridge.2",
"depth":1,
"ports:port3":[
{
"port":"port16",
"host":"cxl_switch_uport.4",
"depth":2
}
]
},
{
"port":"port2",
"host":"cxl_host_bridge.1",
"depth":1,
"ports:port2":[
{
"port":"port6",
"host":"cxl_switch_uport.1",
"depth":2
},
{
"port":"port10",
"host":"cxl_switch_uport.3",
"depth":2
}
]
}
]
}
]'
++ jq '.[] | .["ports:root0"] | length'
+ count=3
+ (( count == 2 ))
+ err 35
++ basename /data/ndctl/test/cxl-topology.sh
+ echo test/cxl-topology.sh: failed at line 35
+ '[' -n '' ']'
+ exit 1
==============================================================================
==================================== 2/4 =====================================
test: ndctl:cxl / cxl-region-sysfs.sh
start time: 21:39:14
duration: 5.33s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl MALLOC_PERTURB_=69 DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-region-sysfs.sh
----------------------------------- stdout -----------------------------------
region3 added 8 targets: decoder9.0 decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
region3 released 8 targets: decoder9.0 decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
++ ./cxl/cxl list -b cxl_test -D -d root
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 2) |
.decoder'
+ decoder=decoder0.3
+ readarray -t mem
++ ./cxl/cxl list -M -d decoder0.3
++ jq -r '.[].memdev'
+ readarray -t endpoint
++ ./cxl/cxl reserve-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7 -s 268435456
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_reserve_dpa: reservation completed on 8 mem devices
++ cat /sys/bus/cxl/devices/decoder0.3/create_pmem_region
+ region=region3
+ echo region3
+ uuidgen
+ nr_targets=8
+ echo 8
++ cat /sys/bus/cxl/devices/decoder0.3/interleave_granularity
+ r_ig=4096
+ echo 4096
+ echo 2147483648
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 0) | .target'
+ port_dev0=cxl_host_bridge.0
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 1) | .target'
+ port_dev1=cxl_host_bridge.1
+ readarray -t mem_sort0
++ ./cxl/cxl list -M -p cxl_host_bridge.0
++ jq -r '.[] | .memdev'
+ readarray -t mem_sort1
++ ./cxl/cxl list -M -p cxl_host_bridge.1
++ jq -r '.[] | .memdev'
+ mem_sort=()
+ mem_sort[0]=mem2
+ mem_sort[1]=mem1
+ mem_sort[2]=mem0
+ mem_sort[3]=mem3
+ mem_sort[4]=mem6
+ mem_sort[5]=mem5
+ mem_sort[6]=mem4
+ mem_sort[7]=mem7
+ endpoint=()
+ for i in ${mem_sort[@]}
+ readarray -O 0 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem2
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 1 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem1
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 2 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem0
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 3 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem3
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 4 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem6
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 5 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem5
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 6 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem4
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 7 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem7
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ pos=0
+ for i in ${endpoint[@]}
+ echo decoder9.0
+ pos=1
+ for i in ${endpoint[@]}
+ echo decoder7.0
+ pos=2
+ for i in ${endpoint[@]}
+ echo decoder5.0
+ pos=3
+ for i in ${endpoint[@]}
+ echo decoder11.0
+ pos=4
+ for i in ${endpoint[@]}
+ echo decoder14.0
+ pos=5
+ for i in ${endpoint[@]}
+ echo decoder13.0
+ pos=6
+ for i in ${endpoint[@]}
+ echo decoder12.0
+ pos=7
+ for i in ${endpoint[@]}
+ echo decoder15.0
+ pos=8
+ echo 'region3 added 8 targets: decoder9.0' decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
++ cat /sys/bus/cxl/devices/region3/size
+ region_size=0x80000000
++ cat /sys/bus/cxl/devices/region3/resource
+ region_base=0x3ff110000000
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder9.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder9.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder7.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder7.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder5.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder5.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder11.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder11.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder14.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder14.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder13.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder13.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder12.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder12.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder15.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder15.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ nr_switches=4
+ nr_host_bridges=2
+ nr_switch_decoders=6
++ ./cxl/cxl list -D -r region3 -d switch
+ json='[
{
"decoder":"decoder1.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder8.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder4.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder2.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder6.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder10.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
}
]'
+ readarray -t switch_decoders
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[].decoder'
+ '[' 6 -ne 6 ']'
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder1.0")'
+ decoder='{
"decoder": "decoder1.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=1.0
+ port_id=1
++ ./cxl/cxl list -p 1 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder8.0")'
+ decoder='{
"decoder": "decoder8.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=8.0
+ port_id=8
++ ./cxl/cxl list -p 8 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder4.0")'
+ decoder='{
"decoder": "decoder4.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=4.0
+ port_id=4
++ ./cxl/cxl list -p 4 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder2.0")'
+ decoder='{
"decoder": "decoder2.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=2.0
+ port_id=2
++ ./cxl/cxl list -p 2 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder6.0")'
+ decoder='{
"decoder": "decoder6.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=6.0
+ port_id=6
++ ./cxl/cxl list -p 6 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder10.0")'
+ decoder='{
"decoder": "decoder10.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=10.0
+ port_id=10
++ ./cxl/cxl list -p 10 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ echo 1
+ echo 0
+ pos=0
+ for i in ${endpoint[@]}
+ echo ''
+ pos=1
+ for i in ${endpoint[@]}
+ echo ''
+ pos=2
+ for i in ${endpoint[@]}
+ echo ''
+ pos=3
+ for i in ${endpoint[@]}
+ echo ''
+ pos=4
+ for i in ${endpoint[@]}
+ echo ''
+ pos=5
+ for i in ${endpoint[@]}
+ echo ''
+ pos=6
+ for i in ${endpoint[@]}
+ echo ''
+ pos=7
+ for i in ${endpoint[@]}
+ echo ''
+ pos=8
+ readarray -t endpoint
++ ./cxl/cxl free-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_free_dpa: reservation release completed on 8 mem devices
+ echo 'region3 released 8 targets: decoder9.0' decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
++ journalctl -r -k --since -6s
+ log='Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:15 cxl kernel: cxl_mem mem10: CXL port topology not found
Dec 13 21:39:15 cxl kernel: cxl_mem mem9: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem8: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem7: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem6: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem5: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem4: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem3: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem2: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem1: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem0: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:14 cxl kernel: cxl_core: loading test module taints kernel.
Dec 13 21:39:14 cxl kernel: cxl_core: loading out-of-tree module taints kernel.
Dec 13 21:39:13 cxl kernel: Key type encrypted registered'
+ grep -q 'Call Trace'
+ modprobe -r cxl_test
==============================================================================
==================================== 3/4 =====================================
test: ndctl:cxl / cxl-labels.sh
start time: 21:39:20
duration: 3.40s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=250 /bin/bash /data/ndctl/test/cxl-labels.sh
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -Mi
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem2
+ mem=mem2
++ mktemp /tmp/lsa-read-mem2.XXXX
+ lsa_read=/tmp/lsa-read-mem2.L5OU
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem2.L5OU mem2
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem2.L5OU
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem6
+ mem=mem6
++ mktemp /tmp/lsa-read-mem6.XXXX
+ lsa_read=/tmp/lsa-read-mem6.hEps
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem6.hEps mem6
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem6.hEps
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem0
+ mem=mem0
++ mktemp /tmp/lsa-read-mem0.XXXX
+ lsa_read=/tmp/lsa-read-mem0.S8nk
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem0.S8nk mem0
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem0.S8nk
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem4
+ mem=mem4
++ mktemp /tmp/lsa-read-mem4.XXXX
+ lsa_read=/tmp/lsa-read-mem4.sEjn
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem4.sEjn mem4
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem4.sEjn
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem8
+ mem=mem8
++ mktemp /tmp/lsa-read-mem8.XXXX
+ lsa_read=/tmp/lsa-read-mem8.g46l
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem8.g46l mem8
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem8.g46l
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem9
+ mem=mem9
++ mktemp /tmp/lsa-read-mem9.XXXX
+ lsa_read=/tmp/lsa-read-mem9.P8qD
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem9.P8qD mem9
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem9.P8qD
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem1
+ mem=mem1
++ mktemp /tmp/lsa-read-mem1.XXXX
+ lsa_read=/tmp/lsa-read-mem1.GlNK
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem1.GlNK mem1
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem1.GlNK
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem5
+ mem=mem5
++ mktemp /tmp/lsa-read-mem5.XXXX
+ lsa_read=/tmp/lsa-read-mem5.y4QI
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem5.y4QI mem5
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem5.y4QI
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem3
+ mem=mem3
++ mktemp /tmp/lsa-read-mem3.XXXX
+ lsa_read=/tmp/lsa-read-mem3.4847
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem3.4847 mem3
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem3.4847
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem7
+ mem=mem7
++ mktemp /tmp/lsa-read-mem7.XXXX
+ lsa_read=/tmp/lsa-read-mem7.deL8
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem7.deL8 mem7
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem7.deL8
+ readarray -t nmems
++ /data/ndctl/build/ndctl/ndctl list -b cxl_test -Di
++ jq -r '.[].dev'
+ for nmem in ${nmems[@]}
+ test_label_ops nmem1
+ nmem=nmem1
++ mktemp /tmp/lsa-nmem1.XXXX
+ lsa=/tmp/lsa-nmem1.jeHe
++ mktemp /tmp/lsa-read-nmem1.XXXX
+ lsa_read=/tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem1.Hnu9
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00238995 s, 54.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem1.jeHe nmem1
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem1
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00157225 s, 83.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ rm /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ for nmem in ${nmems[@]}
+ test_label_ops nmem3
+ nmem=nmem3
++ mktemp /tmp/lsa-nmem3.XXXX
+ lsa=/tmp/lsa-nmem3.7Ly4
++ mktemp /tmp/lsa-read-nmem3.XXXX
+ lsa_read=/tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem3.RZnA
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00152502 s, 85.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem3.7Ly4 nmem3
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem3
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00143445 s, 91.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ rm /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ for nmem in ${nmems[@]}
+ test_label_ops nmem5
+ nmem=nmem5
++ mktemp /tmp/lsa-nmem5.XXXX
+ lsa=/tmp/lsa-nmem5.UeB3
++ mktemp /tmp/lsa-read-nmem5.XXXX
+ lsa_read=/tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem5.9E0W
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0021845 s, 60.0 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem5.UeB3 nmem5
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem5
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00155322 s, 84.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ rm /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ for nmem in ${nmems[@]}
+ test_label_ops nmem7
+ nmem=nmem7
++ mktemp /tmp/lsa-nmem7.XXXX
+ lsa=/tmp/lsa-nmem7.vd2l
++ mktemp /tmp/lsa-read-nmem7.XXXX
+ lsa_read=/tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem7.QsjU
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0022185 s, 59.1 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem7.vd2l nmem7
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem7
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145473 s, 90.1 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ rm /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ for nmem in ${nmems[@]}
+ test_label_ops nmem9
+ nmem=nmem9
++ mktemp /tmp/lsa-nmem9.XXXX
+ lsa=/tmp/lsa-nmem9.fnSU
++ mktemp /tmp/lsa-read-nmem9.XXXX
+ lsa_read=/tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem9.wATp
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00236822 s, 55.3 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem9.fnSU nmem9
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem9
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00148677 s, 88.2 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ rm /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ for nmem in ${nmems[@]}
+ test_label_ops nmem0
+ nmem=nmem0
++ mktemp /tmp/lsa-nmem0.XXXX
+ lsa=/tmp/lsa-nmem0.XmMO
++ mktemp /tmp/lsa-read-nmem0.XXXX
+ lsa_read=/tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem0.TqFV
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00241734 s, 54.2 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem0.XmMO nmem0
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem0
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00141113 s, 92.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ rm /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ for nmem in ${nmems[@]}
+ test_label_ops nmem2
+ nmem=nmem2
++ mktemp /tmp/lsa-nmem2.XXXX
+ lsa=/tmp/lsa-nmem2.AdX8
++ mktemp /tmp/lsa-read-nmem2.XXXX
+ lsa_read=/tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem2.npC3
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234679 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem2.AdX8 nmem2
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem2
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00139573 s, 93.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ rm /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ for nmem in ${nmems[@]}
+ test_label_ops nmem4
+ nmem=nmem4
++ mktemp /tmp/lsa-nmem4.XXXX
+ lsa=/tmp/lsa-nmem4.zUOl
++ mktemp /tmp/lsa-read-nmem4.XXXX
+ lsa_read=/tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem4.SWG7
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00215404 s, 60.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem4.zUOl nmem4
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem4
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145766 s, 89.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ rm /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ for nmem in ${nmems[@]}
+ test_label_ops nmem6
+ nmem=nmem6
++ mktemp /tmp/lsa-nmem6.XXXX
+ lsa=/tmp/lsa-nmem6.Itxu
++ mktemp /tmp/lsa-read-nmem6.XXXX
+ lsa_read=/tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem6.Gc56
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00235466 s, 55.7 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem6.Itxu nmem6
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem6
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144466 s, 90.7 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ rm /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ for nmem in ${nmems[@]}
+ test_label_ops nmem8
+ nmem=nmem8
++ mktemp /tmp/lsa-nmem8.XXXX
+ lsa=/tmp/lsa-nmem8.YRl9
++ mktemp /tmp/lsa-read-nmem8.XXXX
+ lsa_read=/tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem8.BkKD
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234596 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem8.YRl9 nmem8
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem8
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144887 s, 90.5 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ rm /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ modprobe -r cxl_test
==============================================================================
==================================== 4/4 =====================================
test: ndctl:cxl / cxl-create-region.sh
start time: 21:39:23
duration: 8.14s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test MALLOC_PERTURB_=137 NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-create-region.sh
----------------------------------- stdout -----------------------------------
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -M
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ create_x1_region mem2
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem6
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem0
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem4
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem8
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem9
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem1
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem5
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem3
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem7
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem2
+ slice=268435456
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem2
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem6
+ slice=268435456
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem6
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem0
+ slice=268435456
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem0
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem4
+ slice=268435456
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem4
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem8
+ slice=268435456
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem8
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem9
+ slice=268435456
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem9
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem1
+ slice=268435456
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem5
+ slice=268435456
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem3
+ slice=268435456
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem7
+ slice=268435456
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ modprobe -r cxl_test
==============================================================================
Summary of Failures:
1/4 ndctl:cxl / cxl-topology.sh FAIL 0.96s exit status 1
Ok: 3
Expected Fail: 0
Fail: 1
Unexpected Pass: 0
Skipped: 0
Timeout: 0
Log of Meson test suite run on 2022-12-13T21:39:13.839811
Inherited environment: LANG=C.UTF-8 LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:' TERM=screen.xterm-256color PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MAIL=/var/mail/root LOGNAME=root USER=root HOME=/root SHELL=/bin/bash SUDO_COMMAND='/usr/bin/meson test -C build --suite cxl' SUDO_USER=vagrant SUDO_UID=1000 SUDO_GID=1000
==================================== 1/4 =====================================
test: ndctl:cxl / cxl-topology.sh
start time: 21:39:13
duration: 0.96s
result: exit status 1
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=123 /bin/bash /data/ndctl/test/cxl-topology.sh
----------------------------------- stdout -----------------------------------
test/cxl-topology.sh: failed at line 35
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
No TPM handle discovered.
failed to open file /etc/ndctl/keys/nvdimm-master.blob: No such file or directory
+ udevadm settle
++ ./cxl/cxl list -b cxl_test
+ json='[
{
"bus":"root0",
"provider":"cxl_test"
}
]'
++ jq length
+ count=1
+ (( count == 1 ))
++ jq -r '.[] | .bus'
+ root=root0
+ port_sort='sort_by(.port | .[4:] | tonumber)'
++ ./cxl/cxl list -b cxl_test -BP
+ json='[
{
"bus":"root0",
"provider":"cxl_test",
"ports:root0":[
{
"port":"port1",
"host":"cxl_host_bridge.0",
"depth":1,
"ports:port1":[
{
"port":"port8",
"host":"cxl_switch_uport.2",
"depth":2
},
{
"port":"port4",
"host":"cxl_switch_uport.0",
"depth":2
}
]
},
{
"port":"port3",
"host":"cxl_host_bridge.2",
"depth":1,
"ports:port3":[
{
"port":"port16",
"host":"cxl_switch_uport.4",
"depth":2
}
]
},
{
"port":"port2",
"host":"cxl_host_bridge.1",
"depth":1,
"ports:port2":[
{
"port":"port6",
"host":"cxl_switch_uport.1",
"depth":2
},
{
"port":"port10",
"host":"cxl_switch_uport.3",
"depth":2
}
]
}
]
}
]'
++ jq '.[] | .["ports:root0"] | length'
+ count=3
+ (( count == 2 ))
+ err 35
++ basename /data/ndctl/test/cxl-topology.sh
+ echo test/cxl-topology.sh: failed at line 35
+ '[' -n '' ']'
+ exit 1
==============================================================================
==================================== 2/4 =====================================
test: ndctl:cxl / cxl-region-sysfs.sh
start time: 21:39:14
duration: 5.33s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl MALLOC_PERTURB_=69 DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-region-sysfs.sh
----------------------------------- stdout -----------------------------------
region3 added 8 targets: decoder9.0 decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
region3 released 8 targets: decoder9.0 decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
++ ./cxl/cxl list -b cxl_test -D -d root
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 2) |
.decoder'
+ decoder=decoder0.3
+ readarray -t mem
++ ./cxl/cxl list -M -d decoder0.3
++ jq -r '.[].memdev'
+ readarray -t endpoint
++ ./cxl/cxl reserve-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7 -s 268435456
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_reserve_dpa: reservation completed on 8 mem devices
++ cat /sys/bus/cxl/devices/decoder0.3/create_pmem_region
+ region=region3
+ echo region3
+ uuidgen
+ nr_targets=8
+ echo 8
++ cat /sys/bus/cxl/devices/decoder0.3/interleave_granularity
+ r_ig=4096
+ echo 4096
+ echo 2147483648
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 0) | .target'
+ port_dev0=cxl_host_bridge.0
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 1) | .target'
+ port_dev1=cxl_host_bridge.1
+ readarray -t mem_sort0
++ ./cxl/cxl list -M -p cxl_host_bridge.0
++ jq -r '.[] | .memdev'
+ readarray -t mem_sort1
++ ./cxl/cxl list -M -p cxl_host_bridge.1
++ jq -r '.[] | .memdev'
+ mem_sort=()
+ mem_sort[0]=mem2
+ mem_sort[1]=mem1
+ mem_sort[2]=mem0
+ mem_sort[3]=mem3
+ mem_sort[4]=mem6
+ mem_sort[5]=mem5
+ mem_sort[6]=mem4
+ mem_sort[7]=mem7
+ endpoint=()
+ for i in ${mem_sort[@]}
+ readarray -O 0 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem2
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 1 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem1
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 2 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem0
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 3 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem3
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 4 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem6
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 5 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem5
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 6 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem4
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 7 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem7
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ pos=0
+ for i in ${endpoint[@]}
+ echo decoder9.0
+ pos=1
+ for i in ${endpoint[@]}
+ echo decoder7.0
+ pos=2
+ for i in ${endpoint[@]}
+ echo decoder5.0
+ pos=3
+ for i in ${endpoint[@]}
+ echo decoder11.0
+ pos=4
+ for i in ${endpoint[@]}
+ echo decoder14.0
+ pos=5
+ for i in ${endpoint[@]}
+ echo decoder13.0
+ pos=6
+ for i in ${endpoint[@]}
+ echo decoder12.0
+ pos=7
+ for i in ${endpoint[@]}
+ echo decoder15.0
+ pos=8
+ echo 'region3 added 8 targets: decoder9.0' decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
++ cat /sys/bus/cxl/devices/region3/size
+ region_size=0x80000000
++ cat /sys/bus/cxl/devices/region3/resource
+ region_base=0x3ff110000000
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder9.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder9.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder7.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder7.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder5.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder5.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder11.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder11.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder14.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder14.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder13.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder13.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder12.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder12.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder15.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder15.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ nr_switches=4
+ nr_host_bridges=2
+ nr_switch_decoders=6
++ ./cxl/cxl list -D -r region3 -d switch
+ json='[
{
"decoder":"decoder1.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder8.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder4.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder2.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder6.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder10.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
}
]'
+ readarray -t switch_decoders
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[].decoder'
+ '[' 6 -ne 6 ']'
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder1.0")'
+ decoder='{
"decoder": "decoder1.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=1.0
+ port_id=1
++ ./cxl/cxl list -p 1 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder8.0")'
+ decoder='{
"decoder": "decoder8.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=8.0
+ port_id=8
++ ./cxl/cxl list -p 8 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder4.0")'
+ decoder='{
"decoder": "decoder4.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=4.0
+ port_id=4
++ ./cxl/cxl list -p 4 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder2.0")'
+ decoder='{
"decoder": "decoder2.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=2.0
+ port_id=2
++ ./cxl/cxl list -p 2 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder6.0")'
+ decoder='{
"decoder": "decoder6.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=6.0
+ port_id=6
++ ./cxl/cxl list -p 6 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder10.0")'
+ decoder='{
"decoder": "decoder10.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=10.0
+ port_id=10
++ ./cxl/cxl list -p 10 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ echo 1
+ echo 0
+ pos=0
+ for i in ${endpoint[@]}
+ echo ''
+ pos=1
+ for i in ${endpoint[@]}
+ echo ''
+ pos=2
+ for i in ${endpoint[@]}
+ echo ''
+ pos=3
+ for i in ${endpoint[@]}
+ echo ''
+ pos=4
+ for i in ${endpoint[@]}
+ echo ''
+ pos=5
+ for i in ${endpoint[@]}
+ echo ''
+ pos=6
+ for i in ${endpoint[@]}
+ echo ''
+ pos=7
+ for i in ${endpoint[@]}
+ echo ''
+ pos=8
+ readarray -t endpoint
++ ./cxl/cxl free-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_free_dpa: reservation release completed on 8 mem devices
+ echo 'region3 released 8 targets: decoder9.0' decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
++ journalctl -r -k --since -6s
+ log='Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:15 cxl kernel: cxl_mem mem10: CXL port topology not found
Dec 13 21:39:15 cxl kernel: cxl_mem mem9: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem8: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem7: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem6: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem5: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem4: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem3: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem2: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem1: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem0: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:14 cxl kernel: cxl_core: loading test module taints kernel.
Dec 13 21:39:14 cxl kernel: cxl_core: loading out-of-tree module taints kernel.
Dec 13 21:39:13 cxl kernel: Key type encrypted registered'
+ grep -q 'Call Trace'
+ modprobe -r cxl_test
==============================================================================
==================================== 3/4 =====================================
test: ndctl:cxl / cxl-labels.sh
start time: 21:39:20
duration: 3.40s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=250 /bin/bash /data/ndctl/test/cxl-labels.sh
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -Mi
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem2
+ mem=mem2
++ mktemp /tmp/lsa-read-mem2.XXXX
+ lsa_read=/tmp/lsa-read-mem2.L5OU
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem2.L5OU mem2
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem2.L5OU
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem6
+ mem=mem6
++ mktemp /tmp/lsa-read-mem6.XXXX
+ lsa_read=/tmp/lsa-read-mem6.hEps
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem6.hEps mem6
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem6.hEps
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem0
+ mem=mem0
++ mktemp /tmp/lsa-read-mem0.XXXX
+ lsa_read=/tmp/lsa-read-mem0.S8nk
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem0.S8nk mem0
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem0.S8nk
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem4
+ mem=mem4
++ mktemp /tmp/lsa-read-mem4.XXXX
+ lsa_read=/tmp/lsa-read-mem4.sEjn
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem4.sEjn mem4
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem4.sEjn
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem8
+ mem=mem8
++ mktemp /tmp/lsa-read-mem8.XXXX
+ lsa_read=/tmp/lsa-read-mem8.g46l
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem8.g46l mem8
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem8.g46l
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem9
+ mem=mem9
++ mktemp /tmp/lsa-read-mem9.XXXX
+ lsa_read=/tmp/lsa-read-mem9.P8qD
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem9.P8qD mem9
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem9.P8qD
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem1
+ mem=mem1
++ mktemp /tmp/lsa-read-mem1.XXXX
+ lsa_read=/tmp/lsa-read-mem1.GlNK
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem1.GlNK mem1
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem1.GlNK
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem5
+ mem=mem5
++ mktemp /tmp/lsa-read-mem5.XXXX
+ lsa_read=/tmp/lsa-read-mem5.y4QI
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem5.y4QI mem5
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem5.y4QI
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem3
+ mem=mem3
++ mktemp /tmp/lsa-read-mem3.XXXX
+ lsa_read=/tmp/lsa-read-mem3.4847
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem3.4847 mem3
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem3.4847
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem7
+ mem=mem7
++ mktemp /tmp/lsa-read-mem7.XXXX
+ lsa_read=/tmp/lsa-read-mem7.deL8
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem7.deL8 mem7
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem7.deL8
+ readarray -t nmems
++ /data/ndctl/build/ndctl/ndctl list -b cxl_test -Di
++ jq -r '.[].dev'
+ for nmem in ${nmems[@]}
+ test_label_ops nmem1
+ nmem=nmem1
++ mktemp /tmp/lsa-nmem1.XXXX
+ lsa=/tmp/lsa-nmem1.jeHe
++ mktemp /tmp/lsa-read-nmem1.XXXX
+ lsa_read=/tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem1.Hnu9
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00238995 s, 54.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem1.jeHe nmem1
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem1
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00157225 s, 83.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ rm /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ for nmem in ${nmems[@]}
+ test_label_ops nmem3
+ nmem=nmem3
++ mktemp /tmp/lsa-nmem3.XXXX
+ lsa=/tmp/lsa-nmem3.7Ly4
++ mktemp /tmp/lsa-read-nmem3.XXXX
+ lsa_read=/tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem3.RZnA
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00152502 s, 85.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem3.7Ly4 nmem3
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem3
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00143445 s, 91.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ rm /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ for nmem in ${nmems[@]}
+ test_label_ops nmem5
+ nmem=nmem5
++ mktemp /tmp/lsa-nmem5.XXXX
+ lsa=/tmp/lsa-nmem5.UeB3
++ mktemp /tmp/lsa-read-nmem5.XXXX
+ lsa_read=/tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem5.9E0W
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0021845 s, 60.0 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem5.UeB3 nmem5
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem5
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00155322 s, 84.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ rm /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ for nmem in ${nmems[@]}
+ test_label_ops nmem7
+ nmem=nmem7
++ mktemp /tmp/lsa-nmem7.XXXX
+ lsa=/tmp/lsa-nmem7.vd2l
++ mktemp /tmp/lsa-read-nmem7.XXXX
+ lsa_read=/tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem7.QsjU
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0022185 s, 59.1 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem7.vd2l nmem7
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem7
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145473 s, 90.1 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ rm /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ for nmem in ${nmems[@]}
+ test_label_ops nmem9
+ nmem=nmem9
++ mktemp /tmp/lsa-nmem9.XXXX
+ lsa=/tmp/lsa-nmem9.fnSU
++ mktemp /tmp/lsa-read-nmem9.XXXX
+ lsa_read=/tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem9.wATp
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00236822 s, 55.3 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem9.fnSU nmem9
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem9
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00148677 s, 88.2 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ rm /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ for nmem in ${nmems[@]}
+ test_label_ops nmem0
+ nmem=nmem0
++ mktemp /tmp/lsa-nmem0.XXXX
+ lsa=/tmp/lsa-nmem0.XmMO
++ mktemp /tmp/lsa-read-nmem0.XXXX
+ lsa_read=/tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem0.TqFV
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00241734 s, 54.2 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem0.XmMO nmem0
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem0
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00141113 s, 92.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ rm /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ for nmem in ${nmems[@]}
+ test_label_ops nmem2
+ nmem=nmem2
++ mktemp /tmp/lsa-nmem2.XXXX
+ lsa=/tmp/lsa-nmem2.AdX8
++ mktemp /tmp/lsa-read-nmem2.XXXX
+ lsa_read=/tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem2.npC3
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234679 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem2.AdX8 nmem2
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem2
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00139573 s, 93.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ rm /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ for nmem in ${nmems[@]}
+ test_label_ops nmem4
+ nmem=nmem4
++ mktemp /tmp/lsa-nmem4.XXXX
+ lsa=/tmp/lsa-nmem4.zUOl
++ mktemp /tmp/lsa-read-nmem4.XXXX
+ lsa_read=/tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem4.SWG7
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00215404 s, 60.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem4.zUOl nmem4
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem4
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145766 s, 89.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ rm /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ for nmem in ${nmems[@]}
+ test_label_ops nmem6
+ nmem=nmem6
++ mktemp /tmp/lsa-nmem6.XXXX
+ lsa=/tmp/lsa-nmem6.Itxu
++ mktemp /tmp/lsa-read-nmem6.XXXX
+ lsa_read=/tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem6.Gc56
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00235466 s, 55.7 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem6.Itxu nmem6
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem6
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144466 s, 90.7 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ rm /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ for nmem in ${nmems[@]}
+ test_label_ops nmem8
+ nmem=nmem8
++ mktemp /tmp/lsa-nmem8.XXXX
+ lsa=/tmp/lsa-nmem8.YRl9
++ mktemp /tmp/lsa-read-nmem8.XXXX
+ lsa_read=/tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem8.BkKD
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234596 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem8.YRl9 nmem8
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem8
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144887 s, 90.5 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ rm /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ modprobe -r cxl_test
==============================================================================
==================================== 4/4 =====================================
test: ndctl:cxl / cxl-create-region.sh
start time: 21:39:23
duration: 8.14s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test MALLOC_PERTURB_=137 NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-create-region.sh
----------------------------------- stdout -----------------------------------
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -M
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ create_x1_region mem2
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem6
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem0
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem4
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem8
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem9
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem1
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem5
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem3
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem7
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem2
+ slice=268435456
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem2
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem6
+ slice=268435456
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem6
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem0
+ slice=268435456
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem0
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem4
+ slice=268435456
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem4
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem8
+ slice=268435456
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem8
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem9
+ slice=268435456
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem9
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem1
+ slice=268435456
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem5
+ slice=268435456
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem3
+ slice=268435456
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem7
+ slice=268435456
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ modprobe -r cxl_test
==============================================================================
Summary of Failures:
1/4 ndctl:cxl / cxl-topology.sh FAIL 0.96s exit status 1
Ok: 3
Expected Fail: 0
Fail: 1
Unexpected Pass: 0
Skipped: 0
Timeout: 0
Log of Meson test suite run on 2022-12-13T21:39:13.839811
Inherited environment: LANG=C.UTF-8 LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:' TERM=screen.xterm-256color PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MAIL=/var/mail/root LOGNAME=root USER=root HOME=/root SHELL=/bin/bash SUDO_COMMAND='/usr/bin/meson test -C build --suite cxl' SUDO_USER=vagrant SUDO_UID=1000 SUDO_GID=1000
==================================== 1/4 =====================================
test: ndctl:cxl / cxl-topology.sh
start time: 21:39:13
duration: 0.96s
result: exit status 1
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=123 /bin/bash /data/ndctl/test/cxl-topology.sh
----------------------------------- stdout -----------------------------------
test/cxl-topology.sh: failed at line 35
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
No TPM handle discovered.
failed to open file /etc/ndctl/keys/nvdimm-master.blob: No such file or directory
+ udevadm settle
++ ./cxl/cxl list -b cxl_test
+ json='[
{
"bus":"root0",
"provider":"cxl_test"
}
]'
++ jq length
+ count=1
+ (( count == 1 ))
++ jq -r '.[] | .bus'
+ root=root0
+ port_sort='sort_by(.port | .[4:] | tonumber)'
++ ./cxl/cxl list -b cxl_test -BP
+ json='[
{
"bus":"root0",
"provider":"cxl_test",
"ports:root0":[
{
"port":"port1",
"host":"cxl_host_bridge.0",
"depth":1,
"ports:port1":[
{
"port":"port8",
"host":"cxl_switch_uport.2",
"depth":2
},
{
"port":"port4",
"host":"cxl_switch_uport.0",
"depth":2
}
]
},
{
"port":"port3",
"host":"cxl_host_bridge.2",
"depth":1,
"ports:port3":[
{
"port":"port16",
"host":"cxl_switch_uport.4",
"depth":2
}
]
},
{
"port":"port2",
"host":"cxl_host_bridge.1",
"depth":1,
"ports:port2":[
{
"port":"port6",
"host":"cxl_switch_uport.1",
"depth":2
},
{
"port":"port10",
"host":"cxl_switch_uport.3",
"depth":2
}
]
}
]
}
]'
++ jq '.[] | .["ports:root0"] | length'
+ count=3
+ (( count == 2 ))
+ err 35
++ basename /data/ndctl/test/cxl-topology.sh
+ echo test/cxl-topology.sh: failed at line 35
+ '[' -n '' ']'
+ exit 1
==============================================================================
==================================== 2/4 =====================================
test: ndctl:cxl / cxl-region-sysfs.sh
start time: 21:39:14
duration: 5.33s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl MALLOC_PERTURB_=69 DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-region-sysfs.sh
----------------------------------- stdout -----------------------------------
region3 added 8 targets: decoder9.0 decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
region3 released 8 targets: decoder9.0 decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
++ ./cxl/cxl list -b cxl_test -D -d root
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 2) |
.decoder'
+ decoder=decoder0.3
+ readarray -t mem
++ ./cxl/cxl list -M -d decoder0.3
++ jq -r '.[].memdev'
+ readarray -t endpoint
++ ./cxl/cxl reserve-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7 -s 268435456
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_reserve_dpa: reservation completed on 8 mem devices
++ cat /sys/bus/cxl/devices/decoder0.3/create_pmem_region
+ region=region3
+ echo region3
+ uuidgen
+ nr_targets=8
+ echo 8
++ cat /sys/bus/cxl/devices/decoder0.3/interleave_granularity
+ r_ig=4096
+ echo 4096
+ echo 2147483648
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 0) | .target'
+ port_dev0=cxl_host_bridge.0
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 1) | .target'
+ port_dev1=cxl_host_bridge.1
+ readarray -t mem_sort0
++ ./cxl/cxl list -M -p cxl_host_bridge.0
++ jq -r '.[] | .memdev'
+ readarray -t mem_sort1
++ ./cxl/cxl list -M -p cxl_host_bridge.1
++ jq -r '.[] | .memdev'
+ mem_sort=()
+ mem_sort[0]=mem2
+ mem_sort[1]=mem1
+ mem_sort[2]=mem0
+ mem_sort[3]=mem3
+ mem_sort[4]=mem6
+ mem_sort[5]=mem5
+ mem_sort[6]=mem4
+ mem_sort[7]=mem7
+ endpoint=()
+ for i in ${mem_sort[@]}
+ readarray -O 0 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem2
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 1 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem1
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 2 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem0
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 3 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem3
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 4 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem6
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 5 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem5
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 6 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem4
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 7 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem7
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ pos=0
+ for i in ${endpoint[@]}
+ echo decoder9.0
+ pos=1
+ for i in ${endpoint[@]}
+ echo decoder7.0
+ pos=2
+ for i in ${endpoint[@]}
+ echo decoder5.0
+ pos=3
+ for i in ${endpoint[@]}
+ echo decoder11.0
+ pos=4
+ for i in ${endpoint[@]}
+ echo decoder14.0
+ pos=5
+ for i in ${endpoint[@]}
+ echo decoder13.0
+ pos=6
+ for i in ${endpoint[@]}
+ echo decoder12.0
+ pos=7
+ for i in ${endpoint[@]}
+ echo decoder15.0
+ pos=8
+ echo 'region3 added 8 targets: decoder9.0' decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
++ cat /sys/bus/cxl/devices/region3/size
+ region_size=0x80000000
++ cat /sys/bus/cxl/devices/region3/resource
+ region_base=0x3ff110000000
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder9.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder9.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder7.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder7.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder5.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder5.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder11.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder11.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder14.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder14.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder13.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder13.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder12.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder12.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder15.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder15.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ nr_switches=4
+ nr_host_bridges=2
+ nr_switch_decoders=6
++ ./cxl/cxl list -D -r region3 -d switch
+ json='[
{
"decoder":"decoder1.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder8.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder4.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder2.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder6.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder10.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
}
]'
+ readarray -t switch_decoders
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[].decoder'
+ '[' 6 -ne 6 ']'
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder1.0")'
+ decoder='{
"decoder": "decoder1.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=1.0
+ port_id=1
++ ./cxl/cxl list -p 1 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder8.0")'
+ decoder='{
"decoder": "decoder8.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=8.0
+ port_id=8
++ ./cxl/cxl list -p 8 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder4.0")'
+ decoder='{
"decoder": "decoder4.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=4.0
+ port_id=4
++ ./cxl/cxl list -p 4 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder2.0")'
+ decoder='{
"decoder": "decoder2.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=2.0
+ port_id=2
++ ./cxl/cxl list -p 2 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder6.0")'
+ decoder='{
"decoder": "decoder6.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=6.0
+ port_id=6
++ ./cxl/cxl list -p 6 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder10.0")'
+ decoder='{
"decoder": "decoder10.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=10.0
+ port_id=10
++ ./cxl/cxl list -p 10 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ echo 1
+ echo 0
+ pos=0
+ for i in ${endpoint[@]}
+ echo ''
+ pos=1
+ for i in ${endpoint[@]}
+ echo ''
+ pos=2
+ for i in ${endpoint[@]}
+ echo ''
+ pos=3
+ for i in ${endpoint[@]}
+ echo ''
+ pos=4
+ for i in ${endpoint[@]}
+ echo ''
+ pos=5
+ for i in ${endpoint[@]}
+ echo ''
+ pos=6
+ for i in ${endpoint[@]}
+ echo ''
+ pos=7
+ for i in ${endpoint[@]}
+ echo ''
+ pos=8
+ readarray -t endpoint
++ ./cxl/cxl free-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_free_dpa: reservation release completed on 8 mem devices
+ echo 'region3 released 8 targets: decoder9.0' decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
++ journalctl -r -k --since -6s
+ log='Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:15 cxl kernel: cxl_mem mem10: CXL port topology not found
Dec 13 21:39:15 cxl kernel: cxl_mem mem9: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem8: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem7: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem6: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem5: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem4: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem3: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem2: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem1: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem0: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:14 cxl kernel: cxl_core: loading test module taints kernel.
Dec 13 21:39:14 cxl kernel: cxl_core: loading out-of-tree module taints kernel.
Dec 13 21:39:13 cxl kernel: Key type encrypted registered'
+ grep -q 'Call Trace'
+ modprobe -r cxl_test
==============================================================================
==================================== 3/4 =====================================
test: ndctl:cxl / cxl-labels.sh
start time: 21:39:20
duration: 3.40s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=250 /bin/bash /data/ndctl/test/cxl-labels.sh
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -Mi
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem2
+ mem=mem2
++ mktemp /tmp/lsa-read-mem2.XXXX
+ lsa_read=/tmp/lsa-read-mem2.L5OU
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem2.L5OU mem2
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem2.L5OU
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem6
+ mem=mem6
++ mktemp /tmp/lsa-read-mem6.XXXX
+ lsa_read=/tmp/lsa-read-mem6.hEps
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem6.hEps mem6
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem6.hEps
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem0
+ mem=mem0
++ mktemp /tmp/lsa-read-mem0.XXXX
+ lsa_read=/tmp/lsa-read-mem0.S8nk
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem0.S8nk mem0
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem0.S8nk
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem4
+ mem=mem4
++ mktemp /tmp/lsa-read-mem4.XXXX
+ lsa_read=/tmp/lsa-read-mem4.sEjn
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem4.sEjn mem4
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem4.sEjn
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem8
+ mem=mem8
++ mktemp /tmp/lsa-read-mem8.XXXX
+ lsa_read=/tmp/lsa-read-mem8.g46l
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem8.g46l mem8
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem8.g46l
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem9
+ mem=mem9
++ mktemp /tmp/lsa-read-mem9.XXXX
+ lsa_read=/tmp/lsa-read-mem9.P8qD
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem9.P8qD mem9
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem9.P8qD
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem1
+ mem=mem1
++ mktemp /tmp/lsa-read-mem1.XXXX
+ lsa_read=/tmp/lsa-read-mem1.GlNK
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem1.GlNK mem1
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem1.GlNK
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem5
+ mem=mem5
++ mktemp /tmp/lsa-read-mem5.XXXX
+ lsa_read=/tmp/lsa-read-mem5.y4QI
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem5.y4QI mem5
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem5.y4QI
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem3
+ mem=mem3
++ mktemp /tmp/lsa-read-mem3.XXXX
+ lsa_read=/tmp/lsa-read-mem3.4847
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem3.4847 mem3
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem3.4847
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem7
+ mem=mem7
++ mktemp /tmp/lsa-read-mem7.XXXX
+ lsa_read=/tmp/lsa-read-mem7.deL8
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem7.deL8 mem7
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem7.deL8
+ readarray -t nmems
++ /data/ndctl/build/ndctl/ndctl list -b cxl_test -Di
++ jq -r '.[].dev'
+ for nmem in ${nmems[@]}
+ test_label_ops nmem1
+ nmem=nmem1
++ mktemp /tmp/lsa-nmem1.XXXX
+ lsa=/tmp/lsa-nmem1.jeHe
++ mktemp /tmp/lsa-read-nmem1.XXXX
+ lsa_read=/tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem1.Hnu9
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00238995 s, 54.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem1.jeHe nmem1
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem1
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00157225 s, 83.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ rm /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ for nmem in ${nmems[@]}
+ test_label_ops nmem3
+ nmem=nmem3
++ mktemp /tmp/lsa-nmem3.XXXX
+ lsa=/tmp/lsa-nmem3.7Ly4
++ mktemp /tmp/lsa-read-nmem3.XXXX
+ lsa_read=/tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem3.RZnA
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00152502 s, 85.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem3.7Ly4 nmem3
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem3
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00143445 s, 91.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ rm /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ for nmem in ${nmems[@]}
+ test_label_ops nmem5
+ nmem=nmem5
++ mktemp /tmp/lsa-nmem5.XXXX
+ lsa=/tmp/lsa-nmem5.UeB3
++ mktemp /tmp/lsa-read-nmem5.XXXX
+ lsa_read=/tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem5.9E0W
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0021845 s, 60.0 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem5.UeB3 nmem5
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem5
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00155322 s, 84.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ rm /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ for nmem in ${nmems[@]}
+ test_label_ops nmem7
+ nmem=nmem7
++ mktemp /tmp/lsa-nmem7.XXXX
+ lsa=/tmp/lsa-nmem7.vd2l
++ mktemp /tmp/lsa-read-nmem7.XXXX
+ lsa_read=/tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem7.QsjU
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0022185 s, 59.1 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem7.vd2l nmem7
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem7
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145473 s, 90.1 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ rm /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ for nmem in ${nmems[@]}
+ test_label_ops nmem9
+ nmem=nmem9
++ mktemp /tmp/lsa-nmem9.XXXX
+ lsa=/tmp/lsa-nmem9.fnSU
++ mktemp /tmp/lsa-read-nmem9.XXXX
+ lsa_read=/tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem9.wATp
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00236822 s, 55.3 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem9.fnSU nmem9
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem9
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00148677 s, 88.2 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ rm /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ for nmem in ${nmems[@]}
+ test_label_ops nmem0
+ nmem=nmem0
++ mktemp /tmp/lsa-nmem0.XXXX
+ lsa=/tmp/lsa-nmem0.XmMO
++ mktemp /tmp/lsa-read-nmem0.XXXX
+ lsa_read=/tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem0.TqFV
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00241734 s, 54.2 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem0.XmMO nmem0
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem0
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00141113 s, 92.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ rm /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ for nmem in ${nmems[@]}
+ test_label_ops nmem2
+ nmem=nmem2
++ mktemp /tmp/lsa-nmem2.XXXX
+ lsa=/tmp/lsa-nmem2.AdX8
++ mktemp /tmp/lsa-read-nmem2.XXXX
+ lsa_read=/tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem2.npC3
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234679 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem2.AdX8 nmem2
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem2
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00139573 s, 93.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ rm /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ for nmem in ${nmems[@]}
+ test_label_ops nmem4
+ nmem=nmem4
++ mktemp /tmp/lsa-nmem4.XXXX
+ lsa=/tmp/lsa-nmem4.zUOl
++ mktemp /tmp/lsa-read-nmem4.XXXX
+ lsa_read=/tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem4.SWG7
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00215404 s, 60.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem4.zUOl nmem4
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem4
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145766 s, 89.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ rm /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ for nmem in ${nmems[@]}
+ test_label_ops nmem6
+ nmem=nmem6
++ mktemp /tmp/lsa-nmem6.XXXX
+ lsa=/tmp/lsa-nmem6.Itxu
++ mktemp /tmp/lsa-read-nmem6.XXXX
+ lsa_read=/tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem6.Gc56
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00235466 s, 55.7 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem6.Itxu nmem6
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem6
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144466 s, 90.7 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ rm /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ for nmem in ${nmems[@]}
+ test_label_ops nmem8
+ nmem=nmem8
++ mktemp /tmp/lsa-nmem8.XXXX
+ lsa=/tmp/lsa-nmem8.YRl9
++ mktemp /tmp/lsa-read-nmem8.XXXX
+ lsa_read=/tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem8.BkKD
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234596 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem8.YRl9 nmem8
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem8
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144887 s, 90.5 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ rm /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ modprobe -r cxl_test
==============================================================================
==================================== 4/4 =====================================
test: ndctl:cxl / cxl-create-region.sh
start time: 21:39:23
duration: 8.14s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test MALLOC_PERTURB_=137 NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-create-region.sh
----------------------------------- stdout -----------------------------------
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -M
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ create_x1_region mem2
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem6
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem0
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem4
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem8
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem9
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem1
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem5
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem3
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem7
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem2
+ slice=268435456
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem2
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem6
+ slice=268435456
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem6
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem0
+ slice=268435456
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem0
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem4
+ slice=268435456
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem4
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem8
+ slice=268435456
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem8
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem9
+ slice=268435456
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem9
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem1
+ slice=268435456
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem5
+ slice=268435456
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem3
+ slice=268435456
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem7
+ slice=268435456
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ modprobe -r cxl_test
==============================================================================
Summary of Failures:
1/4 ndctl:cxl / cxl-topology.sh FAIL 0.96s exit status 1
Ok: 3
Expected Fail: 0
Fail: 1
Unexpected Pass: 0
Skipped: 0
Timeout: 0
Log of Meson test suite run on 2022-12-13T21:39:13.839811
Inherited environment: LANG=C.UTF-8 LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:' TERM=screen.xterm-256color PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MAIL=/var/mail/root LOGNAME=root USER=root HOME=/root SHELL=/bin/bash SUDO_COMMAND='/usr/bin/meson test -C build --suite cxl' SUDO_USER=vagrant SUDO_UID=1000 SUDO_GID=1000
==================================== 1/4 =====================================
test: ndctl:cxl / cxl-topology.sh
start time: 21:39:13
duration: 0.96s
result: exit status 1
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=123 /bin/bash /data/ndctl/test/cxl-topology.sh
----------------------------------- stdout -----------------------------------
test/cxl-topology.sh: failed at line 35
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
No TPM handle discovered.
failed to open file /etc/ndctl/keys/nvdimm-master.blob: No such file or directory
+ udevadm settle
++ ./cxl/cxl list -b cxl_test
+ json='[
{
"bus":"root0",
"provider":"cxl_test"
}
]'
++ jq length
+ count=1
+ (( count == 1 ))
++ jq -r '.[] | .bus'
+ root=root0
+ port_sort='sort_by(.port | .[4:] | tonumber)'
++ ./cxl/cxl list -b cxl_test -BP
+ json='[
{
"bus":"root0",
"provider":"cxl_test",
"ports:root0":[
{
"port":"port1",
"host":"cxl_host_bridge.0",
"depth":1,
"ports:port1":[
{
"port":"port8",
"host":"cxl_switch_uport.2",
"depth":2
},
{
"port":"port4",
"host":"cxl_switch_uport.0",
"depth":2
}
]
},
{
"port":"port3",
"host":"cxl_host_bridge.2",
"depth":1,
"ports:port3":[
{
"port":"port16",
"host":"cxl_switch_uport.4",
"depth":2
}
]
},
{
"port":"port2",
"host":"cxl_host_bridge.1",
"depth":1,
"ports:port2":[
{
"port":"port6",
"host":"cxl_switch_uport.1",
"depth":2
},
{
"port":"port10",
"host":"cxl_switch_uport.3",
"depth":2
}
]
}
]
}
]'
++ jq '.[] | .["ports:root0"] | length'
+ count=3
+ (( count == 2 ))
+ err 35
++ basename /data/ndctl/test/cxl-topology.sh
+ echo test/cxl-topology.sh: failed at line 35
+ '[' -n '' ']'
+ exit 1
==============================================================================
==================================== 2/4 =====================================
test: ndctl:cxl / cxl-region-sysfs.sh
start time: 21:39:14
duration: 5.33s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl MALLOC_PERTURB_=69 DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-region-sysfs.sh
----------------------------------- stdout -----------------------------------
region3 added 8 targets: decoder9.0 decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
region3 released 8 targets: decoder9.0 decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
++ ./cxl/cxl list -b cxl_test -D -d root
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 2) |
.decoder'
+ decoder=decoder0.3
+ readarray -t mem
++ ./cxl/cxl list -M -d decoder0.3
++ jq -r '.[].memdev'
+ readarray -t endpoint
++ ./cxl/cxl reserve-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7 -s 268435456
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_reserve_dpa: reservation completed on 8 mem devices
++ cat /sys/bus/cxl/devices/decoder0.3/create_pmem_region
+ region=region3
+ echo region3
+ uuidgen
+ nr_targets=8
+ echo 8
++ cat /sys/bus/cxl/devices/decoder0.3/interleave_granularity
+ r_ig=4096
+ echo 4096
+ echo 2147483648
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 0) | .target'
+ port_dev0=cxl_host_bridge.0
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 1) | .target'
+ port_dev1=cxl_host_bridge.1
+ readarray -t mem_sort0
++ ./cxl/cxl list -M -p cxl_host_bridge.0
++ jq -r '.[] | .memdev'
+ readarray -t mem_sort1
++ ./cxl/cxl list -M -p cxl_host_bridge.1
++ jq -r '.[] | .memdev'
+ mem_sort=()
+ mem_sort[0]=mem2
+ mem_sort[1]=mem1
+ mem_sort[2]=mem0
+ mem_sort[3]=mem3
+ mem_sort[4]=mem6
+ mem_sort[5]=mem5
+ mem_sort[6]=mem4
+ mem_sort[7]=mem7
+ endpoint=()
+ for i in ${mem_sort[@]}
+ readarray -O 0 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem2
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 1 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem1
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 2 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem0
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 3 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem3
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 4 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem6
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 5 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem5
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 6 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem4
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 7 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem7
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ pos=0
+ for i in ${endpoint[@]}
+ echo decoder9.0
+ pos=1
+ for i in ${endpoint[@]}
+ echo decoder7.0
+ pos=2
+ for i in ${endpoint[@]}
+ echo decoder5.0
+ pos=3
+ for i in ${endpoint[@]}
+ echo decoder11.0
+ pos=4
+ for i in ${endpoint[@]}
+ echo decoder14.0
+ pos=5
+ for i in ${endpoint[@]}
+ echo decoder13.0
+ pos=6
+ for i in ${endpoint[@]}
+ echo decoder12.0
+ pos=7
+ for i in ${endpoint[@]}
+ echo decoder15.0
+ pos=8
+ echo 'region3 added 8 targets: decoder9.0' decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
++ cat /sys/bus/cxl/devices/region3/size
+ region_size=0x80000000
++ cat /sys/bus/cxl/devices/region3/resource
+ region_base=0x3ff110000000
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder9.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder9.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder7.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder7.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder5.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder5.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder11.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder11.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder14.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder14.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder13.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder13.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder12.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder12.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder15.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder15.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ nr_switches=4
+ nr_host_bridges=2
+ nr_switch_decoders=6
++ ./cxl/cxl list -D -r region3 -d switch
+ json='[
{
"decoder":"decoder1.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder8.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder4.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder2.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder6.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder10.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
}
]'
+ readarray -t switch_decoders
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[].decoder'
+ '[' 6 -ne 6 ']'
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder1.0")'
+ decoder='{
"decoder": "decoder1.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=1.0
+ port_id=1
++ ./cxl/cxl list -p 1 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder8.0")'
+ decoder='{
"decoder": "decoder8.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=8.0
+ port_id=8
++ ./cxl/cxl list -p 8 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder4.0")'
+ decoder='{
"decoder": "decoder4.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=4.0
+ port_id=4
++ ./cxl/cxl list -p 4 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder2.0")'
+ decoder='{
"decoder": "decoder2.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=2.0
+ port_id=2
++ ./cxl/cxl list -p 2 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder6.0")'
+ decoder='{
"decoder": "decoder6.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=6.0
+ port_id=6
++ ./cxl/cxl list -p 6 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder10.0")'
+ decoder='{
"decoder": "decoder10.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=10.0
+ port_id=10
++ ./cxl/cxl list -p 10 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ echo 1
+ echo 0
+ pos=0
+ for i in ${endpoint[@]}
+ echo ''
+ pos=1
+ for i in ${endpoint[@]}
+ echo ''
+ pos=2
+ for i in ${endpoint[@]}
+ echo ''
+ pos=3
+ for i in ${endpoint[@]}
+ echo ''
+ pos=4
+ for i in ${endpoint[@]}
+ echo ''
+ pos=5
+ for i in ${endpoint[@]}
+ echo ''
+ pos=6
+ for i in ${endpoint[@]}
+ echo ''
+ pos=7
+ for i in ${endpoint[@]}
+ echo ''
+ pos=8
+ readarray -t endpoint
++ ./cxl/cxl free-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_free_dpa: reservation release completed on 8 mem devices
+ echo 'region3 released 8 targets: decoder9.0' decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
++ journalctl -r -k --since -6s
+ log='Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:15 cxl kernel: cxl_mem mem10: CXL port topology not found
Dec 13 21:39:15 cxl kernel: cxl_mem mem9: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem8: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem7: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem6: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem5: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem4: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem3: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem2: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem1: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem0: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:14 cxl kernel: cxl_core: loading test module taints kernel.
Dec 13 21:39:14 cxl kernel: cxl_core: loading out-of-tree module taints kernel.
Dec 13 21:39:13 cxl kernel: Key type encrypted registered'
+ grep -q 'Call Trace'
+ modprobe -r cxl_test
==============================================================================
==================================== 3/4 =====================================
test: ndctl:cxl / cxl-labels.sh
start time: 21:39:20
duration: 3.40s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=250 /bin/bash /data/ndctl/test/cxl-labels.sh
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -Mi
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem2
+ mem=mem2
++ mktemp /tmp/lsa-read-mem2.XXXX
+ lsa_read=/tmp/lsa-read-mem2.L5OU
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem2.L5OU mem2
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem2.L5OU
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem6
+ mem=mem6
++ mktemp /tmp/lsa-read-mem6.XXXX
+ lsa_read=/tmp/lsa-read-mem6.hEps
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem6.hEps mem6
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem6.hEps
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem0
+ mem=mem0
++ mktemp /tmp/lsa-read-mem0.XXXX
+ lsa_read=/tmp/lsa-read-mem0.S8nk
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem0.S8nk mem0
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem0.S8nk
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem4
+ mem=mem4
++ mktemp /tmp/lsa-read-mem4.XXXX
+ lsa_read=/tmp/lsa-read-mem4.sEjn
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem4.sEjn mem4
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem4.sEjn
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem8
+ mem=mem8
++ mktemp /tmp/lsa-read-mem8.XXXX
+ lsa_read=/tmp/lsa-read-mem8.g46l
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem8.g46l mem8
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem8.g46l
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem9
+ mem=mem9
++ mktemp /tmp/lsa-read-mem9.XXXX
+ lsa_read=/tmp/lsa-read-mem9.P8qD
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem9.P8qD mem9
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem9.P8qD
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem1
+ mem=mem1
++ mktemp /tmp/lsa-read-mem1.XXXX
+ lsa_read=/tmp/lsa-read-mem1.GlNK
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem1.GlNK mem1
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem1.GlNK
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem5
+ mem=mem5
++ mktemp /tmp/lsa-read-mem5.XXXX
+ lsa_read=/tmp/lsa-read-mem5.y4QI
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem5.y4QI mem5
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem5.y4QI
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem3
+ mem=mem3
++ mktemp /tmp/lsa-read-mem3.XXXX
+ lsa_read=/tmp/lsa-read-mem3.4847
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem3.4847 mem3
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem3.4847
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem7
+ mem=mem7
++ mktemp /tmp/lsa-read-mem7.XXXX
+ lsa_read=/tmp/lsa-read-mem7.deL8
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem7.deL8 mem7
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem7.deL8
+ readarray -t nmems
++ /data/ndctl/build/ndctl/ndctl list -b cxl_test -Di
++ jq -r '.[].dev'
+ for nmem in ${nmems[@]}
+ test_label_ops nmem1
+ nmem=nmem1
++ mktemp /tmp/lsa-nmem1.XXXX
+ lsa=/tmp/lsa-nmem1.jeHe
++ mktemp /tmp/lsa-read-nmem1.XXXX
+ lsa_read=/tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem1.Hnu9
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00238995 s, 54.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem1.jeHe nmem1
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem1
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00157225 s, 83.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ rm /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ for nmem in ${nmems[@]}
+ test_label_ops nmem3
+ nmem=nmem3
++ mktemp /tmp/lsa-nmem3.XXXX
+ lsa=/tmp/lsa-nmem3.7Ly4
++ mktemp /tmp/lsa-read-nmem3.XXXX
+ lsa_read=/tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem3.RZnA
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00152502 s, 85.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem3.7Ly4 nmem3
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem3
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00143445 s, 91.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ rm /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ for nmem in ${nmems[@]}
+ test_label_ops nmem5
+ nmem=nmem5
++ mktemp /tmp/lsa-nmem5.XXXX
+ lsa=/tmp/lsa-nmem5.UeB3
++ mktemp /tmp/lsa-read-nmem5.XXXX
+ lsa_read=/tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem5.9E0W
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0021845 s, 60.0 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem5.UeB3 nmem5
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem5
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00155322 s, 84.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ rm /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ for nmem in ${nmems[@]}
+ test_label_ops nmem7
+ nmem=nmem7
++ mktemp /tmp/lsa-nmem7.XXXX
+ lsa=/tmp/lsa-nmem7.vd2l
++ mktemp /tmp/lsa-read-nmem7.XXXX
+ lsa_read=/tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem7.QsjU
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0022185 s, 59.1 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem7.vd2l nmem7
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem7
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145473 s, 90.1 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ rm /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ for nmem in ${nmems[@]}
+ test_label_ops nmem9
+ nmem=nmem9
++ mktemp /tmp/lsa-nmem9.XXXX
+ lsa=/tmp/lsa-nmem9.fnSU
++ mktemp /tmp/lsa-read-nmem9.XXXX
+ lsa_read=/tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem9.wATp
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00236822 s, 55.3 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem9.fnSU nmem9
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem9
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00148677 s, 88.2 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ rm /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ for nmem in ${nmems[@]}
+ test_label_ops nmem0
+ nmem=nmem0
++ mktemp /tmp/lsa-nmem0.XXXX
+ lsa=/tmp/lsa-nmem0.XmMO
++ mktemp /tmp/lsa-read-nmem0.XXXX
+ lsa_read=/tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem0.TqFV
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00241734 s, 54.2 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem0.XmMO nmem0
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem0
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00141113 s, 92.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ rm /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ for nmem in ${nmems[@]}
+ test_label_ops nmem2
+ nmem=nmem2
++ mktemp /tmp/lsa-nmem2.XXXX
+ lsa=/tmp/lsa-nmem2.AdX8
++ mktemp /tmp/lsa-read-nmem2.XXXX
+ lsa_read=/tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem2.npC3
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234679 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem2.AdX8 nmem2
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem2
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00139573 s, 93.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ rm /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ for nmem in ${nmems[@]}
+ test_label_ops nmem4
+ nmem=nmem4
++ mktemp /tmp/lsa-nmem4.XXXX
+ lsa=/tmp/lsa-nmem4.zUOl
++ mktemp /tmp/lsa-read-nmem4.XXXX
+ lsa_read=/tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem4.SWG7
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00215404 s, 60.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem4.zUOl nmem4
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem4
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145766 s, 89.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ rm /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ for nmem in ${nmems[@]}
+ test_label_ops nmem6
+ nmem=nmem6
++ mktemp /tmp/lsa-nmem6.XXXX
+ lsa=/tmp/lsa-nmem6.Itxu
++ mktemp /tmp/lsa-read-nmem6.XXXX
+ lsa_read=/tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem6.Gc56
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00235466 s, 55.7 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem6.Itxu nmem6
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem6
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144466 s, 90.7 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ rm /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ for nmem in ${nmems[@]}
+ test_label_ops nmem8
+ nmem=nmem8
++ mktemp /tmp/lsa-nmem8.XXXX
+ lsa=/tmp/lsa-nmem8.YRl9
++ mktemp /tmp/lsa-read-nmem8.XXXX
+ lsa_read=/tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem8.BkKD
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234596 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem8.YRl9 nmem8
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem8
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144887 s, 90.5 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ rm /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ modprobe -r cxl_test
==============================================================================
==================================== 4/4 =====================================
test: ndctl:cxl / cxl-create-region.sh
start time: 21:39:23
duration: 8.14s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test MALLOC_PERTURB_=137 NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-create-region.sh
----------------------------------- stdout -----------------------------------
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -M
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ create_x1_region mem2
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem6
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem0
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem4
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem8
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem9
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem1
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem5
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem3
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem7
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem2
+ slice=268435456
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem2
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem6
+ slice=268435456
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem6
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem0
+ slice=268435456
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem0
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem4
+ slice=268435456
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem4
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem8
+ slice=268435456
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem8
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem9
+ slice=268435456
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem9
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem1
+ slice=268435456
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem5
+ slice=268435456
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem3
+ slice=268435456
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem7
+ slice=268435456
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ modprobe -r cxl_test
==============================================================================
Summary of Failures:
1/4 ndctl:cxl / cxl-topology.sh FAIL 0.96s exit status 1
Ok: 3
Expected Fail: 0
Fail: 1
Unexpected Pass: 0
Skipped: 0
Timeout: 0
Log of Meson test suite run on 2022-12-13T21:39:13.839811
Inherited environment: LANG=C.UTF-8 LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:' TERM=screen.xterm-256color PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MAIL=/var/mail/root LOGNAME=root USER=root HOME=/root SHELL=/bin/bash SUDO_COMMAND='/usr/bin/meson test -C build --suite cxl' SUDO_USER=vagrant SUDO_UID=1000 SUDO_GID=1000
==================================== 1/4 =====================================
test: ndctl:cxl / cxl-topology.sh
start time: 21:39:13
duration: 0.96s
result: exit status 1
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=123 /bin/bash /data/ndctl/test/cxl-topology.sh
----------------------------------- stdout -----------------------------------
test/cxl-topology.sh: failed at line 35
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
No TPM handle discovered.
failed to open file /etc/ndctl/keys/nvdimm-master.blob: No such file or directory
+ udevadm settle
++ ./cxl/cxl list -b cxl_test
+ json='[
{
"bus":"root0",
"provider":"cxl_test"
}
]'
++ jq length
+ count=1
+ (( count == 1 ))
++ jq -r '.[] | .bus'
+ root=root0
+ port_sort='sort_by(.port | .[4:] | tonumber)'
++ ./cxl/cxl list -b cxl_test -BP
+ json='[
{
"bus":"root0",
"provider":"cxl_test",
"ports:root0":[
{
"port":"port1",
"host":"cxl_host_bridge.0",
"depth":1,
"ports:port1":[
{
"port":"port8",
"host":"cxl_switch_uport.2",
"depth":2
},
{
"port":"port4",
"host":"cxl_switch_uport.0",
"depth":2
}
]
},
{
"port":"port3",
"host":"cxl_host_bridge.2",
"depth":1,
"ports:port3":[
{
"port":"port16",
"host":"cxl_switch_uport.4",
"depth":2
}
]
},
{
"port":"port2",
"host":"cxl_host_bridge.1",
"depth":1,
"ports:port2":[
{
"port":"port6",
"host":"cxl_switch_uport.1",
"depth":2
},
{
"port":"port10",
"host":"cxl_switch_uport.3",
"depth":2
}
]
}
]
}
]'
++ jq '.[] | .["ports:root0"] | length'
+ count=3
+ (( count == 2 ))
+ err 35
++ basename /data/ndctl/test/cxl-topology.sh
+ echo test/cxl-topology.sh: failed at line 35
+ '[' -n '' ']'
+ exit 1
==============================================================================
==================================== 2/4 =====================================
test: ndctl:cxl / cxl-region-sysfs.sh
start time: 21:39:14
duration: 5.33s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl MALLOC_PERTURB_=69 DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-region-sysfs.sh
----------------------------------- stdout -----------------------------------
region3 added 8 targets: decoder9.0 decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
region3 released 8 targets: decoder9.0 decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
++ ./cxl/cxl list -b cxl_test -D -d root
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 2) |
.decoder'
+ decoder=decoder0.3
+ readarray -t mem
++ ./cxl/cxl list -M -d decoder0.3
++ jq -r '.[].memdev'
+ readarray -t endpoint
++ ./cxl/cxl reserve-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7 -s 268435456
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_reserve_dpa: reservation completed on 8 mem devices
++ cat /sys/bus/cxl/devices/decoder0.3/create_pmem_region
+ region=region3
+ echo region3
+ uuidgen
+ nr_targets=8
+ echo 8
++ cat /sys/bus/cxl/devices/decoder0.3/interleave_granularity
+ r_ig=4096
+ echo 4096
+ echo 2147483648
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 0) | .target'
+ port_dev0=cxl_host_bridge.0
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 1) | .target'
+ port_dev1=cxl_host_bridge.1
+ readarray -t mem_sort0
++ ./cxl/cxl list -M -p cxl_host_bridge.0
++ jq -r '.[] | .memdev'
+ readarray -t mem_sort1
++ ./cxl/cxl list -M -p cxl_host_bridge.1
++ jq -r '.[] | .memdev'
+ mem_sort=()
+ mem_sort[0]=mem2
+ mem_sort[1]=mem1
+ mem_sort[2]=mem0
+ mem_sort[3]=mem3
+ mem_sort[4]=mem6
+ mem_sort[5]=mem5
+ mem_sort[6]=mem4
+ mem_sort[7]=mem7
+ endpoint=()
+ for i in ${mem_sort[@]}
+ readarray -O 0 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem2
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 1 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem1
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 2 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem0
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 3 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem3
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 4 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem6
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 5 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem5
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 6 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem4
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 7 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem7
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ pos=0
+ for i in ${endpoint[@]}
+ echo decoder9.0
+ pos=1
+ for i in ${endpoint[@]}
+ echo decoder7.0
+ pos=2
+ for i in ${endpoint[@]}
+ echo decoder5.0
+ pos=3
+ for i in ${endpoint[@]}
+ echo decoder11.0
+ pos=4
+ for i in ${endpoint[@]}
+ echo decoder14.0
+ pos=5
+ for i in ${endpoint[@]}
+ echo decoder13.0
+ pos=6
+ for i in ${endpoint[@]}
+ echo decoder12.0
+ pos=7
+ for i in ${endpoint[@]}
+ echo decoder15.0
+ pos=8
+ echo 'region3 added 8 targets: decoder9.0' decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
++ cat /sys/bus/cxl/devices/region3/size
+ region_size=0x80000000
++ cat /sys/bus/cxl/devices/region3/resource
+ region_base=0x3ff110000000
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder9.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder9.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder7.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder7.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder5.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder5.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder11.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder11.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder14.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder14.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder13.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder13.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder12.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder12.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder15.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder15.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ nr_switches=4
+ nr_host_bridges=2
+ nr_switch_decoders=6
++ ./cxl/cxl list -D -r region3 -d switch
+ json='[
{
"decoder":"decoder1.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder8.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder4.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder2.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder6.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder10.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
}
]'
+ readarray -t switch_decoders
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[].decoder'
+ '[' 6 -ne 6 ']'
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder1.0")'
+ decoder='{
"decoder": "decoder1.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=1.0
+ port_id=1
++ ./cxl/cxl list -p 1 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder8.0")'
+ decoder='{
"decoder": "decoder8.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=8.0
+ port_id=8
++ ./cxl/cxl list -p 8 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder4.0")'
+ decoder='{
"decoder": "decoder4.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=4.0
+ port_id=4
++ ./cxl/cxl list -p 4 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder2.0")'
+ decoder='{
"decoder": "decoder2.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=2.0
+ port_id=2
++ ./cxl/cxl list -p 2 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder6.0")'
+ decoder='{
"decoder": "decoder6.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=6.0
+ port_id=6
++ ./cxl/cxl list -p 6 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder10.0")'
+ decoder='{
"decoder": "decoder10.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=10.0
+ port_id=10
++ ./cxl/cxl list -p 10 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ echo 1
+ echo 0
+ pos=0
+ for i in ${endpoint[@]}
+ echo ''
+ pos=1
+ for i in ${endpoint[@]}
+ echo ''
+ pos=2
+ for i in ${endpoint[@]}
+ echo ''
+ pos=3
+ for i in ${endpoint[@]}
+ echo ''
+ pos=4
+ for i in ${endpoint[@]}
+ echo ''
+ pos=5
+ for i in ${endpoint[@]}
+ echo ''
+ pos=6
+ for i in ${endpoint[@]}
+ echo ''
+ pos=7
+ for i in ${endpoint[@]}
+ echo ''
+ pos=8
+ readarray -t endpoint
++ ./cxl/cxl free-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_free_dpa: reservation release completed on 8 mem devices
+ echo 'region3 released 8 targets: decoder9.0' decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
++ journalctl -r -k --since -6s
+ log='Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:15 cxl kernel: cxl_mem mem10: CXL port topology not found
Dec 13 21:39:15 cxl kernel: cxl_mem mem9: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem8: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem7: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem6: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem5: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem4: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem3: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem2: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem1: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem0: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:14 cxl kernel: cxl_core: loading test module taints kernel.
Dec 13 21:39:14 cxl kernel: cxl_core: loading out-of-tree module taints kernel.
Dec 13 21:39:13 cxl kernel: Key type encrypted registered'
+ grep -q 'Call Trace'
+ modprobe -r cxl_test
==============================================================================
==================================== 3/4 =====================================
test: ndctl:cxl / cxl-labels.sh
start time: 21:39:20
duration: 3.40s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=250 /bin/bash /data/ndctl/test/cxl-labels.sh
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -Mi
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem2
+ mem=mem2
++ mktemp /tmp/lsa-read-mem2.XXXX
+ lsa_read=/tmp/lsa-read-mem2.L5OU
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem2.L5OU mem2
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem2.L5OU
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem6
+ mem=mem6
++ mktemp /tmp/lsa-read-mem6.XXXX
+ lsa_read=/tmp/lsa-read-mem6.hEps
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem6.hEps mem6
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem6.hEps
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem0
+ mem=mem0
++ mktemp /tmp/lsa-read-mem0.XXXX
+ lsa_read=/tmp/lsa-read-mem0.S8nk
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem0.S8nk mem0
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem0.S8nk
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem4
+ mem=mem4
++ mktemp /tmp/lsa-read-mem4.XXXX
+ lsa_read=/tmp/lsa-read-mem4.sEjn
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem4.sEjn mem4
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem4.sEjn
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem8
+ mem=mem8
++ mktemp /tmp/lsa-read-mem8.XXXX
+ lsa_read=/tmp/lsa-read-mem8.g46l
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem8.g46l mem8
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem8.g46l
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem9
+ mem=mem9
++ mktemp /tmp/lsa-read-mem9.XXXX
+ lsa_read=/tmp/lsa-read-mem9.P8qD
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem9.P8qD mem9
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem9.P8qD
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem1
+ mem=mem1
++ mktemp /tmp/lsa-read-mem1.XXXX
+ lsa_read=/tmp/lsa-read-mem1.GlNK
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem1.GlNK mem1
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem1.GlNK
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem5
+ mem=mem5
++ mktemp /tmp/lsa-read-mem5.XXXX
+ lsa_read=/tmp/lsa-read-mem5.y4QI
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem5.y4QI mem5
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem5.y4QI
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem3
+ mem=mem3
++ mktemp /tmp/lsa-read-mem3.XXXX
+ lsa_read=/tmp/lsa-read-mem3.4847
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem3.4847 mem3
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem3.4847
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem7
+ mem=mem7
++ mktemp /tmp/lsa-read-mem7.XXXX
+ lsa_read=/tmp/lsa-read-mem7.deL8
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem7.deL8 mem7
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem7.deL8
+ readarray -t nmems
++ /data/ndctl/build/ndctl/ndctl list -b cxl_test -Di
++ jq -r '.[].dev'
+ for nmem in ${nmems[@]}
+ test_label_ops nmem1
+ nmem=nmem1
++ mktemp /tmp/lsa-nmem1.XXXX
+ lsa=/tmp/lsa-nmem1.jeHe
++ mktemp /tmp/lsa-read-nmem1.XXXX
+ lsa_read=/tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem1.Hnu9
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00238995 s, 54.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem1.jeHe nmem1
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem1
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00157225 s, 83.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ rm /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ for nmem in ${nmems[@]}
+ test_label_ops nmem3
+ nmem=nmem3
++ mktemp /tmp/lsa-nmem3.XXXX
+ lsa=/tmp/lsa-nmem3.7Ly4
++ mktemp /tmp/lsa-read-nmem3.XXXX
+ lsa_read=/tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem3.RZnA
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00152502 s, 85.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem3.7Ly4 nmem3
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem3
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00143445 s, 91.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ rm /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ for nmem in ${nmems[@]}
+ test_label_ops nmem5
+ nmem=nmem5
++ mktemp /tmp/lsa-nmem5.XXXX
+ lsa=/tmp/lsa-nmem5.UeB3
++ mktemp /tmp/lsa-read-nmem5.XXXX
+ lsa_read=/tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem5.9E0W
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0021845 s, 60.0 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem5.UeB3 nmem5
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem5
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00155322 s, 84.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ rm /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ for nmem in ${nmems[@]}
+ test_label_ops nmem7
+ nmem=nmem7
++ mktemp /tmp/lsa-nmem7.XXXX
+ lsa=/tmp/lsa-nmem7.vd2l
++ mktemp /tmp/lsa-read-nmem7.XXXX
+ lsa_read=/tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem7.QsjU
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0022185 s, 59.1 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem7.vd2l nmem7
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem7
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145473 s, 90.1 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ rm /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ for nmem in ${nmems[@]}
+ test_label_ops nmem9
+ nmem=nmem9
++ mktemp /tmp/lsa-nmem9.XXXX
+ lsa=/tmp/lsa-nmem9.fnSU
++ mktemp /tmp/lsa-read-nmem9.XXXX
+ lsa_read=/tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem9.wATp
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00236822 s, 55.3 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem9.fnSU nmem9
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem9
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00148677 s, 88.2 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ rm /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ for nmem in ${nmems[@]}
+ test_label_ops nmem0
+ nmem=nmem0
++ mktemp /tmp/lsa-nmem0.XXXX
+ lsa=/tmp/lsa-nmem0.XmMO
++ mktemp /tmp/lsa-read-nmem0.XXXX
+ lsa_read=/tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem0.TqFV
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00241734 s, 54.2 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem0.XmMO nmem0
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem0
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00141113 s, 92.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ rm /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ for nmem in ${nmems[@]}
+ test_label_ops nmem2
+ nmem=nmem2
++ mktemp /tmp/lsa-nmem2.XXXX
+ lsa=/tmp/lsa-nmem2.AdX8
++ mktemp /tmp/lsa-read-nmem2.XXXX
+ lsa_read=/tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem2.npC3
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234679 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem2.AdX8 nmem2
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem2
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00139573 s, 93.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ rm /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ for nmem in ${nmems[@]}
+ test_label_ops nmem4
+ nmem=nmem4
++ mktemp /tmp/lsa-nmem4.XXXX
+ lsa=/tmp/lsa-nmem4.zUOl
++ mktemp /tmp/lsa-read-nmem4.XXXX
+ lsa_read=/tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem4.SWG7
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00215404 s, 60.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem4.zUOl nmem4
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem4
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145766 s, 89.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ rm /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ for nmem in ${nmems[@]}
+ test_label_ops nmem6
+ nmem=nmem6
++ mktemp /tmp/lsa-nmem6.XXXX
+ lsa=/tmp/lsa-nmem6.Itxu
++ mktemp /tmp/lsa-read-nmem6.XXXX
+ lsa_read=/tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem6.Gc56
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00235466 s, 55.7 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem6.Itxu nmem6
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem6
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144466 s, 90.7 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ rm /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ for nmem in ${nmems[@]}
+ test_label_ops nmem8
+ nmem=nmem8
++ mktemp /tmp/lsa-nmem8.XXXX
+ lsa=/tmp/lsa-nmem8.YRl9
++ mktemp /tmp/lsa-read-nmem8.XXXX
+ lsa_read=/tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem8.BkKD
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234596 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem8.YRl9 nmem8
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem8
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144887 s, 90.5 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ rm /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ modprobe -r cxl_test
==============================================================================
==================================== 4/4 =====================================
test: ndctl:cxl / cxl-create-region.sh
start time: 21:39:23
duration: 8.14s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test MALLOC_PERTURB_=137 NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-create-region.sh
----------------------------------- stdout -----------------------------------
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -M
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ create_x1_region mem2
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem6
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem0
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem4
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem8
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem9
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem1
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem5
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem3
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem7
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem2
+ slice=268435456
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem2
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem6
+ slice=268435456
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem6
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem0
+ slice=268435456
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem0
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem4
+ slice=268435456
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem4
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem8
+ slice=268435456
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem8
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem9
+ slice=268435456
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem9
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem1
+ slice=268435456
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem5
+ slice=268435456
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem3
+ slice=268435456
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem7
+ slice=268435456
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ modprobe -r cxl_test
==============================================================================
Summary of Failures:
1/4 ndctl:cxl / cxl-topology.sh FAIL 0.96s exit status 1
Ok: 3
Expected Fail: 0
Fail: 1
Unexpected Pass: 0
Skipped: 0
Timeout: 0
Log of Meson test suite run on 2022-12-13T21:39:13.839811
Inherited environment: LANG=C.UTF-8 LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:' TERM=screen.xterm-256color PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MAIL=/var/mail/root LOGNAME=root USER=root HOME=/root SHELL=/bin/bash SUDO_COMMAND='/usr/bin/meson test -C build --suite cxl' SUDO_USER=vagrant SUDO_UID=1000 SUDO_GID=1000
==================================== 1/4 =====================================
test: ndctl:cxl / cxl-topology.sh
start time: 21:39:13
duration: 0.96s
result: exit status 1
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=123 /bin/bash /data/ndctl/test/cxl-topology.sh
----------------------------------- stdout -----------------------------------
test/cxl-topology.sh: failed at line 35
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
No TPM handle discovered.
failed to open file /etc/ndctl/keys/nvdimm-master.blob: No such file or directory
+ udevadm settle
++ ./cxl/cxl list -b cxl_test
+ json='[
{
"bus":"root0",
"provider":"cxl_test"
}
]'
++ jq length
+ count=1
+ (( count == 1 ))
++ jq -r '.[] | .bus'
+ root=root0
+ port_sort='sort_by(.port | .[4:] | tonumber)'
++ ./cxl/cxl list -b cxl_test -BP
+ json='[
{
"bus":"root0",
"provider":"cxl_test",
"ports:root0":[
{
"port":"port1",
"host":"cxl_host_bridge.0",
"depth":1,
"ports:port1":[
{
"port":"port8",
"host":"cxl_switch_uport.2",
"depth":2
},
{
"port":"port4",
"host":"cxl_switch_uport.0",
"depth":2
}
]
},
{
"port":"port3",
"host":"cxl_host_bridge.2",
"depth":1,
"ports:port3":[
{
"port":"port16",
"host":"cxl_switch_uport.4",
"depth":2
}
]
},
{
"port":"port2",
"host":"cxl_host_bridge.1",
"depth":1,
"ports:port2":[
{
"port":"port6",
"host":"cxl_switch_uport.1",
"depth":2
},
{
"port":"port10",
"host":"cxl_switch_uport.3",
"depth":2
}
]
}
]
}
]'
++ jq '.[] | .["ports:root0"] | length'
+ count=3
+ (( count == 2 ))
+ err 35
++ basename /data/ndctl/test/cxl-topology.sh
+ echo test/cxl-topology.sh: failed at line 35
+ '[' -n '' ']'
+ exit 1
==============================================================================
==================================== 2/4 =====================================
test: ndctl:cxl / cxl-region-sysfs.sh
start time: 21:39:14
duration: 5.33s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl MALLOC_PERTURB_=69 DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-region-sysfs.sh
----------------------------------- stdout -----------------------------------
region3 added 8 targets: decoder9.0 decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
region3 released 8 targets: decoder9.0 decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
++ ./cxl/cxl list -b cxl_test -D -d root
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 2) |
.decoder'
+ decoder=decoder0.3
+ readarray -t mem
++ ./cxl/cxl list -M -d decoder0.3
++ jq -r '.[].memdev'
+ readarray -t endpoint
++ ./cxl/cxl reserve-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7 -s 268435456
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_reserve_dpa: reservation completed on 8 mem devices
++ cat /sys/bus/cxl/devices/decoder0.3/create_pmem_region
+ region=region3
+ echo region3
+ uuidgen
+ nr_targets=8
+ echo 8
++ cat /sys/bus/cxl/devices/decoder0.3/interleave_granularity
+ r_ig=4096
+ echo 4096
+ echo 2147483648
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 0) | .target'
+ port_dev0=cxl_host_bridge.0
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 1) | .target'
+ port_dev1=cxl_host_bridge.1
+ readarray -t mem_sort0
++ ./cxl/cxl list -M -p cxl_host_bridge.0
++ jq -r '.[] | .memdev'
+ readarray -t mem_sort1
++ ./cxl/cxl list -M -p cxl_host_bridge.1
++ jq -r '.[] | .memdev'
+ mem_sort=()
+ mem_sort[0]=mem2
+ mem_sort[1]=mem1
+ mem_sort[2]=mem0
+ mem_sort[3]=mem3
+ mem_sort[4]=mem6
+ mem_sort[5]=mem5
+ mem_sort[6]=mem4
+ mem_sort[7]=mem7
+ endpoint=()
+ for i in ${mem_sort[@]}
+ readarray -O 0 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem2
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 1 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem1
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 2 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem0
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 3 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem3
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 4 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem6
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 5 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem5
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 6 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem4
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 7 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem7
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ pos=0
+ for i in ${endpoint[@]}
+ echo decoder9.0
+ pos=1
+ for i in ${endpoint[@]}
+ echo decoder7.0
+ pos=2
+ for i in ${endpoint[@]}
+ echo decoder5.0
+ pos=3
+ for i in ${endpoint[@]}
+ echo decoder11.0
+ pos=4
+ for i in ${endpoint[@]}
+ echo decoder14.0
+ pos=5
+ for i in ${endpoint[@]}
+ echo decoder13.0
+ pos=6
+ for i in ${endpoint[@]}
+ echo decoder12.0
+ pos=7
+ for i in ${endpoint[@]}
+ echo decoder15.0
+ pos=8
+ echo 'region3 added 8 targets: decoder9.0' decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
++ cat /sys/bus/cxl/devices/region3/size
+ region_size=0x80000000
++ cat /sys/bus/cxl/devices/region3/resource
+ region_base=0x3ff110000000
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder9.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder9.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder7.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder7.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder5.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder5.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder11.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder11.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder14.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder14.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder13.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder13.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder12.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder12.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder15.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder15.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ nr_switches=4
+ nr_host_bridges=2
+ nr_switch_decoders=6
++ ./cxl/cxl list -D -r region3 -d switch
+ json='[
{
"decoder":"decoder1.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder8.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder4.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder2.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder6.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder10.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
}
]'
+ readarray -t switch_decoders
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[].decoder'
+ '[' 6 -ne 6 ']'
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder1.0")'
+ decoder='{
"decoder": "decoder1.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=1.0
+ port_id=1
++ ./cxl/cxl list -p 1 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder8.0")'
+ decoder='{
"decoder": "decoder8.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=8.0
+ port_id=8
++ ./cxl/cxl list -p 8 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder4.0")'
+ decoder='{
"decoder": "decoder4.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=4.0
+ port_id=4
++ ./cxl/cxl list -p 4 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder2.0")'
+ decoder='{
"decoder": "decoder2.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=2.0
+ port_id=2
++ ./cxl/cxl list -p 2 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder6.0")'
+ decoder='{
"decoder": "decoder6.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=6.0
+ port_id=6
++ ./cxl/cxl list -p 6 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder10.0")'
+ decoder='{
"decoder": "decoder10.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=10.0
+ port_id=10
++ ./cxl/cxl list -p 10 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ echo 1
+ echo 0
+ pos=0
+ for i in ${endpoint[@]}
+ echo ''
+ pos=1
+ for i in ${endpoint[@]}
+ echo ''
+ pos=2
+ for i in ${endpoint[@]}
+ echo ''
+ pos=3
+ for i in ${endpoint[@]}
+ echo ''
+ pos=4
+ for i in ${endpoint[@]}
+ echo ''
+ pos=5
+ for i in ${endpoint[@]}
+ echo ''
+ pos=6
+ for i in ${endpoint[@]}
+ echo ''
+ pos=7
+ for i in ${endpoint[@]}
+ echo ''
+ pos=8
+ readarray -t endpoint
++ ./cxl/cxl free-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_free_dpa: reservation release completed on 8 mem devices
+ echo 'region3 released 8 targets: decoder9.0' decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
++ journalctl -r -k --since -6s
+ log='Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:15 cxl kernel: cxl_mem mem10: CXL port topology not found
Dec 13 21:39:15 cxl kernel: cxl_mem mem9: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem8: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem7: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem6: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem5: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem4: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem3: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem2: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem1: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem0: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:14 cxl kernel: cxl_core: loading test module taints kernel.
Dec 13 21:39:14 cxl kernel: cxl_core: loading out-of-tree module taints kernel.
Dec 13 21:39:13 cxl kernel: Key type encrypted registered'
+ grep -q 'Call Trace'
+ modprobe -r cxl_test
==============================================================================
==================================== 3/4 =====================================
test: ndctl:cxl / cxl-labels.sh
start time: 21:39:20
duration: 3.40s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=250 /bin/bash /data/ndctl/test/cxl-labels.sh
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -Mi
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem2
+ mem=mem2
++ mktemp /tmp/lsa-read-mem2.XXXX
+ lsa_read=/tmp/lsa-read-mem2.L5OU
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem2.L5OU mem2
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem2.L5OU
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem6
+ mem=mem6
++ mktemp /tmp/lsa-read-mem6.XXXX
+ lsa_read=/tmp/lsa-read-mem6.hEps
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem6.hEps mem6
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem6.hEps
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem0
+ mem=mem0
++ mktemp /tmp/lsa-read-mem0.XXXX
+ lsa_read=/tmp/lsa-read-mem0.S8nk
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem0.S8nk mem0
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem0.S8nk
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem4
+ mem=mem4
++ mktemp /tmp/lsa-read-mem4.XXXX
+ lsa_read=/tmp/lsa-read-mem4.sEjn
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem4.sEjn mem4
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem4.sEjn
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem8
+ mem=mem8
++ mktemp /tmp/lsa-read-mem8.XXXX
+ lsa_read=/tmp/lsa-read-mem8.g46l
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem8.g46l mem8
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem8.g46l
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem9
+ mem=mem9
++ mktemp /tmp/lsa-read-mem9.XXXX
+ lsa_read=/tmp/lsa-read-mem9.P8qD
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem9.P8qD mem9
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem9.P8qD
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem1
+ mem=mem1
++ mktemp /tmp/lsa-read-mem1.XXXX
+ lsa_read=/tmp/lsa-read-mem1.GlNK
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem1.GlNK mem1
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem1.GlNK
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem5
+ mem=mem5
++ mktemp /tmp/lsa-read-mem5.XXXX
+ lsa_read=/tmp/lsa-read-mem5.y4QI
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem5.y4QI mem5
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem5.y4QI
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem3
+ mem=mem3
++ mktemp /tmp/lsa-read-mem3.XXXX
+ lsa_read=/tmp/lsa-read-mem3.4847
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem3.4847 mem3
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem3.4847
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem7
+ mem=mem7
++ mktemp /tmp/lsa-read-mem7.XXXX
+ lsa_read=/tmp/lsa-read-mem7.deL8
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem7.deL8 mem7
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem7.deL8
+ readarray -t nmems
++ /data/ndctl/build/ndctl/ndctl list -b cxl_test -Di
++ jq -r '.[].dev'
+ for nmem in ${nmems[@]}
+ test_label_ops nmem1
+ nmem=nmem1
++ mktemp /tmp/lsa-nmem1.XXXX
+ lsa=/tmp/lsa-nmem1.jeHe
++ mktemp /tmp/lsa-read-nmem1.XXXX
+ lsa_read=/tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem1.Hnu9
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00238995 s, 54.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem1.jeHe nmem1
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem1
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00157225 s, 83.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ rm /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ for nmem in ${nmems[@]}
+ test_label_ops nmem3
+ nmem=nmem3
++ mktemp /tmp/lsa-nmem3.XXXX
+ lsa=/tmp/lsa-nmem3.7Ly4
++ mktemp /tmp/lsa-read-nmem3.XXXX
+ lsa_read=/tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem3.RZnA
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00152502 s, 85.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem3.7Ly4 nmem3
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem3
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00143445 s, 91.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ rm /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ for nmem in ${nmems[@]}
+ test_label_ops nmem5
+ nmem=nmem5
++ mktemp /tmp/lsa-nmem5.XXXX
+ lsa=/tmp/lsa-nmem5.UeB3
++ mktemp /tmp/lsa-read-nmem5.XXXX
+ lsa_read=/tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem5.9E0W
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0021845 s, 60.0 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem5.UeB3 nmem5
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem5
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00155322 s, 84.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ rm /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ for nmem in ${nmems[@]}
+ test_label_ops nmem7
+ nmem=nmem7
++ mktemp /tmp/lsa-nmem7.XXXX
+ lsa=/tmp/lsa-nmem7.vd2l
++ mktemp /tmp/lsa-read-nmem7.XXXX
+ lsa_read=/tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem7.QsjU
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0022185 s, 59.1 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem7.vd2l nmem7
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem7
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145473 s, 90.1 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ rm /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ for nmem in ${nmems[@]}
+ test_label_ops nmem9
+ nmem=nmem9
++ mktemp /tmp/lsa-nmem9.XXXX
+ lsa=/tmp/lsa-nmem9.fnSU
++ mktemp /tmp/lsa-read-nmem9.XXXX
+ lsa_read=/tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem9.wATp
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00236822 s, 55.3 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem9.fnSU nmem9
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem9
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00148677 s, 88.2 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ rm /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ for nmem in ${nmems[@]}
+ test_label_ops nmem0
+ nmem=nmem0
++ mktemp /tmp/lsa-nmem0.XXXX
+ lsa=/tmp/lsa-nmem0.XmMO
++ mktemp /tmp/lsa-read-nmem0.XXXX
+ lsa_read=/tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem0.TqFV
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00241734 s, 54.2 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem0.XmMO nmem0
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem0
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00141113 s, 92.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ rm /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ for nmem in ${nmems[@]}
+ test_label_ops nmem2
+ nmem=nmem2
++ mktemp /tmp/lsa-nmem2.XXXX
+ lsa=/tmp/lsa-nmem2.AdX8
++ mktemp /tmp/lsa-read-nmem2.XXXX
+ lsa_read=/tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem2.npC3
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234679 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem2.AdX8 nmem2
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem2
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00139573 s, 93.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ rm /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ for nmem in ${nmems[@]}
+ test_label_ops nmem4
+ nmem=nmem4
++ mktemp /tmp/lsa-nmem4.XXXX
+ lsa=/tmp/lsa-nmem4.zUOl
++ mktemp /tmp/lsa-read-nmem4.XXXX
+ lsa_read=/tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem4.SWG7
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00215404 s, 60.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem4.zUOl nmem4
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem4
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145766 s, 89.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ rm /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ for nmem in ${nmems[@]}
+ test_label_ops nmem6
+ nmem=nmem6
++ mktemp /tmp/lsa-nmem6.XXXX
+ lsa=/tmp/lsa-nmem6.Itxu
++ mktemp /tmp/lsa-read-nmem6.XXXX
+ lsa_read=/tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem6.Gc56
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00235466 s, 55.7 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem6.Itxu nmem6
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem6
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144466 s, 90.7 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ rm /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ for nmem in ${nmems[@]}
+ test_label_ops nmem8
+ nmem=nmem8
++ mktemp /tmp/lsa-nmem8.XXXX
+ lsa=/tmp/lsa-nmem8.YRl9
++ mktemp /tmp/lsa-read-nmem8.XXXX
+ lsa_read=/tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem8.BkKD
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234596 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem8.YRl9 nmem8
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem8
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144887 s, 90.5 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ rm /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ modprobe -r cxl_test
==============================================================================
==================================== 4/4 =====================================
test: ndctl:cxl / cxl-create-region.sh
start time: 21:39:23
duration: 8.14s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test MALLOC_PERTURB_=137 NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-create-region.sh
----------------------------------- stdout -----------------------------------
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -M
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ create_x1_region mem2
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem6
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem0
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem4
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem8
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem9
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem1
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem5
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem3
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem7
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem2
+ slice=268435456
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem2
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem6
+ slice=268435456
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem6
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem0
+ slice=268435456
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem0
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem4
+ slice=268435456
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem4
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem8
+ slice=268435456
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem8
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem9
+ slice=268435456
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem9
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem1
+ slice=268435456
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem5
+ slice=268435456
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem3
+ slice=268435456
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem7
+ slice=268435456
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ modprobe -r cxl_test
==============================================================================
Summary of Failures:
1/4 ndctl:cxl / cxl-topology.sh FAIL 0.96s exit status 1
Ok: 3
Expected Fail: 0
Fail: 1
Unexpected Pass: 0
Skipped: 0
Timeout: 0
Log of Meson test suite run on 2022-12-13T21:39:13.839811
Inherited environment: LANG=C.UTF-8 LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:' TERM=screen.xterm-256color PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MAIL=/var/mail/root LOGNAME=root USER=root HOME=/root SHELL=/bin/bash SUDO_COMMAND='/usr/bin/meson test -C build --suite cxl' SUDO_USER=vagrant SUDO_UID=1000 SUDO_GID=1000
==================================== 1/4 =====================================
test: ndctl:cxl / cxl-topology.sh
start time: 21:39:13
duration: 0.96s
result: exit status 1
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=123 /bin/bash /data/ndctl/test/cxl-topology.sh
----------------------------------- stdout -----------------------------------
test/cxl-topology.sh: failed at line 35
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
No TPM handle discovered.
failed to open file /etc/ndctl/keys/nvdimm-master.blob: No such file or directory
+ udevadm settle
++ ./cxl/cxl list -b cxl_test
+ json='[
{
"bus":"root0",
"provider":"cxl_test"
}
]'
++ jq length
+ count=1
+ (( count == 1 ))
++ jq -r '.[] | .bus'
+ root=root0
+ port_sort='sort_by(.port | .[4:] | tonumber)'
++ ./cxl/cxl list -b cxl_test -BP
+ json='[
{
"bus":"root0",
"provider":"cxl_test",
"ports:root0":[
{
"port":"port1",
"host":"cxl_host_bridge.0",
"depth":1,
"ports:port1":[
{
"port":"port8",
"host":"cxl_switch_uport.2",
"depth":2
},
{
"port":"port4",
"host":"cxl_switch_uport.0",
"depth":2
}
]
},
{
"port":"port3",
"host":"cxl_host_bridge.2",
"depth":1,
"ports:port3":[
{
"port":"port16",
"host":"cxl_switch_uport.4",
"depth":2
}
]
},
{
"port":"port2",
"host":"cxl_host_bridge.1",
"depth":1,
"ports:port2":[
{
"port":"port6",
"host":"cxl_switch_uport.1",
"depth":2
},
{
"port":"port10",
"host":"cxl_switch_uport.3",
"depth":2
}
]
}
]
}
]'
++ jq '.[] | .["ports:root0"] | length'
+ count=3
+ (( count == 2 ))
+ err 35
++ basename /data/ndctl/test/cxl-topology.sh
+ echo test/cxl-topology.sh: failed at line 35
+ '[' -n '' ']'
+ exit 1
==============================================================================
==================================== 2/4 =====================================
test: ndctl:cxl / cxl-region-sysfs.sh
start time: 21:39:14
duration: 5.33s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl MALLOC_PERTURB_=69 DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-region-sysfs.sh
----------------------------------- stdout -----------------------------------
region3 added 8 targets: decoder9.0 decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
region3 released 8 targets: decoder9.0 decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
++ ./cxl/cxl list -b cxl_test -D -d root
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 2) |
.decoder'
+ decoder=decoder0.3
+ readarray -t mem
++ ./cxl/cxl list -M -d decoder0.3
++ jq -r '.[].memdev'
+ readarray -t endpoint
++ ./cxl/cxl reserve-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7 -s 268435456
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_reserve_dpa: reservation completed on 8 mem devices
++ cat /sys/bus/cxl/devices/decoder0.3/create_pmem_region
+ region=region3
+ echo region3
+ uuidgen
+ nr_targets=8
+ echo 8
++ cat /sys/bus/cxl/devices/decoder0.3/interleave_granularity
+ r_ig=4096
+ echo 4096
+ echo 2147483648
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 0) | .target'
+ port_dev0=cxl_host_bridge.0
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 1) | .target'
+ port_dev1=cxl_host_bridge.1
+ readarray -t mem_sort0
++ ./cxl/cxl list -M -p cxl_host_bridge.0
++ jq -r '.[] | .memdev'
+ readarray -t mem_sort1
++ ./cxl/cxl list -M -p cxl_host_bridge.1
++ jq -r '.[] | .memdev'
+ mem_sort=()
+ mem_sort[0]=mem2
+ mem_sort[1]=mem1
+ mem_sort[2]=mem0
+ mem_sort[3]=mem3
+ mem_sort[4]=mem6
+ mem_sort[5]=mem5
+ mem_sort[6]=mem4
+ mem_sort[7]=mem7
+ endpoint=()
+ for i in ${mem_sort[@]}
+ readarray -O 0 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem2
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 1 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem1
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 2 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem0
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 3 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem3
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 4 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem6
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 5 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem5
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 6 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem4
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 7 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem7
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ pos=0
+ for i in ${endpoint[@]}
+ echo decoder9.0
+ pos=1
+ for i in ${endpoint[@]}
+ echo decoder7.0
+ pos=2
+ for i in ${endpoint[@]}
+ echo decoder5.0
+ pos=3
+ for i in ${endpoint[@]}
+ echo decoder11.0
+ pos=4
+ for i in ${endpoint[@]}
+ echo decoder14.0
+ pos=5
+ for i in ${endpoint[@]}
+ echo decoder13.0
+ pos=6
+ for i in ${endpoint[@]}
+ echo decoder12.0
+ pos=7
+ for i in ${endpoint[@]}
+ echo decoder15.0
+ pos=8
+ echo 'region3 added 8 targets: decoder9.0' decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
++ cat /sys/bus/cxl/devices/region3/size
+ region_size=0x80000000
++ cat /sys/bus/cxl/devices/region3/resource
+ region_base=0x3ff110000000
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder9.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder9.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder7.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder7.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder5.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder5.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder11.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder11.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder14.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder14.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder13.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder13.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder12.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder12.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder15.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder15.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ nr_switches=4
+ nr_host_bridges=2
+ nr_switch_decoders=6
++ ./cxl/cxl list -D -r region3 -d switch
+ json='[
{
"decoder":"decoder1.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder8.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder4.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder2.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder6.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder10.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
}
]'
+ readarray -t switch_decoders
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[].decoder'
+ '[' 6 -ne 6 ']'
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder1.0")'
+ decoder='{
"decoder": "decoder1.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=1.0
+ port_id=1
++ ./cxl/cxl list -p 1 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder8.0")'
+ decoder='{
"decoder": "decoder8.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=8.0
+ port_id=8
++ ./cxl/cxl list -p 8 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder4.0")'
+ decoder='{
"decoder": "decoder4.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=4.0
+ port_id=4
++ ./cxl/cxl list -p 4 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder2.0")'
+ decoder='{
"decoder": "decoder2.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=2.0
+ port_id=2
++ ./cxl/cxl list -p 2 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder6.0")'
+ decoder='{
"decoder": "decoder6.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=6.0
+ port_id=6
++ ./cxl/cxl list -p 6 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder10.0")'
+ decoder='{
"decoder": "decoder10.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=10.0
+ port_id=10
++ ./cxl/cxl list -p 10 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ echo 1
+ echo 0
+ pos=0
+ for i in ${endpoint[@]}
+ echo ''
+ pos=1
+ for i in ${endpoint[@]}
+ echo ''
+ pos=2
+ for i in ${endpoint[@]}
+ echo ''
+ pos=3
+ for i in ${endpoint[@]}
+ echo ''
+ pos=4
+ for i in ${endpoint[@]}
+ echo ''
+ pos=5
+ for i in ${endpoint[@]}
+ echo ''
+ pos=6
+ for i in ${endpoint[@]}
+ echo ''
+ pos=7
+ for i in ${endpoint[@]}
+ echo ''
+ pos=8
+ readarray -t endpoint
++ ./cxl/cxl free-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_free_dpa: reservation release completed on 8 mem devices
+ echo 'region3 released 8 targets: decoder9.0' decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
++ journalctl -r -k --since -6s
+ log='Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:15 cxl kernel: cxl_mem mem10: CXL port topology not found
Dec 13 21:39:15 cxl kernel: cxl_mem mem9: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem8: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem7: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem6: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem5: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem4: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem3: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem2: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem1: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem0: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:14 cxl kernel: cxl_core: loading test module taints kernel.
Dec 13 21:39:14 cxl kernel: cxl_core: loading out-of-tree module taints kernel.
Dec 13 21:39:13 cxl kernel: Key type encrypted registered'
+ grep -q 'Call Trace'
+ modprobe -r cxl_test
==============================================================================
==================================== 3/4 =====================================
test: ndctl:cxl / cxl-labels.sh
start time: 21:39:20
duration: 3.40s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=250 /bin/bash /data/ndctl/test/cxl-labels.sh
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -Mi
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem2
+ mem=mem2
++ mktemp /tmp/lsa-read-mem2.XXXX
+ lsa_read=/tmp/lsa-read-mem2.L5OU
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem2.L5OU mem2
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem2.L5OU
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem6
+ mem=mem6
++ mktemp /tmp/lsa-read-mem6.XXXX
+ lsa_read=/tmp/lsa-read-mem6.hEps
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem6.hEps mem6
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem6.hEps
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem0
+ mem=mem0
++ mktemp /tmp/lsa-read-mem0.XXXX
+ lsa_read=/tmp/lsa-read-mem0.S8nk
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem0.S8nk mem0
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem0.S8nk
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem4
+ mem=mem4
++ mktemp /tmp/lsa-read-mem4.XXXX
+ lsa_read=/tmp/lsa-read-mem4.sEjn
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem4.sEjn mem4
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem4.sEjn
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem8
+ mem=mem8
++ mktemp /tmp/lsa-read-mem8.XXXX
+ lsa_read=/tmp/lsa-read-mem8.g46l
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem8.g46l mem8
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem8.g46l
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem9
+ mem=mem9
++ mktemp /tmp/lsa-read-mem9.XXXX
+ lsa_read=/tmp/lsa-read-mem9.P8qD
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem9.P8qD mem9
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem9.P8qD
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem1
+ mem=mem1
++ mktemp /tmp/lsa-read-mem1.XXXX
+ lsa_read=/tmp/lsa-read-mem1.GlNK
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem1.GlNK mem1
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem1.GlNK
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem5
+ mem=mem5
++ mktemp /tmp/lsa-read-mem5.XXXX
+ lsa_read=/tmp/lsa-read-mem5.y4QI
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem5.y4QI mem5
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem5.y4QI
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem3
+ mem=mem3
++ mktemp /tmp/lsa-read-mem3.XXXX
+ lsa_read=/tmp/lsa-read-mem3.4847
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem3.4847 mem3
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem3.4847
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem7
+ mem=mem7
++ mktemp /tmp/lsa-read-mem7.XXXX
+ lsa_read=/tmp/lsa-read-mem7.deL8
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem7.deL8 mem7
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem7.deL8
+ readarray -t nmems
++ /data/ndctl/build/ndctl/ndctl list -b cxl_test -Di
++ jq -r '.[].dev'
+ for nmem in ${nmems[@]}
+ test_label_ops nmem1
+ nmem=nmem1
++ mktemp /tmp/lsa-nmem1.XXXX
+ lsa=/tmp/lsa-nmem1.jeHe
++ mktemp /tmp/lsa-read-nmem1.XXXX
+ lsa_read=/tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem1.Hnu9
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00238995 s, 54.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem1.jeHe nmem1
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem1
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00157225 s, 83.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ rm /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ for nmem in ${nmems[@]}
+ test_label_ops nmem3
+ nmem=nmem3
++ mktemp /tmp/lsa-nmem3.XXXX
+ lsa=/tmp/lsa-nmem3.7Ly4
++ mktemp /tmp/lsa-read-nmem3.XXXX
+ lsa_read=/tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem3.RZnA
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00152502 s, 85.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem3.7Ly4 nmem3
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem3
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00143445 s, 91.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ rm /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ for nmem in ${nmems[@]}
+ test_label_ops nmem5
+ nmem=nmem5
++ mktemp /tmp/lsa-nmem5.XXXX
+ lsa=/tmp/lsa-nmem5.UeB3
++ mktemp /tmp/lsa-read-nmem5.XXXX
+ lsa_read=/tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem5.9E0W
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0021845 s, 60.0 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem5.UeB3 nmem5
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem5
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00155322 s, 84.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ rm /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ for nmem in ${nmems[@]}
+ test_label_ops nmem7
+ nmem=nmem7
++ mktemp /tmp/lsa-nmem7.XXXX
+ lsa=/tmp/lsa-nmem7.vd2l
++ mktemp /tmp/lsa-read-nmem7.XXXX
+ lsa_read=/tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem7.QsjU
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0022185 s, 59.1 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem7.vd2l nmem7
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem7
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145473 s, 90.1 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ rm /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ for nmem in ${nmems[@]}
+ test_label_ops nmem9
+ nmem=nmem9
++ mktemp /tmp/lsa-nmem9.XXXX
+ lsa=/tmp/lsa-nmem9.fnSU
++ mktemp /tmp/lsa-read-nmem9.XXXX
+ lsa_read=/tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem9.wATp
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00236822 s, 55.3 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem9.fnSU nmem9
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem9
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00148677 s, 88.2 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ rm /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ for nmem in ${nmems[@]}
+ test_label_ops nmem0
+ nmem=nmem0
++ mktemp /tmp/lsa-nmem0.XXXX
+ lsa=/tmp/lsa-nmem0.XmMO
++ mktemp /tmp/lsa-read-nmem0.XXXX
+ lsa_read=/tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem0.TqFV
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00241734 s, 54.2 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem0.XmMO nmem0
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem0
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00141113 s, 92.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ rm /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ for nmem in ${nmems[@]}
+ test_label_ops nmem2
+ nmem=nmem2
++ mktemp /tmp/lsa-nmem2.XXXX
+ lsa=/tmp/lsa-nmem2.AdX8
++ mktemp /tmp/lsa-read-nmem2.XXXX
+ lsa_read=/tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem2.npC3
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234679 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem2.AdX8 nmem2
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem2
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00139573 s, 93.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ rm /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ for nmem in ${nmems[@]}
+ test_label_ops nmem4
+ nmem=nmem4
++ mktemp /tmp/lsa-nmem4.XXXX
+ lsa=/tmp/lsa-nmem4.zUOl
++ mktemp /tmp/lsa-read-nmem4.XXXX
+ lsa_read=/tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem4.SWG7
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00215404 s, 60.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem4.zUOl nmem4
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem4
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145766 s, 89.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ rm /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ for nmem in ${nmems[@]}
+ test_label_ops nmem6
+ nmem=nmem6
++ mktemp /tmp/lsa-nmem6.XXXX
+ lsa=/tmp/lsa-nmem6.Itxu
++ mktemp /tmp/lsa-read-nmem6.XXXX
+ lsa_read=/tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem6.Gc56
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00235466 s, 55.7 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem6.Itxu nmem6
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem6
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144466 s, 90.7 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ rm /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ for nmem in ${nmems[@]}
+ test_label_ops nmem8
+ nmem=nmem8
++ mktemp /tmp/lsa-nmem8.XXXX
+ lsa=/tmp/lsa-nmem8.YRl9
++ mktemp /tmp/lsa-read-nmem8.XXXX
+ lsa_read=/tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem8.BkKD
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234596 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem8.YRl9 nmem8
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem8
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144887 s, 90.5 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ rm /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ modprobe -r cxl_test
==============================================================================
==================================== 4/4 =====================================
test: ndctl:cxl / cxl-create-region.sh
start time: 21:39:23
duration: 8.14s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test MALLOC_PERTURB_=137 NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-create-region.sh
----------------------------------- stdout -----------------------------------
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -M
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ create_x1_region mem2
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem6
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem0
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem4
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem8
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem9
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem1
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem5
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem3
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem7
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem2
+ slice=268435456
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem2
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem6
+ slice=268435456
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem6
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem0
+ slice=268435456
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem0
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem4
+ slice=268435456
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem4
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem8
+ slice=268435456
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem8
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem9
+ slice=268435456
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem9
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem1
+ slice=268435456
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem5
+ slice=268435456
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem3
+ slice=268435456
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem7
+ slice=268435456
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ modprobe -r cxl_test
==============================================================================
Summary of Failures:
1/4 ndctl:cxl / cxl-topology.sh FAIL 0.96s exit status 1
Ok: 3
Expected Fail: 0
Fail: 1
Unexpected Pass: 0
Skipped: 0
Timeout: 0
Log of Meson test suite run on 2022-12-13T21:39:13.839811
Inherited environment: LANG=C.UTF-8 LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:' TERM=screen.xterm-256color PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MAIL=/var/mail/root LOGNAME=root USER=root HOME=/root SHELL=/bin/bash SUDO_COMMAND='/usr/bin/meson test -C build --suite cxl' SUDO_USER=vagrant SUDO_UID=1000 SUDO_GID=1000
==================================== 1/4 =====================================
test: ndctl:cxl / cxl-topology.sh
start time: 21:39:13
duration: 0.96s
result: exit status 1
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=123 /bin/bash /data/ndctl/test/cxl-topology.sh
----------------------------------- stdout -----------------------------------
test/cxl-topology.sh: failed at line 35
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
No TPM handle discovered.
failed to open file /etc/ndctl/keys/nvdimm-master.blob: No such file or directory
+ udevadm settle
++ ./cxl/cxl list -b cxl_test
+ json='[
{
"bus":"root0",
"provider":"cxl_test"
}
]'
++ jq length
+ count=1
+ (( count == 1 ))
++ jq -r '.[] | .bus'
+ root=root0
+ port_sort='sort_by(.port | .[4:] | tonumber)'
++ ./cxl/cxl list -b cxl_test -BP
+ json='[
{
"bus":"root0",
"provider":"cxl_test",
"ports:root0":[
{
"port":"port1",
"host":"cxl_host_bridge.0",
"depth":1,
"ports:port1":[
{
"port":"port8",
"host":"cxl_switch_uport.2",
"depth":2
},
{
"port":"port4",
"host":"cxl_switch_uport.0",
"depth":2
}
]
},
{
"port":"port3",
"host":"cxl_host_bridge.2",
"depth":1,
"ports:port3":[
{
"port":"port16",
"host":"cxl_switch_uport.4",
"depth":2
}
]
},
{
"port":"port2",
"host":"cxl_host_bridge.1",
"depth":1,
"ports:port2":[
{
"port":"port6",
"host":"cxl_switch_uport.1",
"depth":2
},
{
"port":"port10",
"host":"cxl_switch_uport.3",
"depth":2
}
]
}
]
}
]'
++ jq '.[] | .["ports:root0"] | length'
+ count=3
+ (( count == 2 ))
+ err 35
++ basename /data/ndctl/test/cxl-topology.sh
+ echo test/cxl-topology.sh: failed at line 35
+ '[' -n '' ']'
+ exit 1
==============================================================================
==================================== 2/4 =====================================
test: ndctl:cxl / cxl-region-sysfs.sh
start time: 21:39:14
duration: 5.33s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl MALLOC_PERTURB_=69 DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-region-sysfs.sh
----------------------------------- stdout -----------------------------------
region3 added 8 targets: decoder9.0 decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
region3 released 8 targets: decoder9.0 decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
++ ./cxl/cxl list -b cxl_test -D -d root
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 2) |
.decoder'
+ decoder=decoder0.3
+ readarray -t mem
++ ./cxl/cxl list -M -d decoder0.3
++ jq -r '.[].memdev'
+ readarray -t endpoint
++ ./cxl/cxl reserve-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7 -s 268435456
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_reserve_dpa: reservation completed on 8 mem devices
++ cat /sys/bus/cxl/devices/decoder0.3/create_pmem_region
+ region=region3
+ echo region3
+ uuidgen
+ nr_targets=8
+ echo 8
++ cat /sys/bus/cxl/devices/decoder0.3/interleave_granularity
+ r_ig=4096
+ echo 4096
+ echo 2147483648
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 0) | .target'
+ port_dev0=cxl_host_bridge.0
++ ./cxl/cxl list -T -d decoder0.3
++ jq -r '.[] |
.targets | .[] | select(.position == 1) | .target'
+ port_dev1=cxl_host_bridge.1
+ readarray -t mem_sort0
++ ./cxl/cxl list -M -p cxl_host_bridge.0
++ jq -r '.[] | .memdev'
+ readarray -t mem_sort1
++ ./cxl/cxl list -M -p cxl_host_bridge.1
++ jq -r '.[] | .memdev'
+ mem_sort=()
+ mem_sort[0]=mem2
+ mem_sort[1]=mem1
+ mem_sort[2]=mem0
+ mem_sort[3]=mem3
+ mem_sort[4]=mem6
+ mem_sort[5]=mem5
+ mem_sort[6]=mem4
+ mem_sort[7]=mem7
+ endpoint=()
+ for i in ${mem_sort[@]}
+ readarray -O 0 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem2
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 1 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem1
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 2 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem0
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 3 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem3
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 4 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem6
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 5 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem5
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 6 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem4
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ for i in ${mem_sort[@]}
+ readarray -O 7 -t endpoint
++ ./cxl/cxl list -Di -d endpoint -m mem7
++ jq -r '.[] |
select(.mode == "pmem") | .decoder'
+ pos=0
+ for i in ${endpoint[@]}
+ echo decoder9.0
+ pos=1
+ for i in ${endpoint[@]}
+ echo decoder7.0
+ pos=2
+ for i in ${endpoint[@]}
+ echo decoder5.0
+ pos=3
+ for i in ${endpoint[@]}
+ echo decoder11.0
+ pos=4
+ for i in ${endpoint[@]}
+ echo decoder14.0
+ pos=5
+ for i in ${endpoint[@]}
+ echo decoder13.0
+ pos=6
+ for i in ${endpoint[@]}
+ echo decoder12.0
+ pos=7
+ for i in ${endpoint[@]}
+ echo decoder15.0
+ pos=8
+ echo 'region3 added 8 targets: decoder9.0' decoder7.0 decoder5.0 decoder11.0 decoder14.0 decoder13.0 decoder12.0 decoder15.0
++ cat /sys/bus/cxl/devices/region3/size
+ region_size=0x80000000
++ cat /sys/bus/cxl/devices/region3/resource
+ region_base=0x3ff110000000
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder9.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder9.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder9.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder7.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder7.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder7.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder5.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder5.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder5.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder11.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder11.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder11.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder14.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder14.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder14.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder13.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder13.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder13.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder12.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder12.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder12.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ for i in ${endpoint[@]}
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_ways
+ iw=8
++ cat /sys/bus/cxl/devices/decoder15.0/interleave_granularity
+ ig=4096
+ '[' 8 -ne 8 ']'
+ '[' 4096 -ne '4096]'
/data/ndctl/test/cxl-region-sysfs.sh: line 107: [: missing `]'
++ cat /sys/bus/cxl/devices/decoder15.0/size
+ sz=0x80000000
++ cat /sys/bus/cxl/devices/decoder15.0/start
+ res=0x3ff110000000
+ '[' 0x80000000 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 111: [: 0x80000000: integer expression expected
+ '[' 0x3ff110000000 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 112: [: 0x3ff110000000: integer expression expected
+ nr_switches=4
+ nr_host_bridges=2
+ nr_switch_decoders=6
++ ./cxl/cxl list -D -r region3 -d switch
+ json='[
{
"decoder":"decoder1.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder8.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder4.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder2.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":8192,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder6.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
},
{
"decoder":"decoder10.0",
"resource":70304588103680,
"size":2147483648,
"interleave_ways":2,
"interleave_granularity":16384,
"region":"region3",
"nr_targets":2
}
]'
+ readarray -t switch_decoders
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[].decoder'
+ '[' 6 -ne 6 ']'
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder1.0")'
+ decoder='{
"decoder": "decoder1.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=1.0
+ port_id=1
++ ./cxl/cxl list -p 1 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder1.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder8.0")'
+ decoder='{
"decoder": "decoder8.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=8.0
+ port_id=8
++ ./cxl/cxl list -p 8 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder8.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder4.0")'
+ decoder='{
"decoder": "decoder4.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=4.0
+ port_id=4
++ ./cxl/cxl list -p 4 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder4.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder2.0")'
+ decoder='{
"decoder": "decoder2.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 8192,
"region": "region3",
"nr_targets": 2
}'
+ id=2.0
+ port_id=2
++ ./cxl/cxl list -p 2 -S
++ jq -r '.[].depth'
+ depth=1
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=8192
+ '[' 2 -ne 2 ']'
+ '[' 8192 -ne 8192 ']'
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder2.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 8192, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder6.0")'
+ decoder='{
"decoder": "decoder6.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=6.0
+ port_id=6
++ ./cxl/cxl list -p 6 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder6.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ for i in ${switch_decoders[@]}
++ echo '[' '{' '"decoder":"decoder1.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder8.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder4.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder2.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":8192,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder6.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '},' '{' '"decoder":"decoder10.0",' '"resource":70304588103680,' '"size":2147483648,' '"interleave_ways":2,' '"interleave_granularity":16384,' '"region":"region3",' '"nr_targets":2' '}' ']'
++ jq -r '.[] | select(.decoder == "decoder10.0")'
+ decoder='{
"decoder": "decoder10.0",
"resource": 70304588103680,
"size": 2147483648,
"interleave_ways": 2,
"interleave_granularity": 16384,
"region": "region3",
"nr_targets": 2
}'
+ id=10.0
+ port_id=10
++ ./cxl/cxl list -p 10 -S
++ jq -r '.[].depth'
+ depth=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_ways
+ iw=2
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .interleave_granularity
+ ig=16384
+ '[' 2 -ne 2 ']'
+ '[' 16384 -ne 16384 ']'
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .resource
+ res=70304588103680
++ echo '{' '"decoder":' '"decoder10.0",' '"resource":' 70304588103680, '"size":' 2147483648, '"interleave_ways":' 2, '"interleave_granularity":' 16384, '"region":' '"region3",' '"nr_targets":' 2 '}'
++ jq -r .size
+ sz=2147483648
+ '[' 2147483648 -ne 0x80000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 141: [: 0x80000000: integer expression expected
+ '[' 70304588103680 -ne 0x3ff110000000 ']'
/data/ndctl/test/cxl-region-sysfs.sh: line 143: [: 0x3ff110000000: integer expression expected
+ echo 1
+ echo 0
+ pos=0
+ for i in ${endpoint[@]}
+ echo ''
+ pos=1
+ for i in ${endpoint[@]}
+ echo ''
+ pos=2
+ for i in ${endpoint[@]}
+ echo ''
+ pos=3
+ for i in ${endpoint[@]}
+ echo ''
+ pos=4
+ for i in ${endpoint[@]}
+ echo ''
+ pos=5
+ for i in ${endpoint[@]}
+ echo ''
+ pos=6
+ for i in ${endpoint[@]}
+ echo ''
+ pos=7
+ for i in ${endpoint[@]}
+ echo ''
+ pos=8
+ readarray -t endpoint
++ ./cxl/cxl free-dpa -t pmem mem2 mem6 mem0 mem4 mem1 mem5 mem3 mem7
++ jq -r '.[] | .decoder.decoder'
cxl memdev: cmd_free_dpa: reservation release completed on 8 mem devices
+ echo 'region3 released 8 targets: decoder9.0' decoder14.0 decoder5.0 decoder12.0 decoder7.0 decoder13.0 decoder11.0 decoder15.0
++ journalctl -r -k --since -6s
+ log='Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:15 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:15 cxl kernel: cxl_mem mem10: CXL port topology not found
Dec 13 21:39:15 cxl kernel: cxl_mem mem9: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem8: at cxl_root_port.4 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem7: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem6: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem5: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem4: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem3: at cxl_root_port.3 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem2: at cxl_root_port.2 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem1: at cxl_root_port.1 no parent for dport: platform
Dec 13 21:39:15 cxl kernel: cxl_mem mem0: at cxl_root_port.0 no parent for dport: platform
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.3: host supports CXL (restricted)
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.2: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.1: host supports CXL
Dec 13 21:39:14 cxl kernel: platform cxl_host_bridge.0: host supports CXL
Dec 13 21:39:14 cxl kernel: cxl_core: loading test module taints kernel.
Dec 13 21:39:14 cxl kernel: cxl_core: loading out-of-tree module taints kernel.
Dec 13 21:39:13 cxl kernel: Key type encrypted registered'
+ grep -q 'Call Trace'
+ modprobe -r cxl_test
==============================================================================
==================================== 3/4 =====================================
test: ndctl:cxl / cxl-labels.sh
start time: 21:39:20
duration: 3.40s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test NDCTL=/data/ndctl/build/ndctl/ndctl MALLOC_PERTURB_=250 /bin/bash /data/ndctl/test/cxl-labels.sh
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -Mi
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem2
+ mem=mem2
++ mktemp /tmp/lsa-read-mem2.XXXX
+ lsa_read=/tmp/lsa-read-mem2.L5OU
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem2.L5OU mem2
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem2.L5OU
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem6
+ mem=mem6
++ mktemp /tmp/lsa-read-mem6.XXXX
+ lsa_read=/tmp/lsa-read-mem6.hEps
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem6.hEps mem6
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem6.hEps
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem0
+ mem=mem0
++ mktemp /tmp/lsa-read-mem0.XXXX
+ lsa_read=/tmp/lsa-read-mem0.S8nk
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem0.S8nk mem0
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem0.S8nk
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem4
+ mem=mem4
++ mktemp /tmp/lsa-read-mem4.XXXX
+ lsa_read=/tmp/lsa-read-mem4.sEjn
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem4.sEjn mem4
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem4.sEjn
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem8
+ mem=mem8
++ mktemp /tmp/lsa-read-mem8.XXXX
+ lsa_read=/tmp/lsa-read-mem8.g46l
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem8.g46l mem8
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem8.g46l
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem9
+ mem=mem9
++ mktemp /tmp/lsa-read-mem9.XXXX
+ lsa_read=/tmp/lsa-read-mem9.P8qD
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem9.P8qD mem9
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem9.P8qD
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem1
+ mem=mem1
++ mktemp /tmp/lsa-read-mem1.XXXX
+ lsa_read=/tmp/lsa-read-mem1.GlNK
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem1.GlNK mem1
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem1.GlNK
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem5
+ mem=mem5
++ mktemp /tmp/lsa-read-mem5.XXXX
+ lsa_read=/tmp/lsa-read-mem5.y4QI
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem5.y4QI mem5
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem5.y4QI
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem3
+ mem=mem3
++ mktemp /tmp/lsa-read-mem3.XXXX
+ lsa_read=/tmp/lsa-read-mem3.4847
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem3.4847 mem3
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem3.4847
+ for mem in ${mems[@]}
+ test_label_ops_cxl mem7
+ mem=mem7
++ mktemp /tmp/lsa-read-mem7.XXXX
+ lsa_read=/tmp/lsa-read-mem7.deL8
+ ./cxl/cxl read-labels -o /tmp/lsa-read-mem7.deL8 mem7
cxl memdev: cmd_read_labels: read 1 mem
+ rm /tmp/lsa-read-mem7.deL8
+ readarray -t nmems
++ /data/ndctl/build/ndctl/ndctl list -b cxl_test -Di
++ jq -r '.[].dev'
+ for nmem in ${nmems[@]}
+ test_label_ops nmem1
+ nmem=nmem1
++ mktemp /tmp/lsa-nmem1.XXXX
+ lsa=/tmp/lsa-nmem1.jeHe
++ mktemp /tmp/lsa-read-nmem1.XXXX
+ lsa_read=/tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem1.Hnu9
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00238995 s, 54.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem1.jeHe nmem1
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem1
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem1.jeHe bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00157225 s, 83.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem1.Hnu9 nmem1
read 1 nmem
+ diff /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ rm /tmp/lsa-nmem1.jeHe /tmp/lsa-read-nmem1.Hnu9
+ for nmem in ${nmems[@]}
+ test_label_ops nmem3
+ nmem=nmem3
++ mktemp /tmp/lsa-nmem3.XXXX
+ lsa=/tmp/lsa-nmem3.7Ly4
++ mktemp /tmp/lsa-read-nmem3.XXXX
+ lsa_read=/tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem3.RZnA
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00152502 s, 85.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem3.7Ly4 nmem3
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem3
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem3.7Ly4 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00143445 s, 91.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem3.RZnA nmem3
read 1 nmem
+ diff /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ rm /tmp/lsa-nmem3.7Ly4 /tmp/lsa-read-nmem3.RZnA
+ for nmem in ${nmems[@]}
+ test_label_ops nmem5
+ nmem=nmem5
++ mktemp /tmp/lsa-nmem5.XXXX
+ lsa=/tmp/lsa-nmem5.UeB3
++ mktemp /tmp/lsa-read-nmem5.XXXX
+ lsa_read=/tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem5.9E0W
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0021845 s, 60.0 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem5.UeB3 nmem5
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem5
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem5.UeB3 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00155322 s, 84.4 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem5.9E0W nmem5
read 1 nmem
+ diff /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ rm /tmp/lsa-nmem5.UeB3 /tmp/lsa-read-nmem5.9E0W
+ for nmem in ${nmems[@]}
+ test_label_ops nmem7
+ nmem=nmem7
++ mktemp /tmp/lsa-nmem7.XXXX
+ lsa=/tmp/lsa-nmem7.vd2l
++ mktemp /tmp/lsa-read-nmem7.XXXX
+ lsa_read=/tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem7.QsjU
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.0022185 s, 59.1 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem7.vd2l nmem7
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem7
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem7.vd2l bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145473 s, 90.1 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem7.QsjU nmem7
read 1 nmem
+ diff /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ rm /tmp/lsa-nmem7.vd2l /tmp/lsa-read-nmem7.QsjU
+ for nmem in ${nmems[@]}
+ test_label_ops nmem9
+ nmem=nmem9
++ mktemp /tmp/lsa-nmem9.XXXX
+ lsa=/tmp/lsa-nmem9.fnSU
++ mktemp /tmp/lsa-read-nmem9.XXXX
+ lsa_read=/tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem9.wATp
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00236822 s, 55.3 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem9.fnSU nmem9
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem9
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem9.fnSU bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00148677 s, 88.2 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem9.wATp nmem9
read 1 nmem
+ diff /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ rm /tmp/lsa-nmem9.fnSU /tmp/lsa-read-nmem9.wATp
+ for nmem in ${nmems[@]}
+ test_label_ops nmem0
+ nmem=nmem0
++ mktemp /tmp/lsa-nmem0.XXXX
+ lsa=/tmp/lsa-nmem0.XmMO
++ mktemp /tmp/lsa-read-nmem0.XXXX
+ lsa_read=/tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem0.TqFV
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00241734 s, 54.2 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem0.XmMO nmem0
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem0
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem0.XmMO bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00141113 s, 92.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem0.TqFV nmem0
read 1 nmem
+ diff /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ rm /tmp/lsa-nmem0.XmMO /tmp/lsa-read-nmem0.TqFV
+ for nmem in ${nmems[@]}
+ test_label_ops nmem2
+ nmem=nmem2
++ mktemp /tmp/lsa-nmem2.XXXX
+ lsa=/tmp/lsa-nmem2.AdX8
++ mktemp /tmp/lsa-read-nmem2.XXXX
+ lsa_read=/tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem2.npC3
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234679 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem2.AdX8 nmem2
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem2
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem2.AdX8 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00139573 s, 93.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem2.npC3 nmem2
read 1 nmem
+ diff /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ rm /tmp/lsa-nmem2.AdX8 /tmp/lsa-read-nmem2.npC3
+ for nmem in ${nmems[@]}
+ test_label_ops nmem4
+ nmem=nmem4
++ mktemp /tmp/lsa-nmem4.XXXX
+ lsa=/tmp/lsa-nmem4.zUOl
++ mktemp /tmp/lsa-read-nmem4.XXXX
+ lsa_read=/tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem4.SWG7
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00215404 s, 60.8 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem4.zUOl nmem4
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem4
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem4.zUOl bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00145766 s, 89.9 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem4.SWG7 nmem4
read 1 nmem
+ diff /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ rm /tmp/lsa-nmem4.zUOl /tmp/lsa-read-nmem4.SWG7
+ for nmem in ${nmems[@]}
+ test_label_ops nmem6
+ nmem=nmem6
++ mktemp /tmp/lsa-nmem6.XXXX
+ lsa=/tmp/lsa-nmem6.Itxu
++ mktemp /tmp/lsa-read-nmem6.XXXX
+ lsa_read=/tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem6.Gc56
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00235466 s, 55.7 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem6.Itxu nmem6
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem6
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem6.Itxu bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144466 s, 90.7 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem6.Gc56 nmem6
read 1 nmem
+ diff /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ rm /tmp/lsa-nmem6.Itxu /tmp/lsa-read-nmem6.Gc56
+ for nmem in ${nmems[@]}
+ test_label_ops nmem8
+ nmem=nmem8
++ mktemp /tmp/lsa-nmem8.XXXX
+ lsa=/tmp/lsa-nmem8.YRl9
++ mktemp /tmp/lsa-read-nmem8.XXXX
+ lsa_read=/tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
++ stat -c %s /tmp/lsa-read-nmem8.BkKD
+ lsa_size=131072
+ dd if=/dev/urandom of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00234596 s, 55.9 MB/s
+ /data/ndctl/build/ndctl/ndctl write-labels -i /tmp/lsa-nmem8.YRl9 nmem8
wrote 1 nmem
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ /data/ndctl/build/ndctl/ndctl zero-labels nmem8
zeroed 1 nmem
+ dd if=/dev/zero of=/tmp/lsa-nmem8.YRl9 bs=131072 count=1
1+0 records in
1+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00144887 s, 90.5 MB/s
+ /data/ndctl/build/ndctl/ndctl read-labels -o /tmp/lsa-read-nmem8.BkKD nmem8
read 1 nmem
+ diff /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ rm /tmp/lsa-nmem8.YRl9 /tmp/lsa-read-nmem8.BkKD
+ modprobe -r cxl_test
==============================================================================
==================================== 4/4 =====================================
test: ndctl:cxl / cxl-create-region.sh
start time: 21:39:23
duration: 8.14s
result: exit status 0
command: TEST_PATH=/data/ndctl/build/test DAXCTL=/data/ndctl/build/daxctl/daxctl DATA_PATH=/data/ndctl/test MALLOC_PERTURB_=137 NDCTL=/data/ndctl/build/ndctl/ndctl /bin/bash /data/ndctl/test/cxl-create-region.sh
----------------------------------- stdout -----------------------------------
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region2
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
created 4 subregions:
region4
region6
region7
region8
no suitable decoder found for mem1, skipping
no suitable decoder found for mem5, skipping
no suitable decoder found for mem3, skipping
no suitable decoder found for mem7, skipping
----------------------------------- stderr -----------------------------------
+ trap 'err $LINENO' ERR
+ check_prereq jq
+ command -v jq
+ modprobe -r cxl_test
+ modprobe cxl_test
+ udevadm settle
+ readarray -t mems
++ ./cxl/cxl list -b cxl_test -M
++ jq -r '.[].memdev'
+ for mem in ${mems[@]}
+ create_x1_region mem2
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem2
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem6
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem6
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem0
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem0
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem4
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region2
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region2
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.2 -m mem4
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region2
+ [[ ! -n region2 ]]
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem8
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem8
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem9
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ ./cxl/cxl disable-region --bus=cxl_test region4
cxl region: cmd_disable_region: disabled 1 region
+ ./cxl/cxl enable-region --bus=cxl_test region4
cxl region: cmd_enable_region: enabled 1 region
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
++ ./cxl/cxl create-region -d decoder0.4 -m mem9
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ region=region4
+ [[ ! -n region4 ]]
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ for mem in ${mems[@]}
+ create_x1_region mem1
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem5
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem3
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_x1_region mem7
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem2
+ slice=268435456
+ mem=mem2
++ ./cxl/cxl list -b cxl_test -D -d root -m mem2
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem2
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem2 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem6
+ slice=268435456
+ mem=mem6
++ ./cxl/cxl list -b cxl_test -D -d root -m mem6
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem6
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem6 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem0
+ slice=268435456
+ mem=mem0
++ ./cxl/cxl list -b cxl_test -D -d root -m mem0
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem0
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem0 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem4
+ slice=268435456
+ mem=mem4
++ ./cxl/cxl list -b cxl_test -D -d root -m mem4
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.2
+ [[ ! -n decoder0.2 ]]
++ ./cxl/cxl list -m mem4
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region2
+ [[ ! -n region2 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.2 -m mem4 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region2
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region2
+ [[ -n region2 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region2
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem8
+ slice=268435456
+ mem=mem8
++ ./cxl/cxl list -b cxl_test -D -d root -m mem8
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem8
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem8 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem9
+ slice=268435456
+ mem=mem9
++ ./cxl/cxl list -b cxl_test -D -d root -m mem9
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=decoder0.4
+ [[ ! -n decoder0.4 ]]
++ ./cxl/cxl list -m mem9
++ jq -r '.[].pmem_size'
+ size=1073741824
+ [[ ! -n 1073741824 ]]
+ num_regions=4
+ declare -a regions
+ (( i = 0 ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region4
+ [[ ! -n region4 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region6
+ [[ ! -n region6 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region7
+ [[ ! -n region7 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
++ ./cxl/cxl create-region -d decoder0.4 -m mem9 -s 268435456
++ jq -r .region
cxl region: cmd_create_region: created 1 region
+ regions[$i]=region8
+ [[ ! -n region8 ]]
+ udevadm settle
+ (( i++ ))
+ (( i < num_regions ))
+ echo 'created 4 subregions:'
+ (( i = 0 ))
+ (( i < num_regions ))
+ echo region4
+ (( i++ ))
+ (( i < num_regions ))
+ echo region6
+ (( i++ ))
+ (( i < num_regions ))
+ echo region7
+ (( i++ ))
+ (( i < num_regions ))
+ echo region8
+ (( i++ ))
+ (( i < num_regions ))
+ (( i = (num_regions - 1) ))
+ (( i >= 0 ))
+ destroy_regions region8
+ [[ -n region8 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region8
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region7
+ [[ -n region7 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region7
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region6
+ [[ -n region6 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region6
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ destroy_regions region4
+ [[ -n region4 ]]
+ ./cxl/cxl destroy-region -f -b cxl_test region4
cxl region: cmd_destroy_region: destroyed 1 region
+ (( i-- ))
+ (( i >= 0 ))
+ for mem in ${mems[@]}
+ create_subregions mem1
+ slice=268435456
+ mem=mem1
++ ./cxl/cxl list -b cxl_test -D -d root -m mem1
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem1, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem5
+ slice=268435456
+ mem=mem5
++ ./cxl/cxl list -b cxl_test -D -d root -m mem5
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem5, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem3
+ slice=268435456
+ mem=mem3
++ ./cxl/cxl list -b cxl_test -D -d root -m mem3
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem3, skipping'
+ return
+ for mem in ${mems[@]}
+ create_subregions mem7
+ slice=268435456
+ mem=mem7
++ ./cxl/cxl list -b cxl_test -D -d root -m mem7
++ jq -r '.[] |
select(.pmem_capable == true) |
select(.nr_targets == 1) |
.decoder'
+ decoder=
+ [[ ! -n '' ]]
+ echo 'no suitable decoder found for mem7, skipping'
+ return
+ modprobe -r cxl_test
==============================================================================
Summary of Failures:
1/4 ndctl:cxl / cxl-topology.sh FAIL 0.96s exit status 1
Ok: 3
Expected Fail: 0
Fail: 1
Unexpected Pass: 0
Skipped: 0
Timeout: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment