Line data Source code
1 :
2 : struct device;
3 :
4 : void *ldv_dev_get_drvdata(const struct device *dev);
5 : int ldv_dev_set_drvdata(struct device *dev, void *data);
6 :
7 : struct spi_master;
8 : struct device;
9 : struct spi_master *ldv_spi_alloc_master(struct device *host, unsigned size);
10 :
11 : #include <linux/ldv/err.h>
12 :
13 : #include <linux/types.h>
14 : void *ldv_kzalloc(size_t size, gfp_t flags);
15 :
16 : struct clk;
17 :
18 : extern void ldv_clk_disable(struct clk *clk);
19 : extern int ldv_clk_enable(void);
20 :
21 : #include <linux/ldv/common.h>
22 : #include <linux/ldv/irq.h>
23 : #include <verifier/common.h>
24 : #include <verifier/nondet.h>
25 : #include <verifier/memory.h>
26 : #include <verifier/thread.h>
27 :
28 : #include <linux/cdev.h>
29 : #include <linux/miscdevice.h>
30 : #include <linux/fs.h>
31 : #include <linux/seq_file.h>
32 : #include <linux/pagemap.h>
33 :
34 :
35 : struct ldv_struct_character_driver_scenario_1 {
36 : struct file_operations *arg0;
37 : int signal_pending;
38 : };
39 1 :
40 : struct ldv_struct_insmod_17 {
41 : int signal_pending;
42 : };
43 1 :
44 : struct ldv_struct_traverse_kernel_items_scenario_3 {
45 : struct seq_file *arg0;
46 : struct seq_operations *arg1;
47 : int signal_pending;
48 : };
49 :
50 : /* EMG Function declarations */
51 : void ldv_bus_pattern_scenario_16(void *);
52 : void ldv_bus_pattern_scenario_callback_16_9(int (*)(char *), char *);
53 : void ldv_character_driver_scenario_1(void *);
54 : void ldv_character_driver_scenario_2(void *);
55 : void ldv_character_driver_scenario_callback_1_21(loff_t (*)(struct file *, loff_t , int), struct file *, long long int, int);
56 : void ldv_character_driver_scenario_callback_1_24(int (*)(struct file *, struct vm_area_struct *), struct file *, struct vm_area_struct *);
57 : void ldv_character_driver_scenario_callback_1_25(ssize_t (*)(struct file *, char *, size_t , loff_t *), struct file *, char *, long unsigned int, loff_t *);
58 : void ldv_character_driver_scenario_callback_1_28(long int (*)(struct file *, unsigned int, long unsigned int), struct file *, unsigned int, long unsigned int);
59 : void ldv_character_driver_scenario_callback_1_5(long int (*)(struct file *, unsigned int, long unsigned int), struct file *, unsigned int, long unsigned int);
60 : void ldv_character_driver_scenario_callback_2_21(loff_t (*)(struct file *, loff_t , int), struct file *, long long int, int);
61 : void ldv_character_driver_scenario_callback_2_24(int (*)(struct file *, struct vm_area_struct *), struct file *, struct vm_area_struct *);
62 : void ldv_character_driver_scenario_callback_2_25(ssize_t (*)(struct file *, char *, size_t , loff_t *), struct file *, char *, long unsigned int, loff_t *);
63 : void ldv_character_driver_scenario_callback_2_28(long int (*)(struct file *, unsigned int, long unsigned int), struct file *, unsigned int, long unsigned int);
64 : void ldv_character_driver_scenario_callback_2_5(long int (*)(struct file *, unsigned int, long unsigned int), struct file *, unsigned int, long unsigned int);
65 : int ldv_character_driver_scenario_probe_1_13(int (*)(struct inode *, struct file *), struct inode *, struct file *);
66 : int ldv_character_driver_scenario_probe_2_13(int (*)(struct inode *, struct file *), struct inode *, struct file *);
67 : void ldv_character_driver_scenario_release_1_2(int (*)(struct inode *, struct file *), struct inode *, struct file *);
68 : void ldv_character_driver_scenario_release_2_2(int (*)(struct inode *, struct file *), struct inode *, struct file *);
69 : void ldv_character_driver_scenario_write_1_4(ssize_t (*)(struct file *, char *, size_t , loff_t *), struct file *, char *, long unsigned int, loff_t *);
70 : void ldv_character_driver_scenario_write_2_4(ssize_t (*)(struct file *, char *, size_t , loff_t *), struct file *, char *, long unsigned int, loff_t *);
71 : void ldv_dispatch_default_deregister_2_17_3(void);
72 : void ldv_dispatch_default_deregister_4_17_4(void);
73 : void ldv_dispatch_default_deregister_5_17_5(void);
74 : void ldv_dispatch_default_deregister_6_17_6(void);
75 : void ldv_dispatch_default_register_5_17_8(void);
76 : void ldv_dispatch_default_register_6_17_7(void);
77 : void ldv_dispatch_insmod_deregister_20_2(void);
78 : void ldv_dispatch_insmod_register_20_3(void);
79 : void ldv_dispatch_register_18_1(struct seq_file *, struct seq_operations *);
80 : void ldv_dispatch_register_19_3(struct file_operations *);
81 : int ldv_emg_register_chrdev(unsigned int, char *, struct file_operations *);
82 : int ldv_emg_seq_open(struct file *, struct seq_operations *);
83 : void ldv_insmod_17(void *);
84 : int ldv_insmod_fbmem_init_17_12(int (*)(void));
85 : void ldv_main_20(void *);
86 : void ldv_random_containerless_scenario_10(void *);
87 : void ldv_random_containerless_scenario_11(void *);
88 : void ldv_random_containerless_scenario_12(void *);
89 : void ldv_random_containerless_scenario_13(void *);
90 : void ldv_random_containerless_scenario_14(void *);
91 : void ldv_random_containerless_scenario_15(void *);
92 : void ldv_random_containerless_scenario_4(void *);
93 : void ldv_random_containerless_scenario_5(void *);
94 : void ldv_random_containerless_scenario_6(void *);
95 : void ldv_random_containerless_scenario_7(void *);
96 : void ldv_random_containerless_scenario_8(void *);
97 : void ldv_random_containerless_scenario_9(void *);
98 : extern void ldv_random_containerless_scenario_callback_10_10(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
99 : extern void ldv_random_containerless_scenario_callback_10_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
100 : extern void ldv_random_containerless_scenario_callback_11_10(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
101 : extern void ldv_random_containerless_scenario_callback_11_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
102 : extern void ldv_random_containerless_scenario_callback_12_10(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
103 : extern void ldv_random_containerless_scenario_callback_12_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
104 : extern void ldv_random_containerless_scenario_callback_13_10(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
105 : extern void ldv_random_containerless_scenario_callback_13_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
106 : extern void ldv_random_containerless_scenario_callback_14_10(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
107 : extern void ldv_random_containerless_scenario_callback_14_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
108 : extern void ldv_random_containerless_scenario_callback_15_10(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
109 : extern void ldv_random_containerless_scenario_callback_15_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
110 : extern void ldv_random_containerless_scenario_callback_4_10(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
111 : extern void ldv_random_containerless_scenario_callback_4_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
112 : extern void ldv_random_containerless_scenario_callback_5_10(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
113 : extern void ldv_random_containerless_scenario_callback_5_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
114 : extern void ldv_random_containerless_scenario_callback_6_10(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
115 : extern void ldv_random_containerless_scenario_callback_6_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
116 : extern void ldv_random_containerless_scenario_callback_7_10(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
117 : extern void ldv_random_containerless_scenario_callback_7_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
118 : extern void ldv_random_containerless_scenario_callback_8_10(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
119 : extern void ldv_random_containerless_scenario_callback_8_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
120 : extern void ldv_random_containerless_scenario_callback_9_10(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
121 : extern void ldv_random_containerless_scenario_callback_9_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
122 : void ldv_traverse_kernel_items_scenario_3(void *);
123 : void *ldv_traverse_kernel_items_scenario_next_3_7(void *(*)(struct seq_file *, void *, loff_t *), struct seq_file *, void *, loff_t *);
124 : void ldv_traverse_kernel_items_scenario_show_3_6(int (*)(struct seq_file *, void *), struct seq_file *, void *);
125 : void *ldv_traverse_kernel_items_scenario_start_3_13(void *(*)(struct seq_file *, loff_t *), struct seq_file *, loff_t *);
126 : void ldv_traverse_kernel_items_scenario_stop_3_2(void (*)(struct seq_file *, void *), struct seq_file *, void *);
127 : int main(void);
128 :
129 : /* EMG variable declarations */
130 1 : struct ldv_thread ldv_thread_1;
131 1 : struct ldv_thread ldv_thread_10;
132 1 : struct ldv_thread ldv_thread_11;
133 1 : struct ldv_thread ldv_thread_12;
134 1 : struct ldv_thread ldv_thread_13;
135 1 : struct ldv_thread ldv_thread_14;
136 1 : struct ldv_thread ldv_thread_15;
137 1 : struct ldv_thread ldv_thread_16;
138 1 : struct ldv_thread ldv_thread_17;
139 1 : struct ldv_thread ldv_thread_2;
140 1 : struct ldv_thread ldv_thread_20;
141 1 : struct ldv_thread ldv_thread_3;
142 1 : struct ldv_thread ldv_thread_4;
143 1 : struct ldv_thread ldv_thread_5;
144 1 : struct ldv_thread ldv_thread_6;
145 1 : struct ldv_thread ldv_thread_7;
146 1 : struct ldv_thread ldv_thread_8;
147 1 : struct ldv_thread ldv_thread_9;
148 :
149 : /* EMG variable initialization */
150 :
151 : /* EMG function definitions */
152 : /* AUX_FUNC ldv_bus_pattern_scenario_16 */
153 : void ldv_bus_pattern_scenario_16(void *arg0) {
154 : /* LDV {"thread": 16, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'bus_pattern_scenario(struct_obs_kernel_param)'", "function": "ldv_bus_pattern_scenario_16"} */
155 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
156 1 : int (*ldv_16_callback_setup_func)(char *);
157 1 : char *ldv_16_ldv_param_9_0_default;
158 1 : int ldv_16_ret_default;
159 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
160 1 : /* Initialize automaton variables */
161 2 : ldv_16_ret_default = 1;
162 1 : /* LDV {"action": "DEFAULT_REGISTER_6", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_OBS_KERNEL_PARAM callbacks invocations scenario."} */
163 2 : ldv_free(arg0);
164 : /* LDV {"action": "DEFAULT_REGISTER_6", "type": "RECEIVE_END"} */
165 :
166 : /* LDV {"action": "DEFAULT_ALLOC_6", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
167 : /* LDV {"action": "DEFAULT_ALLOC_6", "type": "CONDITION_END"} */
168 :
169 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Allocate memory of common callback parameters."} */
170 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
171 :
172 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Try to probe driver."} */
173 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
174 :
175 : /* Jump to a subprocess 'main' initial state */
176 1 : goto ldv_main_16;
177 : /* End of the process */
178 : return;
179 1 :
180 : /* Sbprocess main */
181 : ldv_main_16:
182 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
183 :
184 4 : if (ldv_undef_int()) {
185 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "comment": "Call callback 'probe' of a process 'bus_pattern_scenario' of an interface category 'struct_obs_kernel_param'"} */
186 : /* Skip callback without implementations */
187 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
188 :
189 4 : if (ldv_undef_int()) {
190 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Probing has been successfull."} */
191 2 : ldv_assume(ldv_16_ret_default == 0);
192 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_END"} */
193 :
194 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed, call the other callbacks."} */
195 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
196 :
197 : /* Jump to a subprocess 'call' initial state */
198 1 : goto ldv_call_16;
199 : }
200 : else {
201 : /* LDV {"action": "PROBE_FAILED", "type": "CONDITION_BEGIN", "comment": "Probing has failed."} */
202 2 : ldv_assume(ldv_16_ret_default != 0);
203 : /* LDV {"action": "PROBE_FAILED", "type": "CONDITION_END"} */
204 :
205 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Try to probe driver."} */
206 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
207 :
208 : /* Jump to a subprocess 'main' initial state */
209 1 : goto ldv_main_16;
210 : }
211 : }
212 : else {
213 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory of common callback parameters."} */
214 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
215 :
216 : /* LDV {"action": "DEFAULT_FREE_6", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
217 : /* LDV {"action": "DEFAULT_FREE_6", "type": "CONDITION_END"} */
218 :
219 : /* LDV {"action": "DEFAULT_DEREGISTER_6", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_OBS_KERNEL_PARAM callbacks invocations scenario."} */
220 : /* Skip a non-replicative signal receiving */
221 : /* LDV {"action": "DEFAULT_DEREGISTER_6", "type": "RECEIVE_END"} */
222 :
223 : /* Exit function at a terminal state */
224 1 : return;
225 : }
226 : /* End of the subprocess 'main' */
227 : return;
228 1 :
229 : /* Sbprocess call */
230 : ldv_call_16:
231 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
232 :
233 2 : switch (ldv_undef_int()) {
234 3 : case 1: {
235 : /* LDV {"action": "PRE_CALL_9", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
236 3 : ldv_16_ldv_param_9_0_default = ldv_xmalloc_unknown_size(0);
237 : /* LDV {"action": "PRE_CALL_9", "type": "CONDITION_END"} */
238 :
239 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback setup_func from obs_kernel_param."} */
240 : /* LDV {"type": "CALLBACK", "call": "((& video_setup))(ldv_16_ldv_param_9_0_default);", "comment": "callback"} */
241 2 : ldv_bus_pattern_scenario_callback_16_9(ldv_16_callback_setup_func, ldv_16_ldv_param_9_0_default);
242 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
243 :
244 : /* LDV {"action": "POST_CALL_9", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
245 2 : ldv_free(ldv_16_ldv_param_9_0_default);
246 : /* LDV {"action": "POST_CALL_9", "type": "CONDITION_END"} */
247 :
248 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed, call the other callbacks."} */
249 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
250 :
251 : /* Jump to a subprocess 'call' initial state */
252 1 : goto ldv_call_16;
253 1 : break;
254 : }
255 3 : case 2: {
256 : /* LDV {"action": "SUSPEND", "type": "CALL_BEGIN", "comment": "Call callback 'suspend' of a process 'bus_pattern_scenario' of an interface category 'struct_obs_kernel_param'"} */
257 : /* Skip callback without implementations */
258 : /* LDV {"action": "SUSPEND", "type": "CALL_END"} */
259 :
260 4 : if (ldv_undef_int()) {
261 : /* LDV {"action": "SUSPEND_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Suspending has been successfull."} */
262 2 : ldv_assume(ldv_16_ret_default == 0);
263 : /* LDV {"action": "SUSPEND_SUCCESS", "type": "CONDITION_END"} */
264 :
265 : /* LDV {"action": "RESUME", "type": "CALL_BEGIN", "comment": "Call callback 'resume' of a process 'bus_pattern_scenario' of an interface category 'struct_obs_kernel_param'"} */
266 : /* Skip callback without implementations */
267 : /* LDV {"action": "RESUME", "type": "CALL_END"} */
268 :
269 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed, call the other callbacks."} */
270 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
271 :
272 : /* Jump to a subprocess 'call' initial state */
273 1 : goto ldv_call_16;
274 : }
275 : else {
276 : /* LDV {"action": "SUSPEND_FAILED", "type": "CONDITION_BEGIN", "comment": "Suspending has failed."} */
277 2 : ldv_assume(ldv_16_ret_default != 0);
278 : /* LDV {"action": "SUSPEND_FAILED", "type": "CONDITION_END"} */
279 :
280 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed, call the other callbacks."} */
281 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
282 :
283 : /* Jump to a subprocess 'call' initial state */
284 1 : goto ldv_call_16;
285 : /* Jump to a subprocess 'call' initial state */
286 : goto ldv_call_16;
287 : }
288 1 : break;
289 : }
290 3 : case 3: {
291 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "comment": "Call callback 'release' of a process 'bus_pattern_scenario' of an interface category 'struct_obs_kernel_param'"} */
292 : /* Skip callback without implementations */
293 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
294 :
295 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Try to probe driver."} */
296 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
297 :
298 : /* Jump to a subprocess 'main' initial state */
299 1 : goto ldv_main_16;
300 1 : break;
301 : }
302 2 : default: ldv_stop();
303 1 : }
304 0 : /* End of the subprocess 'call' */
305 0 : return;
306 : /* LDV {"comment": "End of control function based on process 'bus_pattern_scenario(struct_obs_kernel_param)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_bus_pattern_scenario_16"} */
307 : }
308 :
309 : /* AUX_FUNC_CALLBACK ldv_bus_pattern_scenario_callback_16_9 */
310 : void ldv_bus_pattern_scenario_callback_16_9(int (*arg0)(char *), char *arg1) {
311 3 : ((& video_setup))(arg1);
312 1 : }
313 :
314 : /* AUX_FUNC ldv_character_driver_scenario_1 */
315 : void ldv_character_driver_scenario_1(void *arg0) {
316 : /* LDV {"thread": 1, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'character_driver_scenario(file_operations)'", "function": "ldv_character_driver_scenario_1"} */
317 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
318 1 : long int (*ldv_1_callback_compat_ioctl)(struct file *, unsigned int, long unsigned int);
319 1 : loff_t (*ldv_1_callback_llseek)(struct file *, loff_t , int);
320 1 : int (*ldv_1_callback_mmap)(struct file *, struct vm_area_struct *);
321 1 : ssize_t (*ldv_1_callback_read)(struct file *, char *, size_t , loff_t *);
322 1 : long int (*ldv_1_callback_unlocked_ioctl)(struct file *, unsigned int, long unsigned int);
323 1 : struct file_operations *ldv_1_container_file_operations;
324 1 : long long int ldv_1_ldv_param_21_1_default;
325 1 : int ldv_1_ldv_param_21_2_default;
326 1 : char *ldv_1_ldv_param_25_1_default;
327 1 : long long int *ldv_1_ldv_param_25_3_default;
328 1 : unsigned int ldv_1_ldv_param_28_1_default;
329 1 : char *ldv_1_ldv_param_4_1_default;
330 1 : long long int *ldv_1_ldv_param_4_3_default;
331 1 : unsigned int ldv_1_ldv_param_5_1_default;
332 1 : struct file *ldv_1_resource_file;
333 1 : struct inode *ldv_1_resource_inode;
334 1 : int ldv_1_ret_default;
335 1 : struct vm_area_struct *ldv_1_size_cnt_struct_vm_area_struct_ptr;
336 1 : long unsigned int ldv_1_size_cnt_write_size;
337 1 : /* Received labels */
338 2 : struct ldv_struct_character_driver_scenario_1 *data = (struct ldv_struct_character_driver_scenario_1*) arg0;
339 1 :
340 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
341 1 : /* Initialize automaton variables */
342 2 : ldv_1_ret_default = 1;
343 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin FILE_OPERATIONS callbacks invocations scenario."} */
344 1 : /* Assign recieved labels */
345 3 : if (data) {
346 2 : ldv_1_container_file_operations = data->arg0;
347 3 : ldv_free(data);
348 : }
349 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
350 :
351 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Allocate memory for file and inode structures."} */
352 5 : ldv_1_resource_file = ldv_xmalloc(sizeof(struct file));
353 3 : ldv_1_resource_inode = ldv_xmalloc(sizeof(struct inode));
354 3 : ldv_1_size_cnt_struct_vm_area_struct_ptr = ldv_undef_int();
355 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
356 :
357 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
358 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
359 :
360 : /* Jump to a subprocess 'main' initial state */
361 1 : goto ldv_main_1;
362 : /* End of the process */
363 : return;
364 1 :
365 : /* Sbprocess main */
366 : ldv_main_1:
367 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
368 :
369 4 : if (ldv_undef_int()) {
370 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Open the device file. Invoke callback open from file_operations."} */
371 : /* LDV {"type": "CALLBACK", "call": "ldv_1_ret_default = ((& fb_open))(ldv_1_resource_inode, ldv_1_resource_file);", "comment": "probe"} */
372 2 : ldv_1_ret_default = ldv_character_driver_scenario_probe_1_13(ldv_1_container_file_operations->open, ldv_1_resource_inode, ldv_1_resource_file);
373 : /* Callback post-call */
374 2 : ldv_1_ret_default = ldv_filter_err_code(ldv_1_ret_default);
375 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
376 :
377 4 : if (ldv_undef_int()) {
378 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Device file is opened successfully."} */
379 2 : ldv_assume(ldv_1_ret_default == 0);
380 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_END"} */
381 :
382 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
383 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
384 :
385 : /* Jump to a subprocess 'call' initial state */
386 1 : goto ldv_call_1;
387 : }
388 : else {
389 : /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to open devices file."} */
390 2 : ldv_assume(ldv_1_ret_default != 0);
391 : /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_END"} */
392 :
393 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
394 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
395 :
396 : /* Jump to a subprocess 'main' initial state */
397 1 : goto ldv_main_1;
398 : }
399 : }
400 : else {
401 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory of file and inode structures."} */
402 2 : ldv_free(ldv_1_resource_file);
403 2 : ldv_free(ldv_1_resource_inode);
404 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
405 :
406 : /* LDV {"action": "DEFAULT_FREE_2", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
407 2 : ldv_free(ldv_1_container_file_operations);
408 : /* LDV {"action": "DEFAULT_FREE_2", "type": "CONDITION_END"} */
409 :
410 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "RECEIVE_BEGIN", "comment": "Finish FILE_OPERATIONS callbacks invocations scenario."} */
411 : /* Skip a non-replicative signal receiving */
412 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "RECEIVE_END"} */
413 :
414 : /* Exit function at a terminal state */
415 1 : return;
416 : }
417 : /* End of the subprocess 'main' */
418 : return;
419 1 :
420 : /* Sbprocess call */
421 : ldv_call_1:
422 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
423 :
424 2 : switch (ldv_undef_int()) {
425 3 : case 1: {
426 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
427 3 : ldv_1_ldv_param_4_1_default = ldv_xmalloc_unknown_size(0);
428 3 : ldv_1_ldv_param_4_3_default = ldv_xmalloc_unknown_size(0);
429 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
430 :
431 : /* LDV {"action": "WRITE", "type": "CALL_BEGIN", "callback": true, "comment": "Write data to the device. Invoke callback write from file_operations."} */
432 : /* Callback pre-call */
433 2 : ldv_assume(ldv_1_size_cnt_struct_vm_area_struct_ptr <= (INT_MAX & PAGE_CACHE_MASK));
434 : /* LDV {"type": "CALLBACK", "call": "((& fb_write))(ldv_1_resource_file, ldv_1_ldv_param_4_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_4_3_default);", "comment": "write"} */
435 3 : ldv_character_driver_scenario_write_1_4(ldv_1_container_file_operations->write, ldv_1_resource_file, ldv_1_ldv_param_4_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_4_3_default);
436 : /* LDV {"action": "WRITE", "type": "CALL_END"} */
437 :
438 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
439 2 : ldv_free(ldv_1_ldv_param_4_1_default);
440 2 : ldv_free(ldv_1_ldv_param_4_3_default);
441 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
442 :
443 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
444 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
445 :
446 : /* Jump to a subprocess 'call' initial state */
447 1 : goto ldv_call_1;
448 1 : break;
449 : }
450 3 : case 2: {
451 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "File structure is released. Invoke callback release from file_operations."} */
452 : /* LDV {"type": "CALLBACK", "call": "((& fb_release))(ldv_1_resource_inode, ldv_1_resource_file);", "comment": "release"} */
453 2 : ldv_character_driver_scenario_release_1_2(ldv_1_container_file_operations->release, ldv_1_resource_inode, ldv_1_resource_file);
454 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
455 :
456 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
457 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
458 :
459 : /* Jump to a subprocess 'main' initial state */
460 1 : goto ldv_main_1;
461 1 : break;
462 : }
463 3 : case 3: {
464 : /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
465 : /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_END"} */
466 :
467 2 : switch (ldv_undef_int()) {
468 3 : case 1: {
469 : /* LDV {"action": "PRE_CALL_28", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
470 : /* LDV {"action": "PRE_CALL_28", "type": "CONDITION_END"} */
471 :
472 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback unlocked_ioctl from file_operations."} */
473 : /* LDV {"type": "CALLBACK", "call": "((& fb_ioctl))(ldv_1_resource_file, ldv_1_ldv_param_28_1_default, ldv_1_size_cnt_write_size);", "comment": "callback"} */
474 2 : ldv_character_driver_scenario_callback_1_28(ldv_1_callback_unlocked_ioctl, ldv_1_resource_file, ldv_1_ldv_param_28_1_default, ldv_1_size_cnt_write_size);
475 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
476 :
477 : /* LDV {"action": "POST_CALL_28", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
478 : /* LDV {"action": "POST_CALL_28", "type": "CONDITION_END"} */
479 :
480 1 : break;
481 1 : }
482 3 : case 2: {
483 : /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
484 3 : ldv_1_ldv_param_25_1_default = ldv_xmalloc_unknown_size(0);
485 3 : ldv_1_ldv_param_25_3_default = ldv_xmalloc_unknown_size(0);
486 : /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_END"} */
487 :
488 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback read from file_operations."} */
489 : /* LDV {"type": "CALLBACK", "call": "((& fb_read))(ldv_1_resource_file, ldv_1_ldv_param_25_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_25_3_default);", "comment": "callback"} */
490 2 : ldv_character_driver_scenario_callback_1_25(ldv_1_callback_read, ldv_1_resource_file, ldv_1_ldv_param_25_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_25_3_default);
491 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
492 :
493 : /* LDV {"action": "POST_CALL_25", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
494 2 : ldv_free(ldv_1_ldv_param_25_1_default);
495 2 : ldv_free(ldv_1_ldv_param_25_3_default);
496 : /* LDV {"action": "POST_CALL_25", "type": "CONDITION_END"} */
497 :
498 1 : break;
499 1 : }
500 3 : case 3: {
501 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback mmap from file_operations."} */
502 : /* LDV {"type": "CALLBACK", "call": "((& fb_mmap))(ldv_1_resource_file, ldv_1_size_cnt_struct_vm_area_struct_ptr);", "comment": "callback"} */
503 2 : ldv_character_driver_scenario_callback_1_24(ldv_1_callback_mmap, ldv_1_resource_file, ldv_1_size_cnt_struct_vm_area_struct_ptr);
504 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
505 :
506 1 : break;
507 1 : }
508 3 : case 4: {
509 : /* LDV {"action": "PRE_CALL_21", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
510 : /* LDV {"action": "PRE_CALL_21", "type": "CONDITION_END"} */
511 :
512 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
513 2 : if (ldv_1_callback_llseek) {
514 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_callback_llseek)(ldv_1_resource_file, ldv_1_ldv_param_21_1_default, ldv_1_ldv_param_21_2_default);", "comment": "callback"} */
515 2 : ldv_character_driver_scenario_callback_1_21(ldv_1_callback_llseek, ldv_1_resource_file, ldv_1_ldv_param_21_1_default, ldv_1_ldv_param_21_2_default);
516 : }
517 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
518 :
519 : /* LDV {"action": "POST_CALL_21", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
520 : /* LDV {"action": "POST_CALL_21", "type": "CONDITION_END"} */
521 :
522 2 : break;
523 1 : }
524 3 : case 5: {
525 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback compat_ioctl from file_operations."} */
526 : /* LDV {"type": "CALLBACK", "call": "((& fb_compat_ioctl))(ldv_1_resource_file, ldv_1_ldv_param_5_1_default, ldv_1_size_cnt_write_size);", "comment": "callback"} */
527 2 : ldv_character_driver_scenario_callback_1_5(ldv_1_callback_compat_ioctl, ldv_1_resource_file, ldv_1_ldv_param_5_1_default, ldv_1_size_cnt_write_size);
528 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
529 :
530 1 : break;
531 1 : }
532 2 : default: ldv_stop();
533 1 : }
534 6 : break;
535 1 : }
536 2 : default: ldv_stop();
537 1 : }
538 0 : /* LDV {"action": "POST_CALL_5", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
539 : /* LDV {"action": "POST_CALL_5", "type": "CONDITION_END"} */
540 0 :
541 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
542 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
543 :
544 : /* Jump to a subprocess 'call' initial state */
545 6 : goto ldv_call_1;
546 : /* Jump to a subprocess 'call' initial state */
547 : goto ldv_call_1;
548 : /* End of the subprocess 'call' */
549 : return;
550 : /* LDV {"comment": "End of control function based on process 'character_driver_scenario(file_operations)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_character_driver_scenario_1"} */
551 : }
552 :
553 : /* AUX_FUNC ldv_character_driver_scenario_2 */
554 : void ldv_character_driver_scenario_2(void *arg0) {
555 : /* LDV {"thread": 2, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'character_driver_scenario(file_operations)'", "function": "ldv_character_driver_scenario_2"} */
556 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
557 1 : long int (*ldv_2_callback_compat_ioctl)(struct file *, unsigned int, long unsigned int);
558 1 : loff_t (*ldv_2_callback_llseek)(struct file *, loff_t , int);
559 1 : int (*ldv_2_callback_mmap)(struct file *, struct vm_area_struct *);
560 1 : ssize_t (*ldv_2_callback_read)(struct file *, char *, size_t , loff_t *);
561 1 : long int (*ldv_2_callback_unlocked_ioctl)(struct file *, unsigned int, long unsigned int);
562 1 : struct file_operations *ldv_2_container_file_operations;
563 1 : long long int ldv_2_ldv_param_21_1_default;
564 1 : int ldv_2_ldv_param_21_2_default;
565 1 : char *ldv_2_ldv_param_25_1_default;
566 1 : long long int *ldv_2_ldv_param_25_3_default;
567 1 : unsigned int ldv_2_ldv_param_28_1_default;
568 1 : char *ldv_2_ldv_param_4_1_default;
569 1 : long long int *ldv_2_ldv_param_4_3_default;
570 1 : unsigned int ldv_2_ldv_param_5_1_default;
571 1 : struct file *ldv_2_resource_file;
572 1 : struct inode *ldv_2_resource_inode;
573 1 : int ldv_2_ret_default;
574 1 : struct vm_area_struct *ldv_2_size_cnt_struct_vm_area_struct_ptr;
575 1 : long unsigned int ldv_2_size_cnt_write_size;
576 1 : /* Received labels */
577 2 : struct ldv_struct_character_driver_scenario_1 *data = (struct ldv_struct_character_driver_scenario_1*) arg0;
578 1 :
579 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
580 1 : /* Initialize automaton variables */
581 2 : ldv_2_ret_default = 1;
582 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin FILE_OPERATIONS callbacks invocations scenario."} */
583 1 : /* Assign recieved labels */
584 3 : if (data) {
585 2 : ldv_2_container_file_operations = data->arg0;
586 3 : ldv_free(data);
587 : }
588 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
589 :
590 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Allocate memory for file and inode structures."} */
591 5 : ldv_2_resource_file = ldv_xmalloc(sizeof(struct file));
592 3 : ldv_2_resource_inode = ldv_xmalloc(sizeof(struct inode));
593 3 : ldv_2_size_cnt_struct_vm_area_struct_ptr = ldv_undef_int();
594 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
595 :
596 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
597 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
598 :
599 : /* Jump to a subprocess 'main' initial state */
600 1 : goto ldv_main_2;
601 : /* End of the process */
602 : return;
603 1 :
604 : /* Sbprocess main */
605 : ldv_main_2:
606 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
607 :
608 4 : if (ldv_undef_int()) {
609 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Open the device file. Invoke callback open from file_operations."} */
610 : /* LDV {"type": "CALLBACK", "call": "ldv_2_ret_default = ((& proc_fb_open))(ldv_2_resource_inode, ldv_2_resource_file);", "comment": "probe"} */
611 2 : ldv_2_ret_default = ldv_character_driver_scenario_probe_2_13(ldv_2_container_file_operations->open, ldv_2_resource_inode, ldv_2_resource_file);
612 : /* Callback post-call */
613 2 : ldv_2_ret_default = ldv_filter_err_code(ldv_2_ret_default);
614 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
615 :
616 4 : if (ldv_undef_int()) {
617 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Device file is opened successfully."} */
618 2 : ldv_assume(ldv_2_ret_default == 0);
619 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_END"} */
620 :
621 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
622 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
623 :
624 : /* Jump to a subprocess 'call' initial state */
625 1 : goto ldv_call_2;
626 : }
627 : else {
628 : /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to open devices file."} */
629 2 : ldv_assume(ldv_2_ret_default != 0);
630 : /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_END"} */
631 :
632 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
633 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
634 :
635 : /* Jump to a subprocess 'main' initial state */
636 1 : goto ldv_main_2;
637 : }
638 : }
639 : else {
640 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory of file and inode structures."} */
641 2 : ldv_free(ldv_2_resource_file);
642 2 : ldv_free(ldv_2_resource_inode);
643 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
644 :
645 : /* LDV {"action": "DEFAULT_FREE_2", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
646 2 : ldv_free(ldv_2_container_file_operations);
647 : /* LDV {"action": "DEFAULT_FREE_2", "type": "CONDITION_END"} */
648 :
649 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "RECEIVE_BEGIN", "comment": "Finish FILE_OPERATIONS callbacks invocations scenario."} */
650 : /* Skip a non-replicative signal receiving */
651 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "RECEIVE_END"} */
652 :
653 : /* Exit function at a terminal state */
654 1 : return;
655 : }
656 : /* End of the subprocess 'main' */
657 : return;
658 1 :
659 : /* Sbprocess call */
660 : ldv_call_2:
661 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
662 :
663 2 : switch (ldv_undef_int()) {
664 3 : case 1: {
665 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
666 3 : ldv_2_ldv_param_4_1_default = ldv_xmalloc_unknown_size(0);
667 3 : ldv_2_ldv_param_4_3_default = ldv_xmalloc_unknown_size(0);
668 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
669 :
670 : /* LDV {"action": "WRITE", "type": "CALL_BEGIN", "callback": true, "comment": "Write data to the device. Invoke callback write from FILE_OPERATIONS."} */
671 : /* Callback pre-call */
672 2 : ldv_assume(ldv_2_size_cnt_struct_vm_area_struct_ptr <= (INT_MAX & PAGE_CACHE_MASK));
673 3 : if (ldv_2_container_file_operations->write) {
674 : /* LDV {"type": "CALLBACK", "call": "(ldv_2_container_file_operations->write)(ldv_2_resource_file, ldv_2_ldv_param_4_1_default, ldv_2_size_cnt_write_size, ldv_2_ldv_param_4_3_default);", "comment": "write"} */
675 3 : ldv_character_driver_scenario_write_2_4(ldv_2_container_file_operations->write, ldv_2_resource_file, ldv_2_ldv_param_4_1_default, ldv_2_size_cnt_write_size, ldv_2_ldv_param_4_3_default);
676 : }
677 : /* LDV {"action": "WRITE", "type": "CALL_END"} */
678 :
679 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
680 4 : ldv_free(ldv_2_ldv_param_4_1_default);
681 2 : ldv_free(ldv_2_ldv_param_4_3_default);
682 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
683 :
684 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
685 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
686 :
687 : /* Jump to a subprocess 'call' initial state */
688 1 : goto ldv_call_2;
689 1 : break;
690 : }
691 3 : case 2: {
692 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "File structure is released. Invoke callback release from file_operations."} */
693 : /* LDV {"type": "CALLBACK", "call": "((& seq_release))(ldv_2_resource_inode, ldv_2_resource_file);", "comment": "release"} */
694 2 : ldv_character_driver_scenario_release_2_2(ldv_2_container_file_operations->release, ldv_2_resource_inode, ldv_2_resource_file);
695 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
696 :
697 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
698 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
699 :
700 : /* Jump to a subprocess 'main' initial state */
701 1 : goto ldv_main_2;
702 1 : break;
703 : }
704 3 : case 3: {
705 : /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
706 : /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_END"} */
707 :
708 2 : switch (ldv_undef_int()) {
709 3 : case 1: {
710 : /* LDV {"action": "PRE_CALL_28", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
711 : /* LDV {"action": "PRE_CALL_28", "type": "CONDITION_END"} */
712 :
713 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
714 2 : if (ldv_2_callback_unlocked_ioctl) {
715 : /* LDV {"type": "CALLBACK", "call": "(ldv_2_callback_unlocked_ioctl)(ldv_2_resource_file, ldv_2_ldv_param_28_1_default, ldv_2_size_cnt_write_size);", "comment": "callback"} */
716 2 : ldv_character_driver_scenario_callback_2_28(ldv_2_callback_unlocked_ioctl, ldv_2_resource_file, ldv_2_ldv_param_28_1_default, ldv_2_size_cnt_write_size);
717 : }
718 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
719 :
720 : /* LDV {"action": "POST_CALL_28", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
721 : /* LDV {"action": "POST_CALL_28", "type": "CONDITION_END"} */
722 :
723 2 : break;
724 1 : }
725 3 : case 2: {
726 : /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
727 3 : ldv_2_ldv_param_25_1_default = ldv_xmalloc_unknown_size(0);
728 3 : ldv_2_ldv_param_25_3_default = ldv_xmalloc_unknown_size(0);
729 : /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_END"} */
730 :
731 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback read from file_operations."} */
732 : /* LDV {"type": "CALLBACK", "call": "((& seq_read))(ldv_2_resource_file, ldv_2_ldv_param_25_1_default, ldv_2_size_cnt_write_size, ldv_2_ldv_param_25_3_default);", "comment": "callback"} */
733 2 : ldv_character_driver_scenario_callback_2_25(ldv_2_callback_read, ldv_2_resource_file, ldv_2_ldv_param_25_1_default, ldv_2_size_cnt_write_size, ldv_2_ldv_param_25_3_default);
734 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
735 :
736 : /* LDV {"action": "POST_CALL_25", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
737 2 : ldv_free(ldv_2_ldv_param_25_1_default);
738 2 : ldv_free(ldv_2_ldv_param_25_3_default);
739 : /* LDV {"action": "POST_CALL_25", "type": "CONDITION_END"} */
740 :
741 1 : break;
742 1 : }
743 3 : case 3: {
744 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
745 2 : if (ldv_2_callback_mmap) {
746 : /* LDV {"type": "CALLBACK", "call": "(ldv_2_callback_mmap)(ldv_2_resource_file, ldv_2_size_cnt_struct_vm_area_struct_ptr);", "comment": "callback"} */
747 2 : ldv_character_driver_scenario_callback_2_24(ldv_2_callback_mmap, ldv_2_resource_file, ldv_2_size_cnt_struct_vm_area_struct_ptr);
748 : }
749 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
750 :
751 2 : break;
752 1 : }
753 3 : case 4: {
754 : /* LDV {"action": "PRE_CALL_21", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
755 : /* LDV {"action": "PRE_CALL_21", "type": "CONDITION_END"} */
756 :
757 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback llseek from file_operations."} */
758 : /* LDV {"type": "CALLBACK", "call": "((& seq_lseek))(ldv_2_resource_file, ldv_2_ldv_param_21_1_default, ldv_2_ldv_param_21_2_default);", "comment": "callback"} */
759 2 : ldv_character_driver_scenario_callback_2_21(ldv_2_callback_llseek, ldv_2_resource_file, ldv_2_ldv_param_21_1_default, ldv_2_ldv_param_21_2_default);
760 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
761 :
762 : /* LDV {"action": "POST_CALL_21", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
763 : /* LDV {"action": "POST_CALL_21", "type": "CONDITION_END"} */
764 :
765 1 : break;
766 1 : }
767 3 : case 5: {
768 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
769 2 : if (ldv_2_callback_compat_ioctl) {
770 : /* LDV {"type": "CALLBACK", "call": "(ldv_2_callback_compat_ioctl)(ldv_2_resource_file, ldv_2_ldv_param_5_1_default, ldv_2_size_cnt_write_size);", "comment": "callback"} */
771 2 : ldv_character_driver_scenario_callback_2_5(ldv_2_callback_compat_ioctl, ldv_2_resource_file, ldv_2_ldv_param_5_1_default, ldv_2_size_cnt_write_size);
772 : }
773 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
774 :
775 2 : break;
776 1 : }
777 2 : default: ldv_stop();
778 1 : }
779 6 : break;
780 1 : }
781 2 : default: ldv_stop();
782 1 : }
783 0 : /* LDV {"action": "POST_CALL_5", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
784 : /* LDV {"action": "POST_CALL_5", "type": "CONDITION_END"} */
785 0 :
786 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
787 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
788 :
789 : /* Jump to a subprocess 'call' initial state */
790 6 : goto ldv_call_2;
791 : /* Jump to a subprocess 'call' initial state */
792 : goto ldv_call_2;
793 : /* End of the subprocess 'call' */
794 : return;
795 : /* LDV {"comment": "End of control function based on process 'character_driver_scenario(file_operations)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_character_driver_scenario_2"} */
796 : }
797 :
798 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_21 */
799 : void ldv_character_driver_scenario_callback_1_21(loff_t (*arg0)(struct file *, loff_t , int), struct file *arg1, long long int arg2, int arg3) {
800 3 : (*arg0)(arg1, arg2, arg3);
801 1 : }
802 :
803 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_24 */
804 : void ldv_character_driver_scenario_callback_1_24(int (*arg0)(struct file *, struct vm_area_struct *), struct file *arg1, struct vm_area_struct *arg2) {
805 3 : ((& fb_mmap))(arg1, arg2);
806 1 : }
807 :
808 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_25 */
809 : void ldv_character_driver_scenario_callback_1_25(ssize_t (*arg0)(struct file *, char *, size_t , loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
810 5 : ((& fb_read))(arg1, arg2, arg3, arg4);
811 1 : }
812 :
813 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_28 */
814 : void ldv_character_driver_scenario_callback_1_28(long int (*arg0)(struct file *, unsigned int, long unsigned int), struct file *arg1, unsigned int arg2, long unsigned int arg3) {
815 2 : ((& fb_ioctl))(arg1, arg2, arg3);
816 1 : }
817 :
818 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_5 */
819 : void ldv_character_driver_scenario_callback_1_5(long int (*arg0)(struct file *, unsigned int, long unsigned int), struct file *arg1, unsigned int arg2, long unsigned int arg3) {
820 5 : ((& fb_compat_ioctl))(arg1, arg2, arg3);
821 1 : }
822 :
823 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_2_21 */
824 : void ldv_character_driver_scenario_callback_2_21(loff_t (*arg0)(struct file *, loff_t , int), struct file *arg1, long long int arg2, int arg3) {
825 1 : ((& seq_lseek))(arg1, arg2, arg3);
826 1 : }
827 :
828 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_2_24 */
829 : void ldv_character_driver_scenario_callback_2_24(int (*arg0)(struct file *, struct vm_area_struct *), struct file *arg1, struct vm_area_struct *arg2) {
830 2 : (*arg0)(arg1, arg2);
831 1 : }
832 :
833 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_2_25 */
834 : void ldv_character_driver_scenario_callback_2_25(ssize_t (*arg0)(struct file *, char *, size_t , loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
835 1 : ((& seq_read))(arg1, arg2, arg3, arg4);
836 1 : }
837 :
838 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_2_28 */
839 : void ldv_character_driver_scenario_callback_2_28(long int (*arg0)(struct file *, unsigned int, long unsigned int), struct file *arg1, unsigned int arg2, long unsigned int arg3) {
840 3 : (*arg0)(arg1, arg2, arg3);
841 1 : }
842 :
843 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_2_5 */
844 : void ldv_character_driver_scenario_callback_2_5(long int (*arg0)(struct file *, unsigned int, long unsigned int), struct file *arg1, unsigned int arg2, long unsigned int arg3) {
845 3 : (*arg0)(arg1, arg2, arg3);
846 1 : }
847 :
848 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_probe_1_13 */
849 : int ldv_character_driver_scenario_probe_1_13(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
850 6 : return ((& fb_open))(arg1, arg2);
851 : }
852 1 :
853 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_probe_2_13 */
854 : int ldv_character_driver_scenario_probe_2_13(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
855 3 : return ((& proc_fb_open))(arg1, arg2);
856 : }
857 1 :
858 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_release_1_2 */
859 : void ldv_character_driver_scenario_release_1_2(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
860 2 : ((& fb_release))(arg1, arg2);
861 1 : }
862 :
863 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_release_2_2 */
864 : void ldv_character_driver_scenario_release_2_2(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
865 1 : ((& seq_release))(arg1, arg2);
866 1 : }
867 :
868 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_write_1_4 */
869 : void ldv_character_driver_scenario_write_1_4(ssize_t (*arg0)(struct file *, char *, size_t , loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
870 5 : ((& fb_write))(arg1, arg2, arg3, arg4);
871 1 : }
872 :
873 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_write_2_4 */
874 : void ldv_character_driver_scenario_write_2_4(ssize_t (*arg0)(struct file *, char *, size_t , loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
875 3 : (*arg0)(arg1, arg2, arg3, arg4);
876 1 : }
877 :
878 : /* AUX_FUNC ldv_dispatch_default_deregister_2_17_3 */
879 : void ldv_dispatch_default_deregister_2_17_3() {
880 : struct ldv_struct_insmod_17 *cf_arg_1;
881 : struct ldv_struct_insmod_17 *cf_arg_2;
882 : /* Skip thread join call */
883 : /* Skip thread join call */
884 1 : return;
885 : }
886 :
887 : /* AUX_FUNC ldv_dispatch_default_deregister_4_17_4 */
888 : void ldv_dispatch_default_deregister_4_17_4() {
889 : struct ldv_struct_insmod_17 *cf_arg_3;
890 : /* Skip thread join call */
891 1 : return;
892 : }
893 :
894 : /* AUX_FUNC ldv_dispatch_default_deregister_5_17_5 */
895 : void ldv_dispatch_default_deregister_5_17_5() {
896 : struct ldv_struct_insmod_17 *cf_arg_4;
897 : struct ldv_struct_insmod_17 *cf_arg_5;
898 : struct ldv_struct_insmod_17 *cf_arg_6;
899 : struct ldv_struct_insmod_17 *cf_arg_7;
900 : struct ldv_struct_insmod_17 *cf_arg_8;
901 : struct ldv_struct_insmod_17 *cf_arg_9;
902 : struct ldv_struct_insmod_17 *cf_arg_10;
903 : struct ldv_struct_insmod_17 *cf_arg_11;
904 : struct ldv_struct_insmod_17 *cf_arg_12;
905 : struct ldv_struct_insmod_17 *cf_arg_13;
906 : struct ldv_struct_insmod_17 *cf_arg_14;
907 : struct ldv_struct_insmod_17 *cf_arg_15;
908 : /* Skip thread join call */
909 : /* Skip thread join call */
910 : /* Skip thread join call */
911 : /* Skip thread join call */
912 : /* Skip thread join call */
913 : /* Skip thread join call */
914 : /* Skip thread join call */
915 : /* Skip thread join call */
916 : /* Skip thread join call */
917 : /* Skip thread join call */
918 : /* Skip thread join call */
919 : /* Skip thread join call */
920 1 : return;
921 : }
922 :
923 : /* AUX_FUNC ldv_dispatch_default_deregister_6_17_6 */
924 : void ldv_dispatch_default_deregister_6_17_6() {
925 : struct ldv_struct_insmod_17 *cf_arg_16;
926 : /* Skip thread join call */
927 1 : return;
928 : }
929 :
930 : /* AUX_FUNC ldv_dispatch_default_register_5_17_8 */
931 : void ldv_dispatch_default_register_5_17_8() {
932 : struct ldv_struct_insmod_17 *cf_arg_4;
933 1 : struct ldv_struct_insmod_17 *cf_arg_5;
934 1 : struct ldv_struct_insmod_17 *cf_arg_6;
935 1 : struct ldv_struct_insmod_17 *cf_arg_7;
936 1 : struct ldv_struct_insmod_17 *cf_arg_8;
937 1 : struct ldv_struct_insmod_17 *cf_arg_9;
938 1 : struct ldv_struct_insmod_17 *cf_arg_10;
939 1 : struct ldv_struct_insmod_17 *cf_arg_11;
940 1 : struct ldv_struct_insmod_17 *cf_arg_12;
941 1 : struct ldv_struct_insmod_17 *cf_arg_13;
942 1 : struct ldv_struct_insmod_17 *cf_arg_14;
943 1 : struct ldv_struct_insmod_17 *cf_arg_15;
944 4 : cf_arg_4 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_17));
945 3 : ldv_random_containerless_scenario_4(cf_arg_4);
946 4 : cf_arg_5 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_17));
947 3 : ldv_random_containerless_scenario_5(cf_arg_5);
948 4 : cf_arg_6 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_17));
949 3 : ldv_random_containerless_scenario_6(cf_arg_6);
950 4 : cf_arg_7 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_17));
951 3 : ldv_random_containerless_scenario_7(cf_arg_7);
952 4 : cf_arg_8 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_17));
953 3 : ldv_random_containerless_scenario_8(cf_arg_8);
954 4 : cf_arg_9 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_17));
955 3 : ldv_random_containerless_scenario_9(cf_arg_9);
956 4 : cf_arg_10 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_17));
957 2 : ldv_random_containerless_scenario_10(cf_arg_10);
958 3 : cf_arg_11 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_17));
959 2 : ldv_random_containerless_scenario_11(cf_arg_11);
960 3 : cf_arg_12 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_17));
961 2 : ldv_random_containerless_scenario_12(cf_arg_12);
962 3 : cf_arg_13 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_17));
963 2 : ldv_random_containerless_scenario_13(cf_arg_13);
964 3 : cf_arg_14 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_17));
965 2 : ldv_random_containerless_scenario_14(cf_arg_14);
966 3 : cf_arg_15 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_17));
967 2 : ldv_random_containerless_scenario_15(cf_arg_15);
968 1 : return;
969 : }
970 :
971 : /* AUX_FUNC ldv_dispatch_default_register_6_17_7 */
972 : void ldv_dispatch_default_register_6_17_7() {
973 : struct ldv_struct_insmod_17 *cf_arg_16;
974 4 : cf_arg_16 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_17));
975 3 : ldv_bus_pattern_scenario_16(cf_arg_16);
976 1 : return;
977 : }
978 :
979 : /* AUX_FUNC ldv_dispatch_insmod_deregister_20_2 */
980 : void ldv_dispatch_insmod_deregister_20_2() {
981 : struct ldv_struct_insmod_17 *cf_arg_17;
982 : /* Skip thread join call */
983 1 : return;
984 : }
985 :
986 : /* AUX_FUNC ldv_dispatch_insmod_register_20_3 */
987 : void ldv_dispatch_insmod_register_20_3() {
988 : struct ldv_struct_insmod_17 *cf_arg_17;
989 4 : cf_arg_17 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_17));
990 5 : ldv_insmod_17(cf_arg_17);
991 1 : return;
992 : }
993 :
994 : /* AUX_FUNC ldv_dispatch_register_18_1 */
995 : void ldv_dispatch_register_18_1(struct seq_file *arg0, struct seq_operations *arg1) {
996 : struct ldv_struct_traverse_kernel_items_scenario_3 *cf_arg_3;
997 4 : cf_arg_3 = ldv_xmalloc(sizeof(struct ldv_struct_traverse_kernel_items_scenario_3));
998 2 : cf_arg_3->arg0 = arg0;
999 1 : cf_arg_3->arg1 = arg1;
1000 2 : ldv_traverse_kernel_items_scenario_3(cf_arg_3);
1001 1 : return;
1002 : }
1003 :
1004 : /* AUX_FUNC ldv_dispatch_register_19_3 */
1005 : void ldv_dispatch_register_19_3(struct file_operations *arg0) {
1006 : struct ldv_struct_character_driver_scenario_1 *cf_arg_1;
1007 1 : struct ldv_struct_character_driver_scenario_1 *cf_arg_2;
1008 5 : if (ldv_undef_int()) {
1009 4 : cf_arg_1 = ldv_xmalloc(sizeof(struct ldv_struct_character_driver_scenario_1));
1010 2 : cf_arg_1->arg0 = arg0;
1011 3 : ldv_character_driver_scenario_1(cf_arg_1);
1012 : }
1013 : else {
1014 3 : cf_arg_2 = ldv_xmalloc(sizeof(struct ldv_struct_character_driver_scenario_1));
1015 1 : cf_arg_2->arg0 = arg0;
1016 2 : ldv_character_driver_scenario_2(cf_arg_2);
1017 : }
1018 2 : return;
1019 : }
1020 :
1021 : /* AUX_FUNC ldv_emg_register_chrdev */
1022 : int ldv_emg_register_chrdev(unsigned int arg0, char *arg1, struct file_operations *arg2) {
1023 : /* LDV {"comment": "Control function 'register_chrdev'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_register_chrdev"} */
1024 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1025 1 : struct file_operations *ldv_19_file_operations_file_operations;
1026 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1027 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1028 :
1029 4 : if (ldv_undef_int()) {
1030 : /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get 'file_operations' callbacks to register."} */
1031 1 : ldv_19_file_operations_file_operations = arg2;
1032 : /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
1033 :
1034 : /* LDV {"action": "REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register FILE_OPERATIONS callbacks."} */
1035 3 : ldv_dispatch_register_19_3(ldv_19_file_operations_file_operations);
1036 : /* LDV {"action": "REGISTER", "type": "DISPATCH_END"} */
1037 :
1038 : /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Fail registration of 'file_operations' callbacks."} */
1039 3 : return ldv_undef_int_negative();
1040 : /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
1041 :
1042 : /* Exit function at a terminal state */
1043 : }
1044 : else {
1045 : /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Registration of 'file_operations' callbacks has been successful."} */
1046 1 : return 0;
1047 : /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
1048 :
1049 : /* Exit function at a terminal state */
1050 : }
1051 : /* End of the process */
1052 : /* LDV {"comment": "End of control function based on process 'register_chrdev'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_register_chrdev"} */
1053 : }
1054 :
1055 : /* AUX_FUNC ldv_emg_seq_open */
1056 : int ldv_emg_seq_open(struct file *arg0, struct seq_operations *arg1) {
1057 : /* LDV {"comment": "Control function 'seq_open'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_seq_open"} */
1058 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1059 1 : struct file *ldv_18_file_file;
1060 1 : struct seq_operations *ldv_18_ops_seq_operations;
1061 1 : struct seq_file *ldv_18_seq_file_seq_file;
1062 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1063 : /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Alloc memory for sequential file structure and initialize it."} */
1064 3 : ldv_18_seq_file_seq_file = ldv_xmalloc(sizeof(struct seq_file));
1065 1 : ldv_18_ops_seq_operations = arg1;
1066 1 : ldv_18_file_file->private_data = ldv_18_seq_file_seq_file;
1067 : /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
1068 :
1069 : /* LDV {"action": "REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register SEQ_OPERATIONS callbacks."} */
1070 2 : ldv_dispatch_register_18_1(ldv_18_seq_file_seq_file, ldv_18_ops_seq_operations);
1071 1 : /* LDV {"action": "REGISTER", "type": "DISPATCH_END"} */
1072 :
1073 : /* Exit function at a terminal state */
1074 : /* End of the process */
1075 : /* LDV {"comment": "End of control function based on process 'seq_open'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_seq_open"} */
1076 : }
1077 :
1078 : /* AUX_FUNC ldv_insmod_17 */
1079 : void ldv_insmod_17(void *arg0) {
1080 : /* LDV {"thread": 17, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'insmod(artificial)'", "function": "ldv_insmod_17"} */
1081 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1082 1 : void (*ldv_17_exit_default)(void);
1083 1 : int (*ldv_17_fbmem_init_default)(void);
1084 1 : int ldv_17_ret_default;
1085 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1086 : /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module initialization."} */
1087 2 : ldv_free(arg0);
1088 : /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_END"} */
1089 :
1090 : /* LDV {"action": "FBMEM_INIT", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize the module after insmod with 'fbmem_init' function. Invoke callback fbmem_init from ARTIFICIAL."} */
1091 : /* LDV {"type": "CALLBACK", "call": "ldv_17_ret_default = (fbmem_init)();", "comment": "fbmem_init"} */
1092 2 : ldv_17_ret_default = ldv_insmod_fbmem_init_17_12(ldv_17_fbmem_init_default);
1093 : /* Callback post-call */
1094 2 : ldv_17_ret_default = ldv_post_init(ldv_17_ret_default);
1095 : /* LDV {"action": "FBMEM_INIT", "type": "CALL_END"} */
1096 :
1097 4 : if (ldv_undef_int()) {
1098 : /* LDV {"action": "INIT_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize the module."} */
1099 2 : ldv_assume(ldv_17_ret_default != 0);
1100 : /* LDV {"action": "INIT_FAILED", "type": "CONDITION_END"} */
1101 :
1102 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
1103 : /* Skip a non-replicative signal receiving */
1104 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
1105 :
1106 : /* Exit function at a terminal state */
1107 1 : return;
1108 : }
1109 : else {
1110 : /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Module has been initialized."} */
1111 2 : ldv_assume(ldv_17_ret_default == 0);
1112 : /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_END"} */
1113 :
1114 4 : if (ldv_undef_int()) {
1115 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_DEVICE_ATTRIBUTE' callbacks with unknown registration function."} */
1116 2 : ldv_dispatch_default_register_5_17_8();
1117 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "DISPATCH_END"} */
1118 :
1119 : /* LDV {"action": "DEFAULT_REGISTER_6", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_OBS_KERNEL_PARAM' callbacks with unknown registration function."} */
1120 2 : ldv_dispatch_default_register_6_17_7();
1121 : /* LDV {"action": "DEFAULT_REGISTER_6", "type": "DISPATCH_END"} */
1122 :
1123 : /* LDV {"action": "DEFAULT_DEREGISTER_6", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_OBS_KERNEL_PARAM' callbacks with unknown deregistration function."} */
1124 2 : ldv_dispatch_default_deregister_6_17_6();
1125 : /* LDV {"action": "DEFAULT_DEREGISTER_6", "type": "DISPATCH_END"} */
1126 :
1127 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_DEVICE_ATTRIBUTE' callbacks with unknown deregistration function."} */
1128 2 : ldv_dispatch_default_deregister_5_17_5();
1129 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "DISPATCH_END"} */
1130 :
1131 : /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "DISPATCH_BEGIN", "comment": "Deregister 'SEQ_OPERATIONS' callbacks with unknown deregistration function."} */
1132 2 : ldv_dispatch_default_deregister_4_17_4();
1133 : /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "DISPATCH_END"} */
1134 :
1135 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "DISPATCH_BEGIN", "comment": "Deregister 'FILE_OPERATIONS' callbacks with unknown deregistration function."} */
1136 2 : ldv_dispatch_default_deregister_2_17_3();
1137 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "DISPATCH_END"} */
1138 :
1139 : }
1140 : else {
1141 : /* LDV {"action": "NONE", "type": "CONDITION_BEGIN", "comment": "Skip default callbacks registrations and deregistrations."} */
1142 : /* LDV {"action": "NONE", "type": "CONDITION_END"} */
1143 :
1144 : }
1145 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
1146 : /* Skip a non-replicative signal receiving */
1147 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
1148 :
1149 : /* Exit function at a terminal state */
1150 2 : return;
1151 : }
1152 : /* End of the process */
1153 : return;
1154 : /* LDV {"comment": "End of control function based on process 'insmod(artificial)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_insmod_17"} */
1155 : }
1156 :
1157 : /* AUX_FUNC_CALLBACK ldv_insmod_fbmem_init_17_12 */
1158 : int ldv_insmod_fbmem_init_17_12(int (*arg0)(void)) {
1159 4 : return (fbmem_init)();
1160 1 : }
1161 :
1162 : /* AUX_FUNC ldv_main_20 */
1163 : void ldv_main_20(void *arg0) {
1164 : /* LDV {"thread": 20, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'main(main)'", "function": "ldv_main_20"} */
1165 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1166 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1167 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Initialize rule models."} */
1168 1 : ldv_initialize();
1169 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
1170 :
1171 : /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Start environment model scenarios."} */
1172 2 : ldv_dispatch_insmod_register_20_3();
1173 : /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_END"} */
1174 :
1175 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Stop environment model scenarios."} */
1176 2 : ldv_dispatch_insmod_deregister_20_2();
1177 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_END"} */
1178 :
1179 : /* LDV {"action": "FINAL", "type": "CONDITION_BEGIN", "comment": "Check rule model state at the exit."} */
1180 1 : ldv_check_final_state();
1181 1 : ldv_stop();
1182 : /* LDV {"action": "FINAL", "type": "CONDITION_END"} */
1183 :
1184 : /* Exit function at a terminal state */
1185 0 : return;
1186 : /* End of the process */
1187 : return;
1188 : /* LDV {"comment": "End of control function based on process 'main(main)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_main_20"} */
1189 : }
1190 :
1191 : /* AUX_FUNC ldv_random_containerless_scenario_10 */
1192 : void ldv_random_containerless_scenario_10(void *arg0) {
1193 : /* LDV {"thread": 10, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_10"} */
1194 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1195 1 : ssize_t (*ldv_10_callback_show)(struct device *, struct device_attribute *, char *);
1196 : ssize_t (*ldv_10_callback_store)(struct device *, struct device_attribute *, char *, size_t );
1197 1 : struct device_attribute *ldv_10_container_struct_device_attribute;
1198 1 : struct device *ldv_10_container_struct_device_ptr;
1199 1 : char *ldv_10_ldv_param_10_2_default;
1200 1 : long unsigned int ldv_10_ldv_param_10_3_default;
1201 1 : char *ldv_10_ldv_param_4_2_default;
1202 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1203 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1204 3 : ldv_free(arg0);
1205 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
1206 1 :
1207 1 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1208 3 : ldv_10_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1209 3 : ldv_10_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1210 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
1211 :
1212 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1213 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1214 :
1215 : /* Jump to a subprocess 'call' initial state */
1216 1 : goto ldv_call_10;
1217 : /* End of the process */
1218 : return;
1219 1 :
1220 : /* Sbprocess call */
1221 : ldv_call_10:
1222 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1223 :
1224 4 : if (ldv_undef_int()) {
1225 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1226 3 : ldv_10_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1227 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1228 :
1229 4 : if (ldv_undef_int()) {
1230 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1231 3 : ldv_10_ldv_param_10_2_default = ldv_xmalloc_unknown_size(0);
1232 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
1233 :
1234 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
1235 : /* LDV {"type": "CALLBACK", "call": "((& store_modes))(ldv_10_container_struct_device_ptr, ldv_10_container_struct_device_attribute, ldv_10_ldv_param_10_2_default, ldv_10_ldv_param_10_3_default);", "comment": "callback"} */
1236 2 : ldv_random_containerless_scenario_callback_10_10(ldv_10_callback_store, ldv_10_container_struct_device_ptr, ldv_10_container_struct_device_attribute, ldv_10_ldv_param_10_2_default, ldv_10_ldv_param_10_3_default);
1237 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1238 :
1239 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1240 2 : ldv_free(ldv_10_ldv_param_10_2_default);
1241 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
1242 :
1243 : }
1244 : else {
1245 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1246 : /* LDV {"type": "CALLBACK", "call": "((& show_modes))(ldv_10_container_struct_device_ptr, ldv_10_container_struct_device_attribute, ldv_10_ldv_param_4_2_default);", "comment": "callback"} */
1247 2 : ldv_random_containerless_scenario_callback_10_4(ldv_10_callback_show, ldv_10_container_struct_device_ptr, ldv_10_container_struct_device_attribute, ldv_10_ldv_param_4_2_default);
1248 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1249 :
1250 : }
1251 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1252 4 : ldv_free(ldv_10_ldv_param_4_2_default);
1253 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1254 :
1255 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1256 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1257 :
1258 : /* Jump to a subprocess 'call' initial state */
1259 1 : goto ldv_call_10;
1260 : }
1261 : else {
1262 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1263 2 : ldv_free(ldv_10_container_struct_device_attribute);
1264 2 : ldv_free(ldv_10_container_struct_device_ptr);
1265 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
1266 :
1267 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1268 : /* Skip a non-replicative signal receiving */
1269 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
1270 :
1271 : /* Exit function at a terminal state */
1272 1 : return;
1273 : }
1274 : /* End of the subprocess 'call' */
1275 : return;
1276 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_10"} */
1277 : }
1278 :
1279 : /* AUX_FUNC ldv_random_containerless_scenario_11 */
1280 : void ldv_random_containerless_scenario_11(void *arg0) {
1281 : /* LDV {"thread": 11, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_11"} */
1282 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1283 1 : ssize_t (*ldv_11_callback_show)(struct device *, struct device_attribute *, char *);
1284 : ssize_t (*ldv_11_callback_store)(struct device *, struct device_attribute *, char *, size_t );
1285 1 : struct device_attribute *ldv_11_container_struct_device_attribute;
1286 1 : struct device *ldv_11_container_struct_device_ptr;
1287 1 : char *ldv_11_ldv_param_10_2_default;
1288 1 : long unsigned int ldv_11_ldv_param_10_3_default;
1289 1 : char *ldv_11_ldv_param_4_2_default;
1290 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1291 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1292 3 : ldv_free(arg0);
1293 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
1294 1 :
1295 1 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1296 3 : ldv_11_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1297 3 : ldv_11_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1298 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
1299 :
1300 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1301 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1302 :
1303 : /* Jump to a subprocess 'call' initial state */
1304 1 : goto ldv_call_11;
1305 : /* End of the process */
1306 : return;
1307 1 :
1308 : /* Sbprocess call */
1309 : ldv_call_11:
1310 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1311 :
1312 4 : if (ldv_undef_int()) {
1313 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1314 3 : ldv_11_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1315 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1316 :
1317 4 : if (ldv_undef_int()) {
1318 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1319 3 : ldv_11_ldv_param_10_2_default = ldv_xmalloc_unknown_size(0);
1320 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
1321 :
1322 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
1323 : /* LDV {"type": "CALLBACK", "call": "((& store_virtual))(ldv_11_container_struct_device_ptr, ldv_11_container_struct_device_attribute, ldv_11_ldv_param_10_2_default, ldv_11_ldv_param_10_3_default);", "comment": "callback"} */
1324 2 : ldv_random_containerless_scenario_callback_11_10(ldv_11_callback_store, ldv_11_container_struct_device_ptr, ldv_11_container_struct_device_attribute, ldv_11_ldv_param_10_2_default, ldv_11_ldv_param_10_3_default);
1325 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1326 :
1327 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1328 2 : ldv_free(ldv_11_ldv_param_10_2_default);
1329 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
1330 :
1331 : }
1332 : else {
1333 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1334 : /* LDV {"type": "CALLBACK", "call": "((& show_name))(ldv_11_container_struct_device_ptr, ldv_11_container_struct_device_attribute, ldv_11_ldv_param_4_2_default);", "comment": "callback"} */
1335 2 : ldv_random_containerless_scenario_callback_11_4(ldv_11_callback_show, ldv_11_container_struct_device_ptr, ldv_11_container_struct_device_attribute, ldv_11_ldv_param_4_2_default);
1336 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1337 :
1338 : }
1339 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1340 4 : ldv_free(ldv_11_ldv_param_4_2_default);
1341 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1342 :
1343 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1344 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1345 :
1346 : /* Jump to a subprocess 'call' initial state */
1347 1 : goto ldv_call_11;
1348 : }
1349 : else {
1350 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1351 2 : ldv_free(ldv_11_container_struct_device_attribute);
1352 2 : ldv_free(ldv_11_container_struct_device_ptr);
1353 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
1354 :
1355 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1356 : /* Skip a non-replicative signal receiving */
1357 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
1358 :
1359 : /* Exit function at a terminal state */
1360 1 : return;
1361 : }
1362 : /* End of the subprocess 'call' */
1363 : return;
1364 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_11"} */
1365 : }
1366 :
1367 : /* AUX_FUNC ldv_random_containerless_scenario_12 */
1368 : void ldv_random_containerless_scenario_12(void *arg0) {
1369 : /* LDV {"thread": 12, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_12"} */
1370 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1371 1 : ssize_t (*ldv_12_callback_show)(struct device *, struct device_attribute *, char *);
1372 : ssize_t (*ldv_12_callback_store)(struct device *, struct device_attribute *, char *, size_t );
1373 1 : struct device_attribute *ldv_12_container_struct_device_attribute;
1374 1 : struct device *ldv_12_container_struct_device_ptr;
1375 1 : char *ldv_12_ldv_param_10_2_default;
1376 1 : long unsigned int ldv_12_ldv_param_10_3_default;
1377 1 : char *ldv_12_ldv_param_4_2_default;
1378 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1379 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1380 3 : ldv_free(arg0);
1381 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
1382 1 :
1383 1 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1384 3 : ldv_12_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1385 3 : ldv_12_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1386 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
1387 :
1388 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1389 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1390 :
1391 : /* Jump to a subprocess 'call' initial state */
1392 1 : goto ldv_call_12;
1393 : /* End of the process */
1394 : return;
1395 1 :
1396 : /* Sbprocess call */
1397 : ldv_call_12:
1398 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1399 :
1400 4 : if (ldv_undef_int()) {
1401 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1402 3 : ldv_12_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1403 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1404 :
1405 4 : if (ldv_undef_int()) {
1406 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1407 3 : ldv_12_ldv_param_10_2_default = ldv_xmalloc_unknown_size(0);
1408 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
1409 :
1410 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
1411 : /* LDV {"type": "CALLBACK", "call": "((& store_pan))(ldv_12_container_struct_device_ptr, ldv_12_container_struct_device_attribute, ldv_12_ldv_param_10_2_default, ldv_12_ldv_param_10_3_default);", "comment": "callback"} */
1412 2 : ldv_random_containerless_scenario_callback_12_10(ldv_12_callback_store, ldv_12_container_struct_device_ptr, ldv_12_container_struct_device_attribute, ldv_12_ldv_param_10_2_default, ldv_12_ldv_param_10_3_default);
1413 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1414 :
1415 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1416 2 : ldv_free(ldv_12_ldv_param_10_2_default);
1417 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
1418 :
1419 : }
1420 : else {
1421 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1422 : /* LDV {"type": "CALLBACK", "call": "((& show_pan))(ldv_12_container_struct_device_ptr, ldv_12_container_struct_device_attribute, ldv_12_ldv_param_4_2_default);", "comment": "callback"} */
1423 2 : ldv_random_containerless_scenario_callback_12_4(ldv_12_callback_show, ldv_12_container_struct_device_ptr, ldv_12_container_struct_device_attribute, ldv_12_ldv_param_4_2_default);
1424 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1425 :
1426 : }
1427 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1428 4 : ldv_free(ldv_12_ldv_param_4_2_default);
1429 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1430 :
1431 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1432 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1433 :
1434 : /* Jump to a subprocess 'call' initial state */
1435 1 : goto ldv_call_12;
1436 : }
1437 : else {
1438 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1439 2 : ldv_free(ldv_12_container_struct_device_attribute);
1440 2 : ldv_free(ldv_12_container_struct_device_ptr);
1441 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
1442 :
1443 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1444 : /* Skip a non-replicative signal receiving */
1445 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
1446 :
1447 : /* Exit function at a terminal state */
1448 1 : return;
1449 : }
1450 : /* End of the subprocess 'call' */
1451 : return;
1452 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_12"} */
1453 : }
1454 :
1455 : /* AUX_FUNC ldv_random_containerless_scenario_13 */
1456 : void ldv_random_containerless_scenario_13(void *arg0) {
1457 : /* LDV {"thread": 13, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_13"} */
1458 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1459 1 : ssize_t (*ldv_13_callback_show)(struct device *, struct device_attribute *, char *);
1460 : ssize_t (*ldv_13_callback_store)(struct device *, struct device_attribute *, char *, size_t );
1461 1 : struct device_attribute *ldv_13_container_struct_device_attribute;
1462 1 : struct device *ldv_13_container_struct_device_ptr;
1463 1 : char *ldv_13_ldv_param_10_2_default;
1464 1 : long unsigned int ldv_13_ldv_param_10_3_default;
1465 1 : char *ldv_13_ldv_param_4_2_default;
1466 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1467 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1468 3 : ldv_free(arg0);
1469 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
1470 1 :
1471 1 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1472 3 : ldv_13_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1473 3 : ldv_13_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1474 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
1475 :
1476 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1477 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1478 :
1479 : /* Jump to a subprocess 'call' initial state */
1480 1 : goto ldv_call_13;
1481 : /* End of the process */
1482 : return;
1483 1 :
1484 : /* Sbprocess call */
1485 : ldv_call_13:
1486 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1487 :
1488 4 : if (ldv_undef_int()) {
1489 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1490 3 : ldv_13_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1491 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1492 :
1493 4 : if (ldv_undef_int()) {
1494 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1495 3 : ldv_13_ldv_param_10_2_default = ldv_xmalloc_unknown_size(0);
1496 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
1497 :
1498 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
1499 : /* LDV {"type": "CALLBACK", "call": "((& store_rotate))(ldv_13_container_struct_device_ptr, ldv_13_container_struct_device_attribute, ldv_13_ldv_param_10_2_default, ldv_13_ldv_param_10_3_default);", "comment": "callback"} */
1500 2 : ldv_random_containerless_scenario_callback_13_10(ldv_13_callback_store, ldv_13_container_struct_device_ptr, ldv_13_container_struct_device_attribute, ldv_13_ldv_param_10_2_default, ldv_13_ldv_param_10_3_default);
1501 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1502 :
1503 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1504 2 : ldv_free(ldv_13_ldv_param_10_2_default);
1505 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
1506 :
1507 : }
1508 : else {
1509 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1510 : /* LDV {"type": "CALLBACK", "call": "((& show_rotate))(ldv_13_container_struct_device_ptr, ldv_13_container_struct_device_attribute, ldv_13_ldv_param_4_2_default);", "comment": "callback"} */
1511 2 : ldv_random_containerless_scenario_callback_13_4(ldv_13_callback_show, ldv_13_container_struct_device_ptr, ldv_13_container_struct_device_attribute, ldv_13_ldv_param_4_2_default);
1512 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1513 :
1514 : }
1515 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1516 4 : ldv_free(ldv_13_ldv_param_4_2_default);
1517 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1518 :
1519 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1520 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1521 :
1522 : /* Jump to a subprocess 'call' initial state */
1523 1 : goto ldv_call_13;
1524 : }
1525 : else {
1526 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1527 2 : ldv_free(ldv_13_container_struct_device_attribute);
1528 2 : ldv_free(ldv_13_container_struct_device_ptr);
1529 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
1530 :
1531 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1532 : /* Skip a non-replicative signal receiving */
1533 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
1534 :
1535 : /* Exit function at a terminal state */
1536 1 : return;
1537 : }
1538 : /* End of the subprocess 'call' */
1539 : return;
1540 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_13"} */
1541 : }
1542 :
1543 : /* AUX_FUNC ldv_random_containerless_scenario_14 */
1544 : void ldv_random_containerless_scenario_14(void *arg0) {
1545 : /* LDV {"thread": 14, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_14"} */
1546 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1547 1 : ssize_t (*ldv_14_callback_show)(struct device *, struct device_attribute *, char *);
1548 : ssize_t (*ldv_14_callback_store)(struct device *, struct device_attribute *, char *, size_t );
1549 1 : struct device_attribute *ldv_14_container_struct_device_attribute;
1550 1 : struct device *ldv_14_container_struct_device_ptr;
1551 1 : char *ldv_14_ldv_param_10_2_default;
1552 1 : long unsigned int ldv_14_ldv_param_10_3_default;
1553 1 : char *ldv_14_ldv_param_4_2_default;
1554 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1555 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1556 3 : ldv_free(arg0);
1557 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
1558 1 :
1559 1 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1560 3 : ldv_14_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1561 3 : ldv_14_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1562 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
1563 :
1564 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1565 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1566 :
1567 : /* Jump to a subprocess 'call' initial state */
1568 1 : goto ldv_call_14;
1569 : /* End of the process */
1570 : return;
1571 1 :
1572 : /* Sbprocess call */
1573 : ldv_call_14:
1574 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1575 :
1576 4 : if (ldv_undef_int()) {
1577 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1578 3 : ldv_14_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1579 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1580 :
1581 4 : if (ldv_undef_int()) {
1582 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1583 3 : ldv_14_ldv_param_10_2_default = ldv_xmalloc_unknown_size(0);
1584 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
1585 :
1586 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
1587 : /* LDV {"type": "CALLBACK", "call": "((& store_virtual))(ldv_14_container_struct_device_ptr, ldv_14_container_struct_device_attribute, ldv_14_ldv_param_10_2_default, ldv_14_ldv_param_10_3_default);", "comment": "callback"} */
1588 2 : ldv_random_containerless_scenario_callback_14_10(ldv_14_callback_store, ldv_14_container_struct_device_ptr, ldv_14_container_struct_device_attribute, ldv_14_ldv_param_10_2_default, ldv_14_ldv_param_10_3_default);
1589 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1590 :
1591 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1592 2 : ldv_free(ldv_14_ldv_param_10_2_default);
1593 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
1594 :
1595 : }
1596 : else {
1597 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1598 : /* LDV {"type": "CALLBACK", "call": "((& show_stride))(ldv_14_container_struct_device_ptr, ldv_14_container_struct_device_attribute, ldv_14_ldv_param_4_2_default);", "comment": "callback"} */
1599 2 : ldv_random_containerless_scenario_callback_14_4(ldv_14_callback_show, ldv_14_container_struct_device_ptr, ldv_14_container_struct_device_attribute, ldv_14_ldv_param_4_2_default);
1600 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1601 :
1602 : }
1603 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1604 4 : ldv_free(ldv_14_ldv_param_4_2_default);
1605 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1606 :
1607 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1608 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1609 :
1610 : /* Jump to a subprocess 'call' initial state */
1611 1 : goto ldv_call_14;
1612 : }
1613 : else {
1614 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1615 2 : ldv_free(ldv_14_container_struct_device_attribute);
1616 2 : ldv_free(ldv_14_container_struct_device_ptr);
1617 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
1618 :
1619 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1620 : /* Skip a non-replicative signal receiving */
1621 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
1622 :
1623 : /* Exit function at a terminal state */
1624 1 : return;
1625 : }
1626 : /* End of the subprocess 'call' */
1627 : return;
1628 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_14"} */
1629 : }
1630 :
1631 : /* AUX_FUNC ldv_random_containerless_scenario_15 */
1632 : void ldv_random_containerless_scenario_15(void *arg0) {
1633 : /* LDV {"thread": 15, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_15"} */
1634 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1635 1 : ssize_t (*ldv_15_callback_show)(struct device *, struct device_attribute *, char *);
1636 : ssize_t (*ldv_15_callback_store)(struct device *, struct device_attribute *, char *, size_t );
1637 1 : struct device_attribute *ldv_15_container_struct_device_attribute;
1638 1 : struct device *ldv_15_container_struct_device_ptr;
1639 1 : char *ldv_15_ldv_param_10_2_default;
1640 1 : long unsigned int ldv_15_ldv_param_10_3_default;
1641 1 : char *ldv_15_ldv_param_4_2_default;
1642 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1643 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1644 3 : ldv_free(arg0);
1645 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
1646 1 :
1647 1 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1648 3 : ldv_15_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1649 3 : ldv_15_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1650 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
1651 :
1652 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1653 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1654 :
1655 : /* Jump to a subprocess 'call' initial state */
1656 1 : goto ldv_call_15;
1657 : /* End of the process */
1658 : return;
1659 1 :
1660 : /* Sbprocess call */
1661 : ldv_call_15:
1662 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1663 :
1664 4 : if (ldv_undef_int()) {
1665 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1666 3 : ldv_15_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1667 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1668 :
1669 4 : if (ldv_undef_int()) {
1670 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1671 3 : ldv_15_ldv_param_10_2_default = ldv_xmalloc_unknown_size(0);
1672 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
1673 :
1674 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
1675 : /* LDV {"type": "CALLBACK", "call": "((& store_virtual))(ldv_15_container_struct_device_ptr, ldv_15_container_struct_device_attribute, ldv_15_ldv_param_10_2_default, ldv_15_ldv_param_10_3_default);", "comment": "callback"} */
1676 2 : ldv_random_containerless_scenario_callback_15_10(ldv_15_callback_store, ldv_15_container_struct_device_ptr, ldv_15_container_struct_device_attribute, ldv_15_ldv_param_10_2_default, ldv_15_ldv_param_10_3_default);
1677 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1678 :
1679 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1680 2 : ldv_free(ldv_15_ldv_param_10_2_default);
1681 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
1682 :
1683 : }
1684 : else {
1685 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1686 : /* LDV {"type": "CALLBACK", "call": "((& show_virtual))(ldv_15_container_struct_device_ptr, ldv_15_container_struct_device_attribute, ldv_15_ldv_param_4_2_default);", "comment": "callback"} */
1687 2 : ldv_random_containerless_scenario_callback_15_4(ldv_15_callback_show, ldv_15_container_struct_device_ptr, ldv_15_container_struct_device_attribute, ldv_15_ldv_param_4_2_default);
1688 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1689 :
1690 : }
1691 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1692 4 : ldv_free(ldv_15_ldv_param_4_2_default);
1693 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1694 :
1695 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1696 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1697 :
1698 : /* Jump to a subprocess 'call' initial state */
1699 1 : goto ldv_call_15;
1700 : }
1701 : else {
1702 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1703 2 : ldv_free(ldv_15_container_struct_device_attribute);
1704 2 : ldv_free(ldv_15_container_struct_device_ptr);
1705 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
1706 :
1707 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1708 : /* Skip a non-replicative signal receiving */
1709 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
1710 :
1711 : /* Exit function at a terminal state */
1712 1 : return;
1713 : }
1714 : /* End of the subprocess 'call' */
1715 : return;
1716 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_15"} */
1717 : }
1718 :
1719 : /* AUX_FUNC ldv_random_containerless_scenario_4 */
1720 : void ldv_random_containerless_scenario_4(void *arg0) {
1721 : /* LDV {"thread": 4, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_4"} */
1722 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1723 1 : ssize_t (*ldv_4_callback_show)(struct device *, struct device_attribute *, char *);
1724 : ssize_t (*ldv_4_callback_store)(struct device *, struct device_attribute *, char *, size_t );
1725 1 : struct device_attribute *ldv_4_container_struct_device_attribute;
1726 1 : struct device *ldv_4_container_struct_device_ptr;
1727 1 : char *ldv_4_ldv_param_10_2_default;
1728 1 : long unsigned int ldv_4_ldv_param_10_3_default;
1729 1 : char *ldv_4_ldv_param_4_2_default;
1730 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1731 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1732 3 : ldv_free(arg0);
1733 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
1734 1 :
1735 1 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1736 3 : ldv_4_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1737 3 : ldv_4_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1738 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
1739 :
1740 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1741 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1742 :
1743 : /* Jump to a subprocess 'call' initial state */
1744 1 : goto ldv_call_4;
1745 : /* End of the process */
1746 : return;
1747 1 :
1748 : /* Sbprocess call */
1749 : ldv_call_4:
1750 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1751 :
1752 4 : if (ldv_undef_int()) {
1753 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1754 3 : ldv_4_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1755 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1756 :
1757 4 : if (ldv_undef_int()) {
1758 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1759 3 : ldv_4_ldv_param_10_2_default = ldv_xmalloc_unknown_size(0);
1760 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
1761 :
1762 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
1763 : /* LDV {"type": "CALLBACK", "call": "((& store_blank))(ldv_4_container_struct_device_ptr, ldv_4_container_struct_device_attribute, ldv_4_ldv_param_10_2_default, ldv_4_ldv_param_10_3_default);", "comment": "callback"} */
1764 2 : ldv_random_containerless_scenario_callback_4_10(ldv_4_callback_store, ldv_4_container_struct_device_ptr, ldv_4_container_struct_device_attribute, ldv_4_ldv_param_10_2_default, ldv_4_ldv_param_10_3_default);
1765 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1766 :
1767 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1768 2 : ldv_free(ldv_4_ldv_param_10_2_default);
1769 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
1770 :
1771 : }
1772 : else {
1773 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1774 : /* LDV {"type": "CALLBACK", "call": "((& show_blank))(ldv_4_container_struct_device_ptr, ldv_4_container_struct_device_attribute, ldv_4_ldv_param_4_2_default);", "comment": "callback"} */
1775 2 : ldv_random_containerless_scenario_callback_4_4(ldv_4_callback_show, ldv_4_container_struct_device_ptr, ldv_4_container_struct_device_attribute, ldv_4_ldv_param_4_2_default);
1776 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1777 :
1778 : }
1779 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1780 4 : ldv_free(ldv_4_ldv_param_4_2_default);
1781 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1782 :
1783 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1784 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1785 :
1786 : /* Jump to a subprocess 'call' initial state */
1787 1 : goto ldv_call_4;
1788 : }
1789 : else {
1790 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1791 2 : ldv_free(ldv_4_container_struct_device_attribute);
1792 2 : ldv_free(ldv_4_container_struct_device_ptr);
1793 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
1794 :
1795 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1796 : /* Skip a non-replicative signal receiving */
1797 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
1798 :
1799 : /* Exit function at a terminal state */
1800 1 : return;
1801 : }
1802 : /* End of the subprocess 'call' */
1803 : return;
1804 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_4"} */
1805 : }
1806 :
1807 : /* AUX_FUNC ldv_random_containerless_scenario_5 */
1808 : void ldv_random_containerless_scenario_5(void *arg0) {
1809 : /* LDV {"thread": 5, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_5"} */
1810 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1811 1 : ssize_t (*ldv_5_callback_show)(struct device *, struct device_attribute *, char *);
1812 : ssize_t (*ldv_5_callback_store)(struct device *, struct device_attribute *, char *, size_t );
1813 1 : struct device_attribute *ldv_5_container_struct_device_attribute;
1814 1 : struct device *ldv_5_container_struct_device_ptr;
1815 1 : char *ldv_5_ldv_param_10_2_default;
1816 1 : long unsigned int ldv_5_ldv_param_10_3_default;
1817 1 : char *ldv_5_ldv_param_4_2_default;
1818 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1819 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1820 3 : ldv_free(arg0);
1821 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
1822 1 :
1823 1 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1824 3 : ldv_5_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1825 3 : ldv_5_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1826 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
1827 :
1828 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1829 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1830 :
1831 : /* Jump to a subprocess 'call' initial state */
1832 1 : goto ldv_call_5;
1833 : /* End of the process */
1834 : return;
1835 1 :
1836 : /* Sbprocess call */
1837 : ldv_call_5:
1838 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1839 :
1840 4 : if (ldv_undef_int()) {
1841 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1842 3 : ldv_5_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1843 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1844 :
1845 4 : if (ldv_undef_int()) {
1846 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1847 3 : ldv_5_ldv_param_10_2_default = ldv_xmalloc_unknown_size(0);
1848 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
1849 :
1850 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
1851 : /* LDV {"type": "CALLBACK", "call": "((& store_bpp))(ldv_5_container_struct_device_ptr, ldv_5_container_struct_device_attribute, ldv_5_ldv_param_10_2_default, ldv_5_ldv_param_10_3_default);", "comment": "callback"} */
1852 2 : ldv_random_containerless_scenario_callback_5_10(ldv_5_callback_store, ldv_5_container_struct_device_ptr, ldv_5_container_struct_device_attribute, ldv_5_ldv_param_10_2_default, ldv_5_ldv_param_10_3_default);
1853 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1854 :
1855 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1856 2 : ldv_free(ldv_5_ldv_param_10_2_default);
1857 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
1858 :
1859 : }
1860 : else {
1861 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1862 : /* LDV {"type": "CALLBACK", "call": "((& show_bpp))(ldv_5_container_struct_device_ptr, ldv_5_container_struct_device_attribute, ldv_5_ldv_param_4_2_default);", "comment": "callback"} */
1863 2 : ldv_random_containerless_scenario_callback_5_4(ldv_5_callback_show, ldv_5_container_struct_device_ptr, ldv_5_container_struct_device_attribute, ldv_5_ldv_param_4_2_default);
1864 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1865 :
1866 : }
1867 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1868 4 : ldv_free(ldv_5_ldv_param_4_2_default);
1869 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1870 :
1871 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1872 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1873 :
1874 : /* Jump to a subprocess 'call' initial state */
1875 1 : goto ldv_call_5;
1876 : }
1877 : else {
1878 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1879 2 : ldv_free(ldv_5_container_struct_device_attribute);
1880 2 : ldv_free(ldv_5_container_struct_device_ptr);
1881 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
1882 :
1883 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1884 : /* Skip a non-replicative signal receiving */
1885 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
1886 :
1887 : /* Exit function at a terminal state */
1888 1 : return;
1889 : }
1890 : /* End of the subprocess 'call' */
1891 : return;
1892 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_5"} */
1893 : }
1894 :
1895 : /* AUX_FUNC ldv_random_containerless_scenario_6 */
1896 : void ldv_random_containerless_scenario_6(void *arg0) {
1897 : /* LDV {"thread": 6, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_6"} */
1898 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1899 1 : ssize_t (*ldv_6_callback_show)(struct device *, struct device_attribute *, char *);
1900 : ssize_t (*ldv_6_callback_store)(struct device *, struct device_attribute *, char *, size_t );
1901 1 : struct device_attribute *ldv_6_container_struct_device_attribute;
1902 1 : struct device *ldv_6_container_struct_device_ptr;
1903 1 : char *ldv_6_ldv_param_10_2_default;
1904 1 : long unsigned int ldv_6_ldv_param_10_3_default;
1905 1 : char *ldv_6_ldv_param_4_2_default;
1906 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1907 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1908 3 : ldv_free(arg0);
1909 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
1910 1 :
1911 1 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1912 3 : ldv_6_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1913 3 : ldv_6_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1914 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
1915 :
1916 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1917 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1918 :
1919 : /* Jump to a subprocess 'call' initial state */
1920 1 : goto ldv_call_6;
1921 : /* End of the process */
1922 : return;
1923 1 :
1924 : /* Sbprocess call */
1925 : ldv_call_6:
1926 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1927 :
1928 4 : if (ldv_undef_int()) {
1929 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1930 3 : ldv_6_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1931 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1932 :
1933 4 : if (ldv_undef_int()) {
1934 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1935 3 : ldv_6_ldv_param_10_2_default = ldv_xmalloc_unknown_size(0);
1936 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
1937 :
1938 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
1939 : /* LDV {"type": "CALLBACK", "call": "((& store_console))(ldv_6_container_struct_device_ptr, ldv_6_container_struct_device_attribute, ldv_6_ldv_param_10_2_default, ldv_6_ldv_param_10_3_default);", "comment": "callback"} */
1940 2 : ldv_random_containerless_scenario_callback_6_10(ldv_6_callback_store, ldv_6_container_struct_device_ptr, ldv_6_container_struct_device_attribute, ldv_6_ldv_param_10_2_default, ldv_6_ldv_param_10_3_default);
1941 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1942 :
1943 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1944 2 : ldv_free(ldv_6_ldv_param_10_2_default);
1945 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
1946 :
1947 : }
1948 : else {
1949 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1950 : /* LDV {"type": "CALLBACK", "call": "((& show_console))(ldv_6_container_struct_device_ptr, ldv_6_container_struct_device_attribute, ldv_6_ldv_param_4_2_default);", "comment": "callback"} */
1951 2 : ldv_random_containerless_scenario_callback_6_4(ldv_6_callback_show, ldv_6_container_struct_device_ptr, ldv_6_container_struct_device_attribute, ldv_6_ldv_param_4_2_default);
1952 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1953 :
1954 : }
1955 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1956 4 : ldv_free(ldv_6_ldv_param_4_2_default);
1957 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1958 :
1959 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1960 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1961 :
1962 : /* Jump to a subprocess 'call' initial state */
1963 1 : goto ldv_call_6;
1964 : }
1965 : else {
1966 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1967 2 : ldv_free(ldv_6_container_struct_device_attribute);
1968 2 : ldv_free(ldv_6_container_struct_device_ptr);
1969 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
1970 :
1971 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1972 : /* Skip a non-replicative signal receiving */
1973 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
1974 :
1975 : /* Exit function at a terminal state */
1976 1 : return;
1977 : }
1978 : /* End of the subprocess 'call' */
1979 : return;
1980 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_6"} */
1981 : }
1982 :
1983 : /* AUX_FUNC ldv_random_containerless_scenario_7 */
1984 : void ldv_random_containerless_scenario_7(void *arg0) {
1985 : /* LDV {"thread": 7, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_7"} */
1986 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1987 1 : ssize_t (*ldv_7_callback_show)(struct device *, struct device_attribute *, char *);
1988 : ssize_t (*ldv_7_callback_store)(struct device *, struct device_attribute *, char *, size_t );
1989 1 : struct device_attribute *ldv_7_container_struct_device_attribute;
1990 1 : struct device *ldv_7_container_struct_device_ptr;
1991 1 : char *ldv_7_ldv_param_10_2_default;
1992 1 : long unsigned int ldv_7_ldv_param_10_3_default;
1993 1 : char *ldv_7_ldv_param_4_2_default;
1994 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1995 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1996 3 : ldv_free(arg0);
1997 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
1998 1 :
1999 1 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
2000 3 : ldv_7_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
2001 3 : ldv_7_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
2002 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
2003 :
2004 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2005 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2006 :
2007 : /* Jump to a subprocess 'call' initial state */
2008 1 : goto ldv_call_7;
2009 : /* End of the process */
2010 : return;
2011 1 :
2012 : /* Sbprocess call */
2013 : ldv_call_7:
2014 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2015 :
2016 4 : if (ldv_undef_int()) {
2017 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2018 3 : ldv_7_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
2019 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
2020 :
2021 4 : if (ldv_undef_int()) {
2022 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2023 3 : ldv_7_ldv_param_10_2_default = ldv_xmalloc_unknown_size(0);
2024 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
2025 :
2026 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
2027 : /* LDV {"type": "CALLBACK", "call": "((& store_cursor))(ldv_7_container_struct_device_ptr, ldv_7_container_struct_device_attribute, ldv_7_ldv_param_10_2_default, ldv_7_ldv_param_10_3_default);", "comment": "callback"} */
2028 2 : ldv_random_containerless_scenario_callback_7_10(ldv_7_callback_store, ldv_7_container_struct_device_ptr, ldv_7_container_struct_device_attribute, ldv_7_ldv_param_10_2_default, ldv_7_ldv_param_10_3_default);
2029 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2030 :
2031 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2032 2 : ldv_free(ldv_7_ldv_param_10_2_default);
2033 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
2034 :
2035 : }
2036 : else {
2037 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
2038 : /* LDV {"type": "CALLBACK", "call": "((& show_cursor))(ldv_7_container_struct_device_ptr, ldv_7_container_struct_device_attribute, ldv_7_ldv_param_4_2_default);", "comment": "callback"} */
2039 2 : ldv_random_containerless_scenario_callback_7_4(ldv_7_callback_show, ldv_7_container_struct_device_ptr, ldv_7_container_struct_device_attribute, ldv_7_ldv_param_4_2_default);
2040 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2041 :
2042 : }
2043 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2044 4 : ldv_free(ldv_7_ldv_param_4_2_default);
2045 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
2046 :
2047 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2048 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2049 :
2050 : /* Jump to a subprocess 'call' initial state */
2051 1 : goto ldv_call_7;
2052 : }
2053 : else {
2054 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
2055 2 : ldv_free(ldv_7_container_struct_device_attribute);
2056 2 : ldv_free(ldv_7_container_struct_device_ptr);
2057 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
2058 :
2059 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2060 : /* Skip a non-replicative signal receiving */
2061 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
2062 :
2063 : /* Exit function at a terminal state */
2064 1 : return;
2065 : }
2066 : /* End of the subprocess 'call' */
2067 : return;
2068 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_7"} */
2069 : }
2070 :
2071 : /* AUX_FUNC ldv_random_containerless_scenario_8 */
2072 : void ldv_random_containerless_scenario_8(void *arg0) {
2073 : /* LDV {"thread": 8, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_8"} */
2074 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2075 1 : ssize_t (*ldv_8_callback_show)(struct device *, struct device_attribute *, char *);
2076 : ssize_t (*ldv_8_callback_store)(struct device *, struct device_attribute *, char *, size_t );
2077 1 : struct device_attribute *ldv_8_container_struct_device_attribute;
2078 1 : struct device *ldv_8_container_struct_device_ptr;
2079 1 : char *ldv_8_ldv_param_10_2_default;
2080 1 : long unsigned int ldv_8_ldv_param_10_3_default;
2081 1 : char *ldv_8_ldv_param_4_2_default;
2082 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2083 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2084 3 : ldv_free(arg0);
2085 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
2086 1 :
2087 1 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
2088 3 : ldv_8_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
2089 3 : ldv_8_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
2090 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
2091 :
2092 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2093 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2094 :
2095 : /* Jump to a subprocess 'call' initial state */
2096 1 : goto ldv_call_8;
2097 : /* End of the process */
2098 : return;
2099 1 :
2100 : /* Sbprocess call */
2101 : ldv_call_8:
2102 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2103 :
2104 4 : if (ldv_undef_int()) {
2105 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2106 3 : ldv_8_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
2107 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
2108 :
2109 4 : if (ldv_undef_int()) {
2110 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2111 3 : ldv_8_ldv_param_10_2_default = ldv_xmalloc_unknown_size(0);
2112 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
2113 :
2114 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
2115 : /* LDV {"type": "CALLBACK", "call": "((& store_fbstate))(ldv_8_container_struct_device_ptr, ldv_8_container_struct_device_attribute, ldv_8_ldv_param_10_2_default, ldv_8_ldv_param_10_3_default);", "comment": "callback"} */
2116 2 : ldv_random_containerless_scenario_callback_8_10(ldv_8_callback_store, ldv_8_container_struct_device_ptr, ldv_8_container_struct_device_attribute, ldv_8_ldv_param_10_2_default, ldv_8_ldv_param_10_3_default);
2117 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2118 :
2119 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2120 2 : ldv_free(ldv_8_ldv_param_10_2_default);
2121 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
2122 :
2123 : }
2124 : else {
2125 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
2126 : /* LDV {"type": "CALLBACK", "call": "((& show_fbstate))(ldv_8_container_struct_device_ptr, ldv_8_container_struct_device_attribute, ldv_8_ldv_param_4_2_default);", "comment": "callback"} */
2127 2 : ldv_random_containerless_scenario_callback_8_4(ldv_8_callback_show, ldv_8_container_struct_device_ptr, ldv_8_container_struct_device_attribute, ldv_8_ldv_param_4_2_default);
2128 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2129 :
2130 : }
2131 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2132 4 : ldv_free(ldv_8_ldv_param_4_2_default);
2133 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
2134 :
2135 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2136 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2137 :
2138 : /* Jump to a subprocess 'call' initial state */
2139 1 : goto ldv_call_8;
2140 : }
2141 : else {
2142 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
2143 2 : ldv_free(ldv_8_container_struct_device_attribute);
2144 2 : ldv_free(ldv_8_container_struct_device_ptr);
2145 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
2146 :
2147 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2148 : /* Skip a non-replicative signal receiving */
2149 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
2150 :
2151 : /* Exit function at a terminal state */
2152 1 : return;
2153 : }
2154 : /* End of the subprocess 'call' */
2155 : return;
2156 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_8"} */
2157 : }
2158 :
2159 : /* AUX_FUNC ldv_random_containerless_scenario_9 */
2160 : void ldv_random_containerless_scenario_9(void *arg0) {
2161 : /* LDV {"thread": 9, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_9"} */
2162 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2163 1 : ssize_t (*ldv_9_callback_show)(struct device *, struct device_attribute *, char *);
2164 : ssize_t (*ldv_9_callback_store)(struct device *, struct device_attribute *, char *, size_t );
2165 1 : struct device_attribute *ldv_9_container_struct_device_attribute;
2166 1 : struct device *ldv_9_container_struct_device_ptr;
2167 1 : char *ldv_9_ldv_param_10_2_default;
2168 1 : long unsigned int ldv_9_ldv_param_10_3_default;
2169 1 : char *ldv_9_ldv_param_4_2_default;
2170 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2171 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2172 3 : ldv_free(arg0);
2173 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
2174 1 :
2175 1 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
2176 3 : ldv_9_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
2177 3 : ldv_9_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
2178 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
2179 :
2180 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2181 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2182 :
2183 : /* Jump to a subprocess 'call' initial state */
2184 1 : goto ldv_call_9;
2185 : /* End of the process */
2186 : return;
2187 1 :
2188 : /* Sbprocess call */
2189 : ldv_call_9:
2190 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2191 :
2192 4 : if (ldv_undef_int()) {
2193 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2194 3 : ldv_9_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
2195 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
2196 :
2197 4 : if (ldv_undef_int()) {
2198 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2199 3 : ldv_9_ldv_param_10_2_default = ldv_xmalloc_unknown_size(0);
2200 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
2201 :
2202 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
2203 : /* LDV {"type": "CALLBACK", "call": "((& store_mode))(ldv_9_container_struct_device_ptr, ldv_9_container_struct_device_attribute, ldv_9_ldv_param_10_2_default, ldv_9_ldv_param_10_3_default);", "comment": "callback"} */
2204 2 : ldv_random_containerless_scenario_callback_9_10(ldv_9_callback_store, ldv_9_container_struct_device_ptr, ldv_9_container_struct_device_attribute, ldv_9_ldv_param_10_2_default, ldv_9_ldv_param_10_3_default);
2205 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2206 :
2207 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2208 2 : ldv_free(ldv_9_ldv_param_10_2_default);
2209 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
2210 :
2211 : }
2212 : else {
2213 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
2214 : /* LDV {"type": "CALLBACK", "call": "((& show_mode))(ldv_9_container_struct_device_ptr, ldv_9_container_struct_device_attribute, ldv_9_ldv_param_4_2_default);", "comment": "callback"} */
2215 2 : ldv_random_containerless_scenario_callback_9_4(ldv_9_callback_show, ldv_9_container_struct_device_ptr, ldv_9_container_struct_device_attribute, ldv_9_ldv_param_4_2_default);
2216 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2217 :
2218 : }
2219 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2220 4 : ldv_free(ldv_9_ldv_param_4_2_default);
2221 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
2222 :
2223 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2224 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2225 :
2226 : /* Jump to a subprocess 'call' initial state */
2227 1 : goto ldv_call_9;
2228 : }
2229 : else {
2230 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
2231 2 : ldv_free(ldv_9_container_struct_device_attribute);
2232 2 : ldv_free(ldv_9_container_struct_device_ptr);
2233 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
2234 :
2235 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2236 : /* Skip a non-replicative signal receiving */
2237 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
2238 :
2239 : /* Exit function at a terminal state */
2240 1 : return;
2241 : }
2242 : /* End of the subprocess 'call' */
2243 : return;
2244 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_9"} */
2245 : }
2246 :
2247 : /* AUX_FUNC ldv_traverse_kernel_items_scenario_3 */
2248 : void ldv_traverse_kernel_items_scenario_3(void *arg0) {
2249 : /* LDV {"thread": 3, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'traverse_kernel_items_scenario(seq_operations)'", "function": "ldv_traverse_kernel_items_scenario_3"} */
2250 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2251 1 : long long int *ldv_3_ldv_param_13_1_default;
2252 1 : void *ldv_3_ldv_param_2_1_default;
2253 1 : void *ldv_3_ldv_param_6_1_default;
2254 1 : void *ldv_3_ldv_param_7_1_default;
2255 1 : long long int *ldv_3_ldv_param_7_2_default;
2256 1 : struct seq_operations *ldv_3_ops_seq_operations;
2257 1 : void *ldv_3_ret_default;
2258 1 : struct seq_file *ldv_3_seq_file_seq_file;
2259 1 : /* Received labels */
2260 2 : struct ldv_struct_traverse_kernel_items_scenario_3 *data = (struct ldv_struct_traverse_kernel_items_scenario_3*) arg0;
2261 1 :
2262 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2263 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin SEQ_OPERATIONS callbacks invocations scenario."} */
2264 : /* Assign recieved labels */
2265 2 : if (data) {
2266 1 : ldv_3_seq_file_seq_file = data->arg0;
2267 1 : ldv_3_ops_seq_operations = data->arg1;
2268 2 : ldv_free(data);
2269 : }
2270 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
2271 :
2272 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Start sequence or do nothing."} */
2273 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_END"} */
2274 :
2275 : /* Jump to a subprocess 'start_step' initial state */
2276 2 : goto ldv_start_step_3;
2277 : /* End of the process */
2278 : return;
2279 1 :
2280 : /* Sbprocess start_step */
2281 : ldv_start_step_3:
2282 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2283 :
2284 : /* LDV {"action": "PRE_CALL_13", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2285 3 : ldv_3_ldv_param_13_1_default = ldv_xmalloc_unknown_size(0);
2286 : /* LDV {"action": "PRE_CALL_13", "type": "CONDITION_END"} */
2287 :
2288 : /* LDV {"action": "START", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize data for walking through a list of kernel items. Invoke callback start from seq_operations."} */
2289 : /* LDV {"type": "CALLBACK", "call": "ldv_3_ret_default = ((& fb_seq_start))(ldv_3_seq_file_seq_file, ldv_3_ldv_param_13_1_default);", "comment": "start"} */
2290 2 : ldv_3_ret_default = ldv_traverse_kernel_items_scenario_start_3_13(ldv_3_ops_seq_operations->start, ldv_3_seq_file_seq_file, ldv_3_ldv_param_13_1_default);
2291 : /* LDV {"action": "START", "type": "CALL_END"} */
2292 :
2293 : /* LDV {"action": "POST_CALL_13", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2294 2 : ldv_free(ldv_3_ldv_param_13_1_default);
2295 : /* LDV {"action": "POST_CALL_13", "type": "CONDITION_END"} */
2296 :
2297 4 : if (ldv_undef_int()) {
2298 : /* LDV {"action": "START_SUCCESS", "type": "CONDITION_BEGIN", "comment": "A new sequence is initialized successfully."} */
2299 2 : ldv_assume(ldv_3_ret_default != 0);
2300 : /* LDV {"action": "START_SUCCESS", "type": "CONDITION_END"} */
2301 :
2302 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Continue iteration over kernel items."} */
2303 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_END"} */
2304 :
2305 : /* Jump to a subprocess 'next_step' initial state */
2306 1 : goto ldv_next_step_3;
2307 : }
2308 : else {
2309 : /* LDV {"action": "START_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize a new sequence."} */
2310 2 : ldv_assume(ldv_3_ret_default == 0);
2311 : /* LDV {"action": "START_FAILED", "type": "CONDITION_END"} */
2312 :
2313 : /* LDV {"action": "DEFAULT_FREE_4", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
2314 2 : ldv_free(ldv_3_seq_file_seq_file);
2315 : /* LDV {"action": "DEFAULT_FREE_4", "type": "CONDITION_END"} */
2316 :
2317 : /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "RECEIVE_BEGIN", "comment": "Finish SEQ_OPERATIONS callbacks invocations scenario."} */
2318 : /* Skip a non-replicative signal receiving */
2319 : /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "RECEIVE_END"} */
2320 :
2321 : /* Exit function at a terminal state */
2322 1 : return;
2323 : }
2324 : /* End of the subprocess 'start_step' */
2325 : return;
2326 1 :
2327 : /* Sbprocess next_step */
2328 : ldv_next_step_3:
2329 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2330 :
2331 : /* LDV {"action": "PRE_CALL_7", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2332 2 : ldv_3_ldv_param_7_1_default = ldv_xmalloc_unknown_size(0);
2333 3 : ldv_3_ldv_param_7_2_default = ldv_xmalloc_unknown_size(0);
2334 : /* LDV {"action": "PRE_CALL_7", "type": "CONDITION_END"} */
2335 :
2336 : /* LDV {"action": "NEXT", "type": "CALL_BEGIN", "callback": true, "comment": "Advance to the new item. Invoke callback next from seq_operations."} */
2337 : /* LDV {"type": "CALLBACK", "call": "ldv_3_ret_default = ((& fb_seq_next))(ldv_3_seq_file_seq_file, ldv_3_ldv_param_7_1_default, ldv_3_ldv_param_7_2_default);", "comment": "next"} */
2338 2 : ldv_3_ret_default = ldv_traverse_kernel_items_scenario_next_3_7(ldv_3_ops_seq_operations->next, ldv_3_seq_file_seq_file, ldv_3_ldv_param_7_1_default, ldv_3_ldv_param_7_2_default);
2339 : /* LDV {"action": "NEXT", "type": "CALL_END"} */
2340 :
2341 : /* LDV {"action": "POST_CALL_7", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2342 2 : ldv_free(ldv_3_ldv_param_7_1_default);
2343 2 : ldv_free(ldv_3_ldv_param_7_2_default);
2344 : /* LDV {"action": "POST_CALL_7", "type": "CONDITION_END"} */
2345 :
2346 : /* LDV {"action": "PRE_CALL_6", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2347 2 : ldv_3_ldv_param_6_1_default = ldv_xmalloc_unknown_size(0);
2348 : /* LDV {"action": "PRE_CALL_6", "type": "CONDITION_END"} */
2349 :
2350 : /* LDV {"action": "SHOW", "type": "CALL_BEGIN", "callback": true, "comment": "Show current item: put data into the seq_file output buffer. Invoke callback show from seq_operations."} */
2351 : /* LDV {"type": "CALLBACK", "call": "((& fb_seq_show))(ldv_3_seq_file_seq_file, ldv_3_ldv_param_6_1_default);", "comment": "show"} */
2352 2 : ldv_traverse_kernel_items_scenario_show_3_6(ldv_3_ops_seq_operations->show, ldv_3_seq_file_seq_file, ldv_3_ldv_param_6_1_default);
2353 : /* LDV {"action": "SHOW", "type": "CALL_END"} */
2354 :
2355 : /* LDV {"action": "POST_CALL_6", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2356 2 : ldv_free(ldv_3_ldv_param_6_1_default);
2357 : /* LDV {"action": "POST_CALL_6", "type": "CONDITION_END"} */
2358 :
2359 4 : if (ldv_undef_int()) {
2360 : /* LDV {"action": "NEXT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "More items to show are left."} */
2361 2 : ldv_assume(ldv_3_ret_default != 0);
2362 : /* LDV {"action": "NEXT_SUCCESS", "type": "CONDITION_END"} */
2363 :
2364 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Continue iteration over kernel items."} */
2365 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_END"} */
2366 :
2367 : /* Jump to a subprocess 'next_step' initial state */
2368 1 : goto ldv_next_step_3;
2369 : }
2370 : else {
2371 : /* LDV {"action": "NEXT_FAIL", "type": "CONDITION_BEGIN", "comment": "The last kernel item is reached."} */
2372 2 : ldv_assume(ldv_3_ret_default == 0);
2373 : /* LDV {"action": "NEXT_FAIL", "type": "CONDITION_END"} */
2374 :
2375 : /* LDV {"action": "PRE_CALL_2", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2376 2 : ldv_3_ldv_param_2_1_default = ldv_xmalloc_unknown_size(0);
2377 : /* LDV {"action": "PRE_CALL_2", "type": "CONDITION_END"} */
2378 :
2379 : /* LDV {"action": "STOP", "type": "CALL_BEGIN", "callback": true, "comment": "End of the sequence is reached, do necessary cleanup. Invoke callback stop from seq_operations."} */
2380 : /* LDV {"type": "CALLBACK", "call": "((& fb_seq_stop))(ldv_3_seq_file_seq_file, ldv_3_ldv_param_2_1_default);", "comment": "stop"} */
2381 2 : ldv_traverse_kernel_items_scenario_stop_3_2(ldv_3_ops_seq_operations->stop, ldv_3_seq_file_seq_file, ldv_3_ldv_param_2_1_default);
2382 : /* LDV {"action": "STOP", "type": "CALL_END"} */
2383 :
2384 : /* LDV {"action": "POST_CALL_2", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2385 2 : ldv_free(ldv_3_ldv_param_2_1_default);
2386 : /* LDV {"action": "POST_CALL_2", "type": "CONDITION_END"} */
2387 :
2388 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Start sequence or do nothing."} */
2389 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_END"} */
2390 :
2391 : /* Jump to a subprocess 'start_step' initial state */
2392 1 : goto ldv_start_step_3;
2393 : }
2394 : /* End of the subprocess 'next_step' */
2395 : return;
2396 : /* LDV {"comment": "End of control function based on process 'traverse_kernel_items_scenario(seq_operations)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_traverse_kernel_items_scenario_3"} */
2397 : }
2398 :
2399 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_next_3_7 */
2400 : void * ldv_traverse_kernel_items_scenario_next_3_7(void *(*arg0)(struct seq_file *, void *, loff_t *), struct seq_file *arg1, void *arg2, long long int *arg3) {
2401 3 : return ((& fb_seq_next))(arg1, arg2, arg3);
2402 : }
2403 :
2404 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_show_3_6 */
2405 1 : void ldv_traverse_kernel_items_scenario_show_3_6(int (*arg0)(struct seq_file *, void *), struct seq_file *arg1, void *arg2) {
2406 2 : ((& fb_seq_show))(arg1, arg2);
2407 1 : }
2408 :
2409 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_start_3_13 */
2410 : void * ldv_traverse_kernel_items_scenario_start_3_13(void *(*arg0)(struct seq_file *, loff_t *), struct seq_file *arg1, long long int *arg2) {
2411 3 : return ((& fb_seq_start))(arg1, arg2);
2412 : }
2413 :
2414 1 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_stop_3_2 */
2415 : void ldv_traverse_kernel_items_scenario_stop_3_2(void (*arg0)(struct seq_file *, void *), struct seq_file *arg1, void *arg2) {
2416 2 : ((& fb_seq_stop))(arg1, arg2);
2417 1 : }
2418 :
2419 : /* AUX_FUNC main */
2420 : int main() {
2421 1 : ldv_main_20(0);
2422 0 : return 0;
2423 : }
2424 :
2425 :
2426 : /* AUX_FUNC ERR_PTR */
2427 : static inline void *ERR_PTR (long int error)
2428 : {
2429 :
2430 : return ldv_err_ptr(error);
2431 : }
2432 :
2433 : /* AUX_FUNC PTR_ERR */
2434 : static inline long int PTR_ERR (void const *ptr)
2435 : {
2436 1 :
2437 3 : return ldv_ptr_err(ptr);
2438 : }
2439 :
2440 : /* AUX_FUNC IS_ERR */
2441 : static inline long int IS_ERR (void const *ptr)
2442 : {
2443 1 :
2444 3 : return ldv_is_err(ptr);
2445 : }
2446 :
2447 : /* AUX_FUNC IS_ERR_OR_NULL */
2448 : static inline long int IS_ERR_OR_NULL (void const *ptr)
2449 : {
2450 :
2451 : return ldv_is_err_or_null(ptr);
2452 : }
2453 :
2454 : /* AUX_FUNC kzalloc */
2455 : static inline void *kzalloc (size_t size, gfp_t flags)
2456 : {
2457 :
2458 : return ldv_kzalloc(size, flags);
2459 : }
2460 :
2461 : /* AUX_FUNC ldv_dev_get_drvdata_6 */
2462 : void *ldv_dev_get_drvdata_6 (struct device const *dev)
2463 : {
2464 :
2465 : return ldv_dev_get_drvdata(dev);
2466 : }
2467 :
2468 : /* AUX_FUNC ldv_dev_get_drvdata_7 */
2469 : void *ldv_dev_get_drvdata_7 (struct device const *dev)
2470 : {
2471 :
2472 : return ldv_dev_get_drvdata(dev);
2473 : }
2474 :
2475 : /* AUX_FUNC ldv_dev_get_drvdata_8 */
2476 : void *ldv_dev_get_drvdata_8 (struct device const *dev)
2477 : {
2478 :
2479 : return ldv_dev_get_drvdata(dev);
2480 : }
2481 :
2482 : /* AUX_FUNC ldv_seq_open_9 */
2483 : int ldv_seq_open_9 (struct file *ldv_func_arg1, struct seq_operations const *ldv_func_arg2)
2484 : {
2485 1 :
2486 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'seq_open'"} */
2487 3 : return ldv_emg_seq_open(ldv_func_arg1, ldv_func_arg2);
2488 : }
2489 :
2490 : /* AUX_FUNC ldv_register_chrdev_10 */
2491 : static inline int ldv_register_chrdev_10 (unsigned int major, char const *name, struct file_operations const *fops)
2492 : {
2493 :
2494 1 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'register_chrdev'"} */
2495 4 : return ldv_emg_register_chrdev(major, name, fops);
2496 : }
|