@@ -49,6 +49,31 @@ Verify ttyUSB glob pattern device discovery and allocation
49
49
50
50
[Teardown] TtyUSB Glob Test Teardown
51
51
52
+ Verify FUSE device allocation and accessibility
53
+ [Documentation] Verifies FUSE device configuration, allocation, and accessibility in pods
54
+ [Tags] fuse-device
55
+ [Setup] Enable And Configure GDP ${GDP_CONFIG_FUSE_COUNT }
56
+ Wait Until Device Is Allocatable 10 fuse
57
+ Oc Create -f ./assets/generic-device-plugin/fuse-test-pod.yaml -n ${NAMESPACE }
58
+
59
+ Oc Wait -n ${NAMESPACE } pod/fuse-test-pod --for=condition=Ready --timeout=120s
60
+
61
+ # Verify /dev/fuse is accessible in the pod
62
+ ${fuse_device } = Oc Exec fuse-test-pod ls -l /dev/fuse
63
+ Should Contain ${fuse_device } /dev/fuse
64
+
65
+ # Verify node allocation shows 4 FUSE devices allocated
66
+ ${node } = Run With Kubeconfig oc get node -o=name
67
+ ${node_name } = Remove String ${node } node/
68
+ ${describe_output } = Run With Kubeconfig oc describe node ${node_name }
69
+ ${allocated_line } = Get Lines Containing String ${describe_output } device.microshift.io/fuse
70
+ ${allocation_matches } = Get Regexp Matches
71
+ ... ${allocated_line }
72
+ ... device\\.microshift\\.io/fuse\\s+(\\d+)\\s+(\\d+)
73
+ ... 1 2
74
+ Should Be Equal As Integers ${allocation_matches } [0 ][0] 4
75
+ Should Be Equal As Integers ${allocation_matches } [0 ][1] 4
76
+
52
77
53
78
*** Keywords ***
54
79
GDP Test Setup
@@ -132,20 +157,20 @@ Create Test Job With Modified Script
132
157
133
158
Wait Until Device Is Allocatable
134
159
[Documentation] Waits until device device.microshift.io/fakeserial is allocatable
135
- [Arguments] ${expected_count } =1
160
+ [Arguments] ${expected_count } =1 ${ device_type } =fakeserial
136
161
${node } = Run With Kubeconfig oc get node -o=name
137
162
${node_name } = Remove String ${node } node/
138
163
Wait Until Keyword Succeeds 60s 5s
139
- ... Device Should Be Allocatable ${node_name } ${expected_count }
164
+ ... Device Should Be Allocatable ${node_name } ${expected_count } ${ device_type }
140
165
141
166
Device Should Be Allocatable
142
- [Documentation] Checks if device device.microshift.io/fakeserial is allocatable
143
- [Arguments] ${node_name } ${expected_count } =1
167
+ [Documentation] Checks if specified device is allocatable
168
+ [Arguments] ${node_name } ${expected_count } =1 ${ device_type } =fakeserial
144
169
${device_amount } = Oc Get JsonPath
145
170
... node
146
171
... ${EMPTY }
147
172
... ${node_name }
148
- ... .status.allocatable.device\\.microshift\\.io/fakeserial
173
+ ... .status.allocatable.device\\.microshift\\.io/${ device_type }
149
174
Should Be Equal As Integers ${device_amount } ${expected_count }
150
175
151
176
Wait For Job Completion And Check Logs
0 commit comments