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