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/device.h>
31 : #include <linux/rtc.h>
32 : #include <linux/fs.h>
33 : #include <linux/seq_file.h>
34 : #include <linux/timer.h>
35 : #include <linux/pagemap.h>
36 :
37 :
38 : struct ldv_struct_character_driver_scenario_1 {
39 : struct file_operations *arg0;
40 : int signal_pending;
41 : };
42 1 :
43 : struct ldv_struct_insmod_26 {
44 : int signal_pending;
45 : };
46 1 :
47 : struct ldv_struct_timer_scenario_25 {
48 : struct timer_list *arg0;
49 : int signal_pending;
50 : };
51 1 :
52 : struct ldv_struct_traverse_kernel_items_scenario_5 {
53 : struct seq_file *arg0;
54 : struct seq_operations *arg1;
55 : int signal_pending;
56 : };
57 :
58 : /* EMG Function declarations */
59 : void ldv_character_driver_scenario_1(void *);
60 : void ldv_character_driver_scenario_2(void *);
61 : void ldv_character_driver_scenario_3(void *);
62 : void ldv_character_driver_scenario_callback_1_20(unsigned int (*)(struct file *, poll_table *), struct file *, poll_table *);
63 : void ldv_character_driver_scenario_callback_1_21(ssize_t (*)(struct file *, char *, size_t , loff_t *), struct file *, char *, long unsigned int, loff_t *);
64 : void ldv_character_driver_scenario_callback_1_5(loff_t (*)(struct file *, loff_t , int), struct file *, long long int, int);
65 : void ldv_character_driver_scenario_callback_2_20(unsigned int (*)(struct file *, poll_table *), struct file *, poll_table *);
66 : void ldv_character_driver_scenario_callback_2_21(ssize_t (*)(struct file *, char *, size_t , loff_t *), struct file *, char *, long unsigned int, loff_t *);
67 : void ldv_character_driver_scenario_callback_2_5(loff_t (*)(struct file *, loff_t , int), struct file *, long long int, int);
68 : void ldv_character_driver_scenario_callback_3_20(unsigned int (*)(struct file *, poll_table *), struct file *, poll_table *);
69 : void ldv_character_driver_scenario_callback_3_21(ssize_t (*)(struct file *, char *, size_t , loff_t *), struct file *, char *, long unsigned int, loff_t *);
70 : void ldv_character_driver_scenario_callback_3_5(loff_t (*)(struct file *, loff_t , int), struct file *, long long int, int);
71 : int ldv_character_driver_scenario_probe_1_12(int (*)(struct inode *, struct file *), struct inode *, struct file *);
72 : int ldv_character_driver_scenario_probe_2_12(int (*)(struct inode *, struct file *), struct inode *, struct file *);
73 : int ldv_character_driver_scenario_probe_3_12(int (*)(struct inode *, struct file *), struct inode *, struct file *);
74 : void ldv_character_driver_scenario_release_1_2(int (*)(struct inode *, struct file *), struct inode *, struct file *);
75 : void ldv_character_driver_scenario_release_2_2(int (*)(struct inode *, struct file *), struct inode *, struct file *);
76 : void ldv_character_driver_scenario_release_3_2(int (*)(struct inode *, struct file *), struct inode *, struct file *);
77 : 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 *);
78 : 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 *);
79 : void ldv_character_driver_scenario_write_3_4(ssize_t (*)(struct file *, char *, size_t , loff_t *), struct file *, char *, long unsigned int, loff_t *);
80 : void ldv_dispatch_default_deregister_10_26_6(void);
81 : void ldv_dispatch_default_deregister_11_26_7(void);
82 : void ldv_dispatch_default_deregister_8_26_4(void);
83 : void ldv_dispatch_default_deregister_9_26_5(void);
84 : void ldv_dispatch_default_register_10_26_9(void);
85 : void ldv_dispatch_default_register_11_26_8(void);
86 : void ldv_dispatch_default_register_8_26_10(void);
87 : void ldv_dispatch_deregister_31_1(struct file_operations *);
88 : void ldv_dispatch_insmod_deregister_33_2(void);
89 : void ldv_dispatch_insmod_register_33_3(void);
90 : extern void ldv_dispatch_instance_deregister_27_1(struct timer_list *);
91 : void ldv_dispatch_instance_register_29_3(struct timer_list *);
92 : void ldv_dispatch_register_30_1(struct seq_file *, struct seq_operations *);
93 : void ldv_dispatch_register_32_3(struct file_operations *);
94 : extern int ldv_emg_del_timer(struct timer_list *);
95 : extern int ldv_emg_del_timer_sync(struct timer_list *);
96 : int ldv_emg_mod_timer(struct timer_list *, long unsigned int);
97 : int ldv_emg_register_chrdev(unsigned int, char *, struct file_operations *);
98 : int ldv_emg_seq_open(struct file *, struct seq_operations *);
99 : void ldv_emg_unregister_chrdev(unsigned int, char *);
100 : void ldv_insmod_26(void *);
101 : void ldv_insmod_input_exit_26_2(void (*)(void));
102 : int ldv_insmod_input_init_26_14(int (*)(void));
103 : void ldv_main_33(void *);
104 : void ldv_random_containerless_scenario_10(void *);
105 : void ldv_random_containerless_scenario_11(void *);
106 : void ldv_random_containerless_scenario_12(void *);
107 : void ldv_random_containerless_scenario_13(void *);
108 : void ldv_random_containerless_scenario_14(void *);
109 : void ldv_random_containerless_scenario_15(void *);
110 : void ldv_random_containerless_scenario_16(void *);
111 : void ldv_random_containerless_scenario_17(void *);
112 : void ldv_random_containerless_scenario_18(void *);
113 : void ldv_random_containerless_scenario_19(void *);
114 : void ldv_random_containerless_scenario_20(void *);
115 : void ldv_random_containerless_scenario_21(void *);
116 : void ldv_random_containerless_scenario_22(void *);
117 : void ldv_random_containerless_scenario_23(void *);
118 : void ldv_random_containerless_scenario_24(void *);
119 : void ldv_random_containerless_scenario_7(void *);
120 : void ldv_random_containerless_scenario_8(void *);
121 : void ldv_random_containerless_scenario_9(void *);
122 : void ldv_random_containerless_scenario_callback_10_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
123 : void ldv_random_containerless_scenario_callback_11_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
124 : void ldv_random_containerless_scenario_callback_12_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
125 : void ldv_random_containerless_scenario_callback_13_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
126 : void ldv_random_containerless_scenario_callback_14_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
127 : void ldv_random_containerless_scenario_callback_15_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
128 : void ldv_random_containerless_scenario_callback_16_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
129 : void ldv_random_containerless_scenario_callback_17_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
130 : void ldv_random_containerless_scenario_callback_18_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
131 : void ldv_random_containerless_scenario_callback_19_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
132 : void ldv_random_containerless_scenario_callback_20_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
133 : void ldv_random_containerless_scenario_callback_21_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
134 : void ldv_random_containerless_scenario_callback_22_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
135 : void ldv_random_containerless_scenario_callback_23_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
136 : void ldv_random_containerless_scenario_callback_24_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
137 : void ldv_random_containerless_scenario_callback_7_4(char *(*)(struct device *, mode_t *), struct device *, mode_t *);
138 : void ldv_random_containerless_scenario_callback_8_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
139 : void ldv_random_containerless_scenario_callback_9_4(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
140 : void ldv_rtc_class_scenario_4(void *);
141 : void ldv_rtc_class_scenario_callback_4_4(int (*)(struct device *, struct kobj_uevent_env *), struct device *, struct kobj_uevent_env *);
142 : int ldv_rtc_class_scenario_probe_4_11(int (*)(struct device *), struct device *);
143 : void ldv_rtc_class_scenario_release_4_2(void (*)(struct device *), struct device *);
144 : void ldv_timer_scenario_25(void *);
145 : void ldv_timer_scenario_callback_25_2(void (*)(unsigned long), unsigned long);
146 : void ldv_traverse_kernel_items_scenario_5(void *);
147 : void ldv_traverse_kernel_items_scenario_6(void *);
148 : void *ldv_traverse_kernel_items_scenario_next_5_7(void *(*)(struct seq_file *, void *, loff_t *), struct seq_file *, void *, loff_t *);
149 : void *ldv_traverse_kernel_items_scenario_next_6_7(void *(*)(struct seq_file *, void *, loff_t *), struct seq_file *, void *, loff_t *);
150 : void ldv_traverse_kernel_items_scenario_show_5_6(int (*)(struct seq_file *, void *), struct seq_file *, void *);
151 : void ldv_traverse_kernel_items_scenario_show_6_6(int (*)(struct seq_file *, void *), struct seq_file *, void *);
152 : void *ldv_traverse_kernel_items_scenario_start_5_13(void *(*)(struct seq_file *, loff_t *), struct seq_file *, loff_t *);
153 : void *ldv_traverse_kernel_items_scenario_start_6_13(void *(*)(struct seq_file *, loff_t *), struct seq_file *, loff_t *);
154 : void ldv_traverse_kernel_items_scenario_stop_5_2(void (*)(struct seq_file *, void *), struct seq_file *, void *);
155 : void ldv_traverse_kernel_items_scenario_stop_6_2(void (*)(struct seq_file *, void *), struct seq_file *, void *);
156 : int main(void);
157 :
158 : /* EMG variable declarations */
159 1 : struct ldv_thread ldv_thread_1;
160 1 : struct ldv_thread ldv_thread_10;
161 1 : struct ldv_thread ldv_thread_11;
162 1 : struct ldv_thread ldv_thread_12;
163 1 : struct ldv_thread ldv_thread_13;
164 1 : struct ldv_thread ldv_thread_14;
165 1 : struct ldv_thread ldv_thread_15;
166 1 : struct ldv_thread ldv_thread_16;
167 1 : struct ldv_thread ldv_thread_17;
168 1 : struct ldv_thread ldv_thread_18;
169 1 : struct ldv_thread ldv_thread_19;
170 1 : struct ldv_thread ldv_thread_2;
171 1 : struct ldv_thread ldv_thread_20;
172 1 : struct ldv_thread ldv_thread_21;
173 1 : struct ldv_thread ldv_thread_22;
174 1 : struct ldv_thread ldv_thread_23;
175 1 : struct ldv_thread ldv_thread_24;
176 1 : struct ldv_thread ldv_thread_25;
177 1 : struct ldv_thread ldv_thread_26;
178 1 : struct ldv_thread ldv_thread_3;
179 1 : struct ldv_thread ldv_thread_33;
180 1 : struct ldv_thread ldv_thread_4;
181 1 : struct ldv_thread ldv_thread_5;
182 1 : struct ldv_thread ldv_thread_6;
183 1 : struct ldv_thread ldv_thread_7;
184 1 : struct ldv_thread ldv_thread_8;
185 1 : struct ldv_thread ldv_thread_9;
186 :
187 : /* EMG variable initialization */
188 :
189 : /* EMG function definitions */
190 : /* AUX_FUNC ldv_character_driver_scenario_1 */
191 : void ldv_character_driver_scenario_1(void *arg0) {
192 : /* LDV {"thread": 1, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'character_driver_scenario(file_operations)'", "function": "ldv_character_driver_scenario_1"} */
193 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
194 1 : loff_t (*ldv_1_callback_llseek)(struct file *, loff_t , int);
195 1 : unsigned int (*ldv_1_callback_poll)(struct file *, poll_table *);
196 1 : ssize_t (*ldv_1_callback_read)(struct file *, char *, size_t , loff_t *);
197 1 : struct file_operations *ldv_1_container_file_operations;
198 1 : char *ldv_1_ldv_param_21_1_default;
199 1 : long long int *ldv_1_ldv_param_21_3_default;
200 1 : char *ldv_1_ldv_param_4_1_default;
201 1 : long long int *ldv_1_ldv_param_4_3_default;
202 1 : long long int ldv_1_ldv_param_5_1_default;
203 1 : int ldv_1_ldv_param_5_2_default;
204 1 : struct file *ldv_1_resource_file;
205 1 : struct inode *ldv_1_resource_inode;
206 1 : int ldv_1_ret_default;
207 1 : struct poll_table_struct *ldv_1_size_cnt_struct_poll_table_struct_ptr;
208 1 : long unsigned int ldv_1_size_cnt_write_size;
209 1 : /* Received labels */
210 2 : struct ldv_struct_character_driver_scenario_1 *data = (struct ldv_struct_character_driver_scenario_1*) arg0;
211 1 :
212 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
213 1 : /* Initialize automaton variables */
214 2 : ldv_1_ret_default = 1;
215 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin FILE_OPERATIONS callbacks invocations scenario."} */
216 1 : /* Assign recieved labels */
217 3 : if (data) {
218 2 : ldv_1_container_file_operations = data->arg0;
219 3 : ldv_free(data);
220 : }
221 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
222 :
223 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Allocate memory for file and inode structures."} */
224 5 : ldv_1_resource_file = ldv_xmalloc(sizeof(struct file));
225 3 : ldv_1_resource_inode = ldv_xmalloc(sizeof(struct inode));
226 3 : ldv_1_size_cnt_struct_poll_table_struct_ptr = ldv_undef_int();
227 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
228 :
229 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
230 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
231 :
232 : /* Jump to a subprocess 'main' initial state */
233 1 : goto ldv_main_1;
234 : /* End of the process */
235 : return;
236 1 :
237 : /* Sbprocess main */
238 : ldv_main_1:
239 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
240 :
241 4 : if (ldv_undef_int()) {
242 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Open the device file. Invoke callback open from file_operations."} */
243 : /* LDV {"type": "CALLBACK", "call": "ldv_1_ret_default = ((& input_proc_devices_open))(ldv_1_resource_inode, ldv_1_resource_file);", "comment": "probe"} */
244 2 : ldv_1_ret_default = ldv_character_driver_scenario_probe_1_12(ldv_1_container_file_operations->open, ldv_1_resource_inode, ldv_1_resource_file);
245 : /* Callback post-call */
246 2 : ldv_1_ret_default = ldv_filter_err_code(ldv_1_ret_default);
247 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
248 :
249 4 : if (ldv_undef_int()) {
250 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Device file is opened successfully."} */
251 2 : ldv_assume(ldv_1_ret_default == 0);
252 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_END"} */
253 :
254 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
255 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
256 :
257 : /* Jump to a subprocess 'call' initial state */
258 1 : goto ldv_call_1;
259 : }
260 : else {
261 : /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to open devices file."} */
262 2 : ldv_assume(ldv_1_ret_default != 0);
263 : /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_END"} */
264 :
265 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
266 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
267 :
268 : /* Jump to a subprocess 'main' initial state */
269 1 : goto ldv_main_1;
270 : }
271 : }
272 : else {
273 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory of file and inode structures."} */
274 2 : ldv_free(ldv_1_resource_file);
275 2 : ldv_free(ldv_1_resource_inode);
276 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
277 :
278 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish FILE_OPERATIONS callbacks invocations scenario."} */
279 : /* Skip a non-replicative signal receiving */
280 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
281 :
282 : /* Exit function at a terminal state */
283 1 : return;
284 : }
285 : /* End of the subprocess 'main' */
286 : return;
287 1 :
288 : /* Sbprocess call */
289 : ldv_call_1:
290 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
291 :
292 2 : switch (ldv_undef_int()) {
293 3 : case 1: {
294 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
295 3 : ldv_1_ldv_param_4_1_default = ldv_xmalloc_unknown_size(0);
296 3 : ldv_1_ldv_param_4_3_default = ldv_xmalloc_unknown_size(0);
297 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
298 :
299 : /* LDV {"action": "WRITE", "type": "CALL_BEGIN", "callback": true, "comment": "Write data to the device. Invoke callback write from FILE_OPERATIONS."} */
300 : /* Callback pre-call */
301 2 : ldv_assume(ldv_1_size_cnt_struct_poll_table_struct_ptr <= (INT_MAX & PAGE_CACHE_MASK));
302 3 : if (ldv_1_container_file_operations->write) {
303 : /* LDV {"type": "CALLBACK", "call": "(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);", "comment": "write"} */
304 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);
305 : }
306 : /* LDV {"action": "WRITE", "type": "CALL_END"} */
307 :
308 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
309 4 : ldv_free(ldv_1_ldv_param_4_1_default);
310 2 : ldv_free(ldv_1_ldv_param_4_3_default);
311 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
312 :
313 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
314 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
315 :
316 : /* Jump to a subprocess 'call' initial state */
317 1 : goto ldv_call_1;
318 1 : break;
319 : }
320 3 : case 2: {
321 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "File structure is released. Invoke callback release from file_operations."} */
322 : /* LDV {"type": "CALLBACK", "call": "((& seq_release))(ldv_1_resource_inode, ldv_1_resource_file);", "comment": "release"} */
323 2 : ldv_character_driver_scenario_release_1_2(ldv_1_container_file_operations->release, ldv_1_resource_inode, ldv_1_resource_file);
324 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
325 :
326 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
327 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
328 :
329 : /* Jump to a subprocess 'main' initial state */
330 1 : goto ldv_main_1;
331 1 : break;
332 : }
333 3 : case 3: {
334 : /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
335 : /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_END"} */
336 :
337 2 : switch (ldv_undef_int()) {
338 3 : case 1: {
339 : /* LDV {"action": "PRE_CALL_21", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
340 3 : ldv_1_ldv_param_21_1_default = ldv_xmalloc_unknown_size(0);
341 3 : ldv_1_ldv_param_21_3_default = ldv_xmalloc_unknown_size(0);
342 : /* LDV {"action": "PRE_CALL_21", "type": "CONDITION_END"} */
343 :
344 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback read from file_operations."} */
345 : /* LDV {"type": "CALLBACK", "call": "((& seq_read))(ldv_1_resource_file, ldv_1_ldv_param_21_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_21_3_default);", "comment": "callback"} */
346 2 : ldv_character_driver_scenario_callback_1_21(ldv_1_callback_read, ldv_1_resource_file, ldv_1_ldv_param_21_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_21_3_default);
347 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
348 :
349 : /* LDV {"action": "POST_CALL_21", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
350 2 : ldv_free(ldv_1_ldv_param_21_1_default);
351 2 : ldv_free(ldv_1_ldv_param_21_3_default);
352 : /* LDV {"action": "POST_CALL_21", "type": "CONDITION_END"} */
353 :
354 1 : break;
355 1 : }
356 3 : case 2: {
357 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback poll from file_operations."} */
358 : /* LDV {"type": "CALLBACK", "call": "(( & input_proc_devices_poll))(ldv_1_resource_file, ldv_1_size_cnt_struct_poll_table_struct_ptr);", "comment": "callback"} */
359 2 : ldv_character_driver_scenario_callback_1_20(ldv_1_callback_poll, ldv_1_resource_file, ldv_1_size_cnt_struct_poll_table_struct_ptr);
360 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
361 :
362 1 : break;
363 1 : }
364 3 : case 3: {
365 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback llseek from file_operations."} */
366 : /* LDV {"type": "CALLBACK", "call": "((& seq_lseek))(ldv_1_resource_file, ldv_1_ldv_param_5_1_default, ldv_1_ldv_param_5_2_default);", "comment": "callback"} */
367 2 : ldv_character_driver_scenario_callback_1_5(ldv_1_callback_llseek, ldv_1_resource_file, ldv_1_ldv_param_5_1_default, ldv_1_ldv_param_5_2_default);
368 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
369 :
370 1 : break;
371 1 : }
372 2 : default: ldv_stop();
373 1 : }
374 3 : break;
375 1 : }
376 2 : default: ldv_stop();
377 1 : }
378 0 : /* LDV {"action": "POST_CALL_5", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
379 : /* LDV {"action": "POST_CALL_5", "type": "CONDITION_END"} */
380 0 :
381 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
382 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
383 :
384 : /* Jump to a subprocess 'call' initial state */
385 3 : goto ldv_call_1;
386 : /* Jump to a subprocess 'call' initial state */
387 : goto ldv_call_1;
388 : /* End of the subprocess 'call' */
389 : return;
390 : /* LDV {"comment": "End of control function based on process 'character_driver_scenario(file_operations)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_character_driver_scenario_1"} */
391 : }
392 :
393 : /* AUX_FUNC ldv_character_driver_scenario_2 */
394 : void ldv_character_driver_scenario_2(void *arg0) {
395 : /* LDV {"thread": 2, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'character_driver_scenario(file_operations)'", "function": "ldv_character_driver_scenario_2"} */
396 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
397 1 : loff_t (*ldv_2_callback_llseek)(struct file *, loff_t , int);
398 1 : unsigned int (*ldv_2_callback_poll)(struct file *, poll_table *);
399 1 : ssize_t (*ldv_2_callback_read)(struct file *, char *, size_t , loff_t *);
400 1 : struct file_operations *ldv_2_container_file_operations;
401 1 : char *ldv_2_ldv_param_21_1_default;
402 1 : long long int *ldv_2_ldv_param_21_3_default;
403 1 : char *ldv_2_ldv_param_4_1_default;
404 1 : long long int *ldv_2_ldv_param_4_3_default;
405 1 : long long int ldv_2_ldv_param_5_1_default;
406 1 : int ldv_2_ldv_param_5_2_default;
407 1 : struct file *ldv_2_resource_file;
408 1 : struct inode *ldv_2_resource_inode;
409 1 : int ldv_2_ret_default;
410 1 : struct poll_table_struct *ldv_2_size_cnt_struct_poll_table_struct_ptr;
411 1 : long unsigned int ldv_2_size_cnt_write_size;
412 1 : /* Received labels */
413 2 : struct ldv_struct_character_driver_scenario_1 *data = (struct ldv_struct_character_driver_scenario_1*) arg0;
414 1 :
415 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
416 1 : /* Initialize automaton variables */
417 2 : ldv_2_ret_default = 1;
418 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin FILE_OPERATIONS callbacks invocations scenario."} */
419 1 : /* Assign recieved labels */
420 3 : if (data) {
421 2 : ldv_2_container_file_operations = data->arg0;
422 3 : ldv_free(data);
423 : }
424 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
425 :
426 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Allocate memory for file and inode structures."} */
427 5 : ldv_2_resource_file = ldv_xmalloc(sizeof(struct file));
428 3 : ldv_2_resource_inode = ldv_xmalloc(sizeof(struct inode));
429 3 : ldv_2_size_cnt_struct_poll_table_struct_ptr = ldv_undef_int();
430 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
431 :
432 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
433 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
434 :
435 : /* Jump to a subprocess 'main' initial state */
436 1 : goto ldv_main_2;
437 : /* End of the process */
438 : return;
439 1 :
440 : /* Sbprocess main */
441 : ldv_main_2:
442 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
443 :
444 4 : if (ldv_undef_int()) {
445 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Open the device file. Invoke callback open from file_operations."} */
446 : /* LDV {"type": "CALLBACK", "call": "ldv_2_ret_default = ((& input_open_file))(ldv_2_resource_inode, ldv_2_resource_file);", "comment": "probe"} */
447 2 : ldv_2_ret_default = ldv_character_driver_scenario_probe_2_12(ldv_2_container_file_operations->open, ldv_2_resource_inode, ldv_2_resource_file);
448 : /* Callback post-call */
449 2 : ldv_2_ret_default = ldv_filter_err_code(ldv_2_ret_default);
450 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
451 :
452 4 : if (ldv_undef_int()) {
453 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Device file is opened successfully."} */
454 2 : ldv_assume(ldv_2_ret_default == 0);
455 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_END"} */
456 :
457 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
458 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
459 :
460 : /* Jump to a subprocess 'call' initial state */
461 1 : goto ldv_call_2;
462 : }
463 : else {
464 : /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to open devices file."} */
465 2 : ldv_assume(ldv_2_ret_default != 0);
466 : /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_END"} */
467 :
468 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
469 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
470 :
471 : /* Jump to a subprocess 'main' initial state */
472 1 : goto ldv_main_2;
473 : }
474 : }
475 : else {
476 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory of file and inode structures."} */
477 2 : ldv_free(ldv_2_resource_file);
478 2 : ldv_free(ldv_2_resource_inode);
479 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
480 :
481 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish FILE_OPERATIONS callbacks invocations scenario."} */
482 : /* Skip a non-replicative signal receiving */
483 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
484 :
485 : /* Exit function at a terminal state */
486 1 : return;
487 : }
488 : /* End of the subprocess 'main' */
489 : return;
490 1 :
491 : /* Sbprocess call */
492 : ldv_call_2:
493 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
494 :
495 2 : switch (ldv_undef_int()) {
496 3 : case 1: {
497 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
498 3 : ldv_2_ldv_param_4_1_default = ldv_xmalloc_unknown_size(0);
499 3 : ldv_2_ldv_param_4_3_default = ldv_xmalloc_unknown_size(0);
500 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
501 :
502 : /* LDV {"action": "WRITE", "type": "CALL_BEGIN", "callback": true, "comment": "Write data to the device. Invoke callback write from FILE_OPERATIONS."} */
503 : /* Callback pre-call */
504 2 : ldv_assume(ldv_2_size_cnt_struct_poll_table_struct_ptr <= (INT_MAX & PAGE_CACHE_MASK));
505 3 : if (ldv_2_container_file_operations->write) {
506 : /* 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"} */
507 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);
508 : }
509 : /* LDV {"action": "WRITE", "type": "CALL_END"} */
510 :
511 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
512 4 : ldv_free(ldv_2_ldv_param_4_1_default);
513 2 : ldv_free(ldv_2_ldv_param_4_3_default);
514 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
515 :
516 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
517 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
518 :
519 : /* Jump to a subprocess 'call' initial state */
520 1 : goto ldv_call_2;
521 1 : break;
522 : }
523 3 : case 2: {
524 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "File structure is released. Invoke callback release from FILE_OPERATIONS."} */
525 3 : if (ldv_2_container_file_operations->release) {
526 : /* LDV {"type": "CALLBACK", "call": "(ldv_2_container_file_operations->release)(ldv_2_resource_inode, ldv_2_resource_file);", "comment": "release"} */
527 2 : ldv_character_driver_scenario_release_2_2(ldv_2_container_file_operations->release, ldv_2_resource_inode, ldv_2_resource_file);
528 : }
529 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
530 :
531 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
532 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
533 :
534 : /* Jump to a subprocess 'main' initial state */
535 2 : goto ldv_main_2;
536 1 : break;
537 : }
538 3 : case 3: {
539 : /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
540 : /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_END"} */
541 :
542 2 : switch (ldv_undef_int()) {
543 3 : case 1: {
544 : /* LDV {"action": "PRE_CALL_21", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
545 3 : ldv_2_ldv_param_21_1_default = ldv_xmalloc_unknown_size(0);
546 3 : ldv_2_ldv_param_21_3_default = ldv_xmalloc_unknown_size(0);
547 : /* LDV {"action": "PRE_CALL_21", "type": "CONDITION_END"} */
548 :
549 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
550 2 : if (ldv_2_callback_read) {
551 : /* LDV {"type": "CALLBACK", "call": "(ldv_2_callback_read)(ldv_2_resource_file, ldv_2_ldv_param_21_1_default, ldv_2_size_cnt_write_size, ldv_2_ldv_param_21_3_default);", "comment": "callback"} */
552 2 : ldv_character_driver_scenario_callback_2_21(ldv_2_callback_read, ldv_2_resource_file, ldv_2_ldv_param_21_1_default, ldv_2_size_cnt_write_size, ldv_2_ldv_param_21_3_default);
553 : }
554 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
555 :
556 : /* LDV {"action": "POST_CALL_21", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
557 4 : ldv_free(ldv_2_ldv_param_21_1_default);
558 2 : ldv_free(ldv_2_ldv_param_21_3_default);
559 : /* LDV {"action": "POST_CALL_21", "type": "CONDITION_END"} */
560 :
561 1 : break;
562 1 : }
563 3 : case 2: {
564 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
565 2 : if (ldv_2_callback_poll) {
566 : /* LDV {"type": "CALLBACK", "call": "(ldv_2_callback_poll)(ldv_2_resource_file, ldv_2_size_cnt_struct_poll_table_struct_ptr);", "comment": "callback"} */
567 2 : ldv_character_driver_scenario_callback_2_20(ldv_2_callback_poll, ldv_2_resource_file, ldv_2_size_cnt_struct_poll_table_struct_ptr);
568 : }
569 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
570 :
571 2 : break;
572 1 : }
573 3 : case 3: {
574 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
575 2 : if (ldv_2_callback_llseek) {
576 : /* LDV {"type": "CALLBACK", "call": "(ldv_2_callback_llseek)(ldv_2_resource_file, ldv_2_ldv_param_5_1_default, ldv_2_ldv_param_5_2_default);", "comment": "callback"} */
577 2 : ldv_character_driver_scenario_callback_2_5(ldv_2_callback_llseek, ldv_2_resource_file, ldv_2_ldv_param_5_1_default, ldv_2_ldv_param_5_2_default);
578 : }
579 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
580 :
581 2 : break;
582 1 : }
583 2 : default: ldv_stop();
584 1 : }
585 4 : break;
586 1 : }
587 2 : default: ldv_stop();
588 1 : }
589 0 : /* LDV {"action": "POST_CALL_5", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
590 : /* LDV {"action": "POST_CALL_5", "type": "CONDITION_END"} */
591 0 :
592 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
593 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
594 :
595 : /* Jump to a subprocess 'call' initial state */
596 4 : goto ldv_call_2;
597 : /* Jump to a subprocess 'call' initial state */
598 : goto ldv_call_2;
599 : /* End of the subprocess 'call' */
600 : return;
601 : /* LDV {"comment": "End of control function based on process 'character_driver_scenario(file_operations)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_character_driver_scenario_2"} */
602 : }
603 :
604 : /* AUX_FUNC ldv_character_driver_scenario_3 */
605 : void ldv_character_driver_scenario_3(void *arg0) {
606 : /* LDV {"thread": 3, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'character_driver_scenario(file_operations)'", "function": "ldv_character_driver_scenario_3"} */
607 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
608 1 : loff_t (*ldv_3_callback_llseek)(struct file *, loff_t , int);
609 1 : unsigned int (*ldv_3_callback_poll)(struct file *, poll_table *);
610 1 : ssize_t (*ldv_3_callback_read)(struct file *, char *, size_t , loff_t *);
611 1 : struct file_operations *ldv_3_container_file_operations;
612 1 : char *ldv_3_ldv_param_21_1_default;
613 1 : long long int *ldv_3_ldv_param_21_3_default;
614 1 : char *ldv_3_ldv_param_4_1_default;
615 1 : long long int *ldv_3_ldv_param_4_3_default;
616 1 : long long int ldv_3_ldv_param_5_1_default;
617 1 : int ldv_3_ldv_param_5_2_default;
618 1 : struct file *ldv_3_resource_file;
619 1 : struct inode *ldv_3_resource_inode;
620 1 : int ldv_3_ret_default;
621 1 : struct poll_table_struct *ldv_3_size_cnt_struct_poll_table_struct_ptr;
622 1 : long unsigned int ldv_3_size_cnt_write_size;
623 1 : /* Received labels */
624 2 : struct ldv_struct_character_driver_scenario_1 *data = (struct ldv_struct_character_driver_scenario_1*) arg0;
625 1 :
626 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
627 1 : /* Initialize automaton variables */
628 2 : ldv_3_ret_default = 1;
629 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin FILE_OPERATIONS callbacks invocations scenario."} */
630 1 : /* Assign recieved labels */
631 3 : if (data) {
632 2 : ldv_3_container_file_operations = data->arg0;
633 3 : ldv_free(data);
634 : }
635 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
636 :
637 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Allocate memory for file and inode structures."} */
638 5 : ldv_3_resource_file = ldv_xmalloc(sizeof(struct file));
639 3 : ldv_3_resource_inode = ldv_xmalloc(sizeof(struct inode));
640 3 : ldv_3_size_cnt_struct_poll_table_struct_ptr = ldv_undef_int();
641 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
642 :
643 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
644 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
645 :
646 : /* Jump to a subprocess 'main' initial state */
647 1 : goto ldv_main_3;
648 : /* End of the process */
649 : return;
650 1 :
651 : /* Sbprocess main */
652 : ldv_main_3:
653 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
654 :
655 4 : if (ldv_undef_int()) {
656 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Open the device file. Invoke callback open from file_operations."} */
657 : /* LDV {"type": "CALLBACK", "call": "ldv_3_ret_default = ((& input_proc_handlers_open))(ldv_3_resource_inode, ldv_3_resource_file);", "comment": "probe"} */
658 2 : ldv_3_ret_default = ldv_character_driver_scenario_probe_3_12(ldv_3_container_file_operations->open, ldv_3_resource_inode, ldv_3_resource_file);
659 : /* Callback post-call */
660 2 : ldv_3_ret_default = ldv_filter_err_code(ldv_3_ret_default);
661 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
662 :
663 4 : if (ldv_undef_int()) {
664 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Device file is opened successfully."} */
665 2 : ldv_assume(ldv_3_ret_default == 0);
666 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_END"} */
667 :
668 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
669 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
670 :
671 : /* Jump to a subprocess 'call' initial state */
672 1 : goto ldv_call_3;
673 : }
674 : else {
675 : /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to open devices file."} */
676 2 : ldv_assume(ldv_3_ret_default != 0);
677 : /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_END"} */
678 :
679 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
680 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
681 :
682 : /* Jump to a subprocess 'main' initial state */
683 1 : goto ldv_main_3;
684 : }
685 : }
686 : else {
687 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory of file and inode structures."} */
688 2 : ldv_free(ldv_3_resource_file);
689 2 : ldv_free(ldv_3_resource_inode);
690 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
691 :
692 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish FILE_OPERATIONS callbacks invocations scenario."} */
693 : /* Skip a non-replicative signal receiving */
694 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
695 :
696 : /* Exit function at a terminal state */
697 1 : return;
698 : }
699 : /* End of the subprocess 'main' */
700 : return;
701 1 :
702 : /* Sbprocess call */
703 : ldv_call_3:
704 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
705 :
706 2 : switch (ldv_undef_int()) {
707 3 : case 1: {
708 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
709 3 : ldv_3_ldv_param_4_1_default = ldv_xmalloc_unknown_size(0);
710 3 : ldv_3_ldv_param_4_3_default = ldv_xmalloc_unknown_size(0);
711 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
712 :
713 : /* LDV {"action": "WRITE", "type": "CALL_BEGIN", "callback": true, "comment": "Write data to the device. Invoke callback write from FILE_OPERATIONS."} */
714 : /* Callback pre-call */
715 2 : ldv_assume(ldv_3_size_cnt_struct_poll_table_struct_ptr <= (INT_MAX & PAGE_CACHE_MASK));
716 3 : if (ldv_3_container_file_operations->write) {
717 : /* LDV {"type": "CALLBACK", "call": "(ldv_3_container_file_operations->write)(ldv_3_resource_file, ldv_3_ldv_param_4_1_default, ldv_3_size_cnt_write_size, ldv_3_ldv_param_4_3_default);", "comment": "write"} */
718 3 : ldv_character_driver_scenario_write_3_4(ldv_3_container_file_operations->write, ldv_3_resource_file, ldv_3_ldv_param_4_1_default, ldv_3_size_cnt_write_size, ldv_3_ldv_param_4_3_default);
719 : }
720 : /* LDV {"action": "WRITE", "type": "CALL_END"} */
721 :
722 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
723 4 : ldv_free(ldv_3_ldv_param_4_1_default);
724 2 : ldv_free(ldv_3_ldv_param_4_3_default);
725 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
726 :
727 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
728 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
729 :
730 : /* Jump to a subprocess 'call' initial state */
731 1 : goto ldv_call_3;
732 1 : break;
733 : }
734 3 : case 2: {
735 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "File structure is released. Invoke callback release from file_operations."} */
736 : /* LDV {"type": "CALLBACK", "call": "((& seq_release))(ldv_3_resource_inode, ldv_3_resource_file);", "comment": "release"} */
737 2 : ldv_character_driver_scenario_release_3_2(ldv_3_container_file_operations->release, ldv_3_resource_inode, ldv_3_resource_file);
738 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
739 :
740 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
741 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
742 :
743 : /* Jump to a subprocess 'main' initial state */
744 1 : goto ldv_main_3;
745 1 : break;
746 : }
747 3 : case 3: {
748 : /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
749 : /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_END"} */
750 :
751 2 : switch (ldv_undef_int()) {
752 3 : case 1: {
753 : /* LDV {"action": "PRE_CALL_21", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
754 3 : ldv_3_ldv_param_21_1_default = ldv_xmalloc_unknown_size(0);
755 3 : ldv_3_ldv_param_21_3_default = ldv_xmalloc_unknown_size(0);
756 : /* LDV {"action": "PRE_CALL_21", "type": "CONDITION_END"} */
757 :
758 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback read from file_operations."} */
759 : /* LDV {"type": "CALLBACK", "call": "((& seq_read))(ldv_3_resource_file, ldv_3_ldv_param_21_1_default, ldv_3_size_cnt_write_size, ldv_3_ldv_param_21_3_default);", "comment": "callback"} */
760 2 : ldv_character_driver_scenario_callback_3_21(ldv_3_callback_read, ldv_3_resource_file, ldv_3_ldv_param_21_1_default, ldv_3_size_cnt_write_size, ldv_3_ldv_param_21_3_default);
761 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
762 :
763 : /* LDV {"action": "POST_CALL_21", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
764 2 : ldv_free(ldv_3_ldv_param_21_1_default);
765 2 : ldv_free(ldv_3_ldv_param_21_3_default);
766 : /* LDV {"action": "POST_CALL_21", "type": "CONDITION_END"} */
767 :
768 1 : break;
769 1 : }
770 3 : case 2: {
771 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
772 2 : if (ldv_3_callback_poll) {
773 : /* LDV {"type": "CALLBACK", "call": "(ldv_3_callback_poll)(ldv_3_resource_file, ldv_3_size_cnt_struct_poll_table_struct_ptr);", "comment": "callback"} */
774 2 : ldv_character_driver_scenario_callback_3_20(ldv_3_callback_poll, ldv_3_resource_file, ldv_3_size_cnt_struct_poll_table_struct_ptr);
775 : }
776 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
777 :
778 2 : break;
779 1 : }
780 3 : case 3: {
781 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback llseek from file_operations."} */
782 : /* LDV {"type": "CALLBACK", "call": "((& seq_lseek))(ldv_3_resource_file, ldv_3_ldv_param_5_1_default, ldv_3_ldv_param_5_2_default);", "comment": "callback"} */
783 2 : ldv_character_driver_scenario_callback_3_5(ldv_3_callback_llseek, ldv_3_resource_file, ldv_3_ldv_param_5_1_default, ldv_3_ldv_param_5_2_default);
784 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
785 :
786 1 : break;
787 1 : }
788 2 : default: ldv_stop();
789 1 : }
790 4 : break;
791 1 : }
792 2 : default: ldv_stop();
793 1 : }
794 0 : /* LDV {"action": "POST_CALL_5", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
795 : /* LDV {"action": "POST_CALL_5", "type": "CONDITION_END"} */
796 0 :
797 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
798 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
799 :
800 : /* Jump to a subprocess 'call' initial state */
801 4 : goto ldv_call_3;
802 : /* Jump to a subprocess 'call' initial state */
803 : goto ldv_call_3;
804 : /* End of the subprocess 'call' */
805 : return;
806 : /* LDV {"comment": "End of control function based on process 'character_driver_scenario(file_operations)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_character_driver_scenario_3"} */
807 : }
808 :
809 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_20 */
810 : void ldv_character_driver_scenario_callback_1_20(unsigned int (*arg0)(struct file *, poll_table *), struct file *arg1, struct poll_table_struct *arg2) {
811 2 : (( & input_proc_devices_poll))(arg1, arg2);
812 1 : }
813 :
814 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_21 */
815 : void ldv_character_driver_scenario_callback_1_21(ssize_t (*arg0)(struct file *, char *, size_t , loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
816 1 : ((& seq_read))(arg1, arg2, arg3, arg4);
817 1 : }
818 :
819 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_5 */
820 : void ldv_character_driver_scenario_callback_1_5(loff_t (*arg0)(struct file *, loff_t , int), struct file *arg1, long long int arg2, int arg3) {
821 1 : ((& seq_lseek))(arg1, arg2, arg3);
822 1 : }
823 :
824 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_2_20 */
825 : void ldv_character_driver_scenario_callback_2_20(unsigned int (*arg0)(struct file *, poll_table *), struct file *arg1, struct poll_table_struct *arg2) {
826 2 : (*arg0)(arg1, arg2);
827 1 : }
828 :
829 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_2_21 */
830 : void ldv_character_driver_scenario_callback_2_21(ssize_t (*arg0)(struct file *, char *, size_t , loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
831 1 : (*arg0)(arg1, arg2, arg3, arg4);
832 1 : }
833 :
834 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_2_5 */
835 : void ldv_character_driver_scenario_callback_2_5(loff_t (*arg0)(struct file *, loff_t , int), struct file *arg1, long long int arg2, int arg3) {
836 1 : (*arg0)(arg1, arg2, arg3);
837 1 : }
838 :
839 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_3_20 */
840 : void ldv_character_driver_scenario_callback_3_20(unsigned int (*arg0)(struct file *, poll_table *), struct file *arg1, struct poll_table_struct *arg2) {
841 2 : (*arg0)(arg1, arg2);
842 1 : }
843 :
844 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_3_21 */
845 : void ldv_character_driver_scenario_callback_3_21(ssize_t (*arg0)(struct file *, char *, size_t , loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
846 1 : ((& seq_read))(arg1, arg2, arg3, arg4);
847 1 : }
848 :
849 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_3_5 */
850 : void ldv_character_driver_scenario_callback_3_5(loff_t (*arg0)(struct file *, loff_t , int), struct file *arg1, long long int arg2, int arg3) {
851 1 : ((& seq_lseek))(arg1, arg2, arg3);
852 1 : }
853 :
854 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_probe_1_12 */
855 : int ldv_character_driver_scenario_probe_1_12(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
856 3 : return ((& input_proc_devices_open))(arg1, arg2);
857 : }
858 1 :
859 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_probe_2_12 */
860 : int ldv_character_driver_scenario_probe_2_12(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
861 8 : return ((& input_open_file))(arg1, arg2);
862 : }
863 1 :
864 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_probe_3_12 */
865 : int ldv_character_driver_scenario_probe_3_12(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
866 3 : return ((& input_proc_handlers_open))(arg1, arg2);
867 : }
868 1 :
869 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_release_1_2 */
870 : void ldv_character_driver_scenario_release_1_2(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
871 1 : ((& seq_release))(arg1, arg2);
872 1 : }
873 :
874 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_release_2_2 */
875 : void ldv_character_driver_scenario_release_2_2(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
876 4 : (*arg0)(arg1, arg2);
877 1 : }
878 :
879 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_release_3_2 */
880 : void ldv_character_driver_scenario_release_3_2(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
881 1 : ((& seq_release))(arg1, arg2);
882 1 : }
883 :
884 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_write_1_4 */
885 : 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) {
886 1 : (*arg0)(arg1, arg2, arg3, arg4);
887 1 : }
888 :
889 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_write_2_4 */
890 : 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) {
891 1 : (*arg0)(arg1, arg2, arg3, arg4);
892 1 : }
893 :
894 : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_write_3_4 */
895 : void ldv_character_driver_scenario_write_3_4(ssize_t (*arg0)(struct file *, char *, size_t , loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
896 1 : (*arg0)(arg1, arg2, arg3, arg4);
897 1 : }
898 :
899 : /* AUX_FUNC ldv_dispatch_default_deregister_10_26_6 */
900 : void ldv_dispatch_default_deregister_10_26_6() {
901 : struct ldv_struct_insmod_26 *cf_arg_7;
902 : /* Skip thread join call */
903 1 : return;
904 : }
905 :
906 : /* AUX_FUNC ldv_dispatch_default_deregister_11_26_7 */
907 : void ldv_dispatch_default_deregister_11_26_7() {
908 : struct ldv_struct_insmod_26 *cf_arg_8;
909 : struct ldv_struct_insmod_26 *cf_arg_9;
910 : struct ldv_struct_insmod_26 *cf_arg_10;
911 : struct ldv_struct_insmod_26 *cf_arg_11;
912 : struct ldv_struct_insmod_26 *cf_arg_12;
913 : struct ldv_struct_insmod_26 *cf_arg_13;
914 : struct ldv_struct_insmod_26 *cf_arg_14;
915 : struct ldv_struct_insmod_26 *cf_arg_15;
916 : struct ldv_struct_insmod_26 *cf_arg_16;
917 : struct ldv_struct_insmod_26 *cf_arg_17;
918 : struct ldv_struct_insmod_26 *cf_arg_18;
919 : struct ldv_struct_insmod_26 *cf_arg_19;
920 : struct ldv_struct_insmod_26 *cf_arg_20;
921 : struct ldv_struct_insmod_26 *cf_arg_21;
922 : struct ldv_struct_insmod_26 *cf_arg_22;
923 : struct ldv_struct_insmod_26 *cf_arg_23;
924 : struct ldv_struct_insmod_26 *cf_arg_24;
925 : /* Skip thread join call */
926 : /* Skip thread join call */
927 : /* Skip thread join call */
928 : /* Skip thread join call */
929 : /* Skip thread join call */
930 : /* Skip thread join call */
931 : /* Skip thread join call */
932 : /* Skip thread join call */
933 : /* Skip thread join call */
934 : /* Skip thread join call */
935 : /* Skip thread join call */
936 : /* Skip thread join call */
937 : /* Skip thread join call */
938 : /* Skip thread join call */
939 : /* Skip thread join call */
940 : /* Skip thread join call */
941 : /* Skip thread join call */
942 1 : return;
943 : }
944 :
945 : /* AUX_FUNC ldv_dispatch_default_deregister_8_26_4 */
946 : void ldv_dispatch_default_deregister_8_26_4() {
947 : struct ldv_struct_insmod_26 *cf_arg_4;
948 : /* Skip thread join call */
949 1 : return;
950 : }
951 :
952 : /* AUX_FUNC ldv_dispatch_default_deregister_9_26_5 */
953 : void ldv_dispatch_default_deregister_9_26_5() {
954 : struct ldv_struct_insmod_26 *cf_arg_5;
955 : struct ldv_struct_insmod_26 *cf_arg_6;
956 : /* Skip thread join call */
957 : /* Skip thread join call */
958 1 : return;
959 : }
960 :
961 : /* AUX_FUNC ldv_dispatch_default_register_10_26_9 */
962 : void ldv_dispatch_default_register_10_26_9() {
963 : struct ldv_struct_insmod_26 *cf_arg_7;
964 4 : cf_arg_7 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
965 3 : ldv_random_containerless_scenario_7(cf_arg_7);
966 1 : return;
967 : }
968 :
969 : /* AUX_FUNC ldv_dispatch_default_register_11_26_8 */
970 : void ldv_dispatch_default_register_11_26_8() {
971 : struct ldv_struct_insmod_26 *cf_arg_8;
972 1 : struct ldv_struct_insmod_26 *cf_arg_9;
973 1 : struct ldv_struct_insmod_26 *cf_arg_10;
974 1 : struct ldv_struct_insmod_26 *cf_arg_11;
975 1 : struct ldv_struct_insmod_26 *cf_arg_12;
976 1 : struct ldv_struct_insmod_26 *cf_arg_13;
977 1 : struct ldv_struct_insmod_26 *cf_arg_14;
978 1 : struct ldv_struct_insmod_26 *cf_arg_15;
979 1 : struct ldv_struct_insmod_26 *cf_arg_16;
980 1 : struct ldv_struct_insmod_26 *cf_arg_17;
981 1 : struct ldv_struct_insmod_26 *cf_arg_18;
982 1 : struct ldv_struct_insmod_26 *cf_arg_19;
983 1 : struct ldv_struct_insmod_26 *cf_arg_20;
984 1 : struct ldv_struct_insmod_26 *cf_arg_21;
985 1 : struct ldv_struct_insmod_26 *cf_arg_22;
986 1 : struct ldv_struct_insmod_26 *cf_arg_23;
987 1 : struct ldv_struct_insmod_26 *cf_arg_24;
988 4 : cf_arg_8 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
989 3 : ldv_random_containerless_scenario_8(cf_arg_8);
990 4 : cf_arg_9 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
991 3 : ldv_random_containerless_scenario_9(cf_arg_9);
992 4 : cf_arg_10 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
993 3 : ldv_random_containerless_scenario_10(cf_arg_10);
994 4 : cf_arg_11 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
995 3 : ldv_random_containerless_scenario_11(cf_arg_11);
996 4 : cf_arg_12 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
997 3 : ldv_random_containerless_scenario_12(cf_arg_12);
998 4 : cf_arg_13 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
999 3 : ldv_random_containerless_scenario_13(cf_arg_13);
1000 4 : cf_arg_14 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
1001 3 : ldv_random_containerless_scenario_14(cf_arg_14);
1002 4 : cf_arg_15 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
1003 3 : ldv_random_containerless_scenario_15(cf_arg_15);
1004 4 : cf_arg_16 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
1005 3 : ldv_random_containerless_scenario_16(cf_arg_16);
1006 3 : cf_arg_17 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
1007 2 : ldv_random_containerless_scenario_17(cf_arg_17);
1008 3 : cf_arg_18 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
1009 2 : ldv_random_containerless_scenario_18(cf_arg_18);
1010 3 : cf_arg_19 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
1011 2 : ldv_random_containerless_scenario_19(cf_arg_19);
1012 3 : cf_arg_20 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
1013 2 : ldv_random_containerless_scenario_20(cf_arg_20);
1014 3 : cf_arg_21 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
1015 2 : ldv_random_containerless_scenario_21(cf_arg_21);
1016 3 : cf_arg_22 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
1017 2 : ldv_random_containerless_scenario_22(cf_arg_22);
1018 3 : cf_arg_23 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
1019 2 : ldv_random_containerless_scenario_23(cf_arg_23);
1020 3 : cf_arg_24 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
1021 2 : ldv_random_containerless_scenario_24(cf_arg_24);
1022 1 : return;
1023 : }
1024 :
1025 : /* AUX_FUNC ldv_dispatch_default_register_8_26_10 */
1026 : void ldv_dispatch_default_register_8_26_10() {
1027 : struct ldv_struct_insmod_26 *cf_arg_4;
1028 4 : cf_arg_4 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
1029 3 : ldv_rtc_class_scenario_4(cf_arg_4);
1030 1 : return;
1031 : }
1032 :
1033 : /* AUX_FUNC ldv_dispatch_deregister_31_1 */
1034 : void ldv_dispatch_deregister_31_1(struct file_operations *arg0) {
1035 : struct ldv_struct_character_driver_scenario_1 *cf_arg_1;
1036 : struct ldv_struct_character_driver_scenario_1 *cf_arg_2;
1037 : struct ldv_struct_character_driver_scenario_1 *cf_arg_3;
1038 : /* Skip thread join call */
1039 : /* Skip thread join call */
1040 : /* Skip thread join call */
1041 2 : return;
1042 : }
1043 :
1044 : /* AUX_FUNC ldv_dispatch_insmod_deregister_33_2 */
1045 : void ldv_dispatch_insmod_deregister_33_2() {
1046 : struct ldv_struct_insmod_26 *cf_arg_26;
1047 : /* Skip thread join call */
1048 1 : return;
1049 : }
1050 :
1051 : /* AUX_FUNC ldv_dispatch_insmod_register_33_3 */
1052 : void ldv_dispatch_insmod_register_33_3() {
1053 : struct ldv_struct_insmod_26 *cf_arg_26;
1054 4 : cf_arg_26 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_26));
1055 4 : ldv_insmod_26(cf_arg_26);
1056 1 : return;
1057 : }
1058 :
1059 : /* AUX_FUNC ldv_dispatch_instance_register_29_3 */
1060 : void ldv_dispatch_instance_register_29_3(struct timer_list *arg0) {
1061 : struct ldv_struct_timer_scenario_25 *cf_arg_25;
1062 0 : cf_arg_25 = ldv_xmalloc(sizeof(struct ldv_struct_timer_scenario_25));
1063 0 : cf_arg_25->arg0 = arg0;
1064 0 : ldv_timer_scenario_25(cf_arg_25);
1065 0 : return;
1066 : }
1067 :
1068 : /* AUX_FUNC ldv_dispatch_register_30_1 */
1069 : void ldv_dispatch_register_30_1(struct seq_file *arg0, struct seq_operations *arg1) {
1070 : struct ldv_struct_traverse_kernel_items_scenario_5 *cf_arg_5;
1071 2 : struct ldv_struct_traverse_kernel_items_scenario_5 *cf_arg_6;
1072 10 : if (ldv_undef_int()) {
1073 8 : cf_arg_5 = ldv_xmalloc(sizeof(struct ldv_struct_traverse_kernel_items_scenario_5));
1074 4 : cf_arg_5->arg0 = arg0;
1075 4 : cf_arg_5->arg1 = arg1;
1076 4 : ldv_traverse_kernel_items_scenario_5(cf_arg_5);
1077 : }
1078 : else {
1079 6 : cf_arg_6 = ldv_xmalloc(sizeof(struct ldv_struct_traverse_kernel_items_scenario_5));
1080 2 : cf_arg_6->arg0 = arg0;
1081 2 : cf_arg_6->arg1 = arg1;
1082 4 : ldv_traverse_kernel_items_scenario_6(cf_arg_6);
1083 : }
1084 4 : return;
1085 : }
1086 :
1087 : /* AUX_FUNC ldv_dispatch_register_32_3 */
1088 : void ldv_dispatch_register_32_3(struct file_operations *arg0) {
1089 : struct ldv_struct_character_driver_scenario_1 *cf_arg_1;
1090 1 : struct ldv_struct_character_driver_scenario_1 *cf_arg_2;
1091 1 : struct ldv_struct_character_driver_scenario_1 *cf_arg_3;
1092 3 : switch (ldv_undef_int()) {
1093 4 : case 0: {
1094 4 : cf_arg_1 = ldv_xmalloc(sizeof(struct ldv_struct_character_driver_scenario_1));
1095 2 : cf_arg_1->arg0 = arg0;
1096 3 : ldv_character_driver_scenario_1(cf_arg_1);
1097 1 : break;
1098 1 : };
1099 3 : case 1: {
1100 3 : cf_arg_2 = ldv_xmalloc(sizeof(struct ldv_struct_character_driver_scenario_1));
1101 1 : cf_arg_2->arg0 = arg0;
1102 2 : ldv_character_driver_scenario_2(cf_arg_2);
1103 1 : break;
1104 1 : };
1105 3 : case 2: {
1106 3 : cf_arg_3 = ldv_xmalloc(sizeof(struct ldv_struct_character_driver_scenario_1));
1107 1 : cf_arg_3->arg0 = arg0;
1108 2 : ldv_character_driver_scenario_3(cf_arg_3);
1109 1 : break;
1110 1 : };
1111 2 : default: ldv_stop();
1112 1 : };
1113 3 : return;
1114 : }
1115 0 :
1116 : /* AUX_FUNC ldv_emg_mod_timer */
1117 : int ldv_emg_mod_timer(struct timer_list *arg0, long unsigned int arg1) {
1118 : /* LDV {"comment": "Control function 'mod_timer'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_mod_timer"} */
1119 0 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1120 0 : struct timer_list *ldv_29_timer_list_timer_list;
1121 0 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1122 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1123 :
1124 0 : if (ldv_undef_int()) {
1125 : /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get timer representing structure."} */
1126 0 : ldv_29_timer_list_timer_list = arg0;
1127 : /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
1128 :
1129 : /* LDV {"action": "INSTANCE_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register TIMER callbacks."} */
1130 0 : ldv_dispatch_instance_register_29_3(ldv_29_timer_list_timer_list);
1131 : /* LDV {"action": "INSTANCE_REGISTER", "type": "DISPATCH_END"} */
1132 :
1133 : /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Successfully modified a timer's timeout"} */
1134 0 : return 0;
1135 : /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
1136 :
1137 : /* Exit function at a terminal state */
1138 : }
1139 : else {
1140 : /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to modify a timer's timeout"} */
1141 0 : return ldv_undef_int_negative();
1142 : /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
1143 :
1144 : /* Exit function at a terminal state */
1145 : }
1146 : /* End of the process */
1147 : /* LDV {"comment": "End of control function based on process 'mod_timer'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_mod_timer"} */
1148 : }
1149 :
1150 : /* AUX_FUNC ldv_emg_register_chrdev */
1151 : int ldv_emg_register_chrdev(unsigned int arg0, char *arg1, struct file_operations *arg2) {
1152 : /* LDV {"comment": "Control function 'register_chrdev'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_register_chrdev"} */
1153 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1154 1 : struct file_operations *ldv_32_file_operations_file_operations;
1155 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1156 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1157 :
1158 4 : if (ldv_undef_int()) {
1159 : /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get 'file_operations' callbacks to register."} */
1160 1 : ldv_32_file_operations_file_operations = arg2;
1161 : /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
1162 :
1163 : /* LDV {"action": "REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register FILE_OPERATIONS callbacks."} */
1164 4 : ldv_dispatch_register_32_3(ldv_32_file_operations_file_operations);
1165 : /* LDV {"action": "REGISTER", "type": "DISPATCH_END"} */
1166 :
1167 : /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Fail registration of 'file_operations' callbacks."} */
1168 3 : return ldv_undef_int_negative();
1169 : /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
1170 :
1171 : /* Exit function at a terminal state */
1172 : }
1173 : else {
1174 : /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Registration of 'file_operations' callbacks has been successful."} */
1175 1 : return 0;
1176 : /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
1177 :
1178 : /* Exit function at a terminal state */
1179 : }
1180 : /* End of the process */
1181 : /* LDV {"comment": "End of control function based on process 'register_chrdev'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_register_chrdev"} */
1182 : }
1183 :
1184 : /* AUX_FUNC ldv_emg_seq_open */
1185 : int ldv_emg_seq_open(struct file *arg0, struct seq_operations *arg1) {
1186 : /* LDV {"comment": "Control function 'seq_open'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_seq_open"} */
1187 2 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1188 2 : struct file *ldv_30_file_file;
1189 2 : struct seq_operations *ldv_30_ops_seq_operations;
1190 2 : struct seq_file *ldv_30_seq_file_seq_file;
1191 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1192 : /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Alloc memory for sequential file structure and initialize it."} */
1193 6 : ldv_30_seq_file_seq_file = ldv_xmalloc(sizeof(struct seq_file));
1194 2 : ldv_30_ops_seq_operations = arg1;
1195 2 : ldv_30_file_file->private_data = ldv_30_seq_file_seq_file;
1196 : /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
1197 :
1198 : /* LDV {"action": "REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register SEQ_OPERATIONS callbacks."} */
1199 6 : ldv_dispatch_register_30_1(ldv_30_seq_file_seq_file, ldv_30_ops_seq_operations);
1200 2 : /* LDV {"action": "REGISTER", "type": "DISPATCH_END"} */
1201 :
1202 : /* Exit function at a terminal state */
1203 : /* End of the process */
1204 : /* LDV {"comment": "End of control function based on process 'seq_open'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_seq_open"} */
1205 : }
1206 :
1207 : /* AUX_FUNC ldv_emg_unregister_chrdev */
1208 : void ldv_emg_unregister_chrdev(unsigned int arg0, char *arg1) {
1209 : /* LDV {"comment": "Control function 'unregister_chrdev'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_unregister_chrdev"} */
1210 2 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1211 : struct file_operations *ldv_31_file_operations_file_operations;
1212 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1213 : /* LDV {"action": "DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Deregister FILE_OPERATIONS callbacks."} */
1214 4 : ldv_dispatch_deregister_31_1(ldv_31_file_operations_file_operations);
1215 : /* LDV {"action": "DEREGISTER", "type": "DISPATCH_END"} */
1216 :
1217 : /* Exit function at a terminal state */
1218 2 : return;
1219 : /* End of the process */
1220 : return;
1221 : /* LDV {"comment": "End of control function based on process 'unregister_chrdev'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_unregister_chrdev"} */
1222 : }
1223 :
1224 : /* AUX_FUNC ldv_insmod_26 */
1225 : void ldv_insmod_26(void *arg0) {
1226 : /* LDV {"thread": 26, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'insmod(artificial)'", "function": "ldv_insmod_26"} */
1227 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1228 1 : void (*ldv_26_input_exit_default)(void);
1229 1 : int (*ldv_26_input_init_default)(void);
1230 1 : int ldv_26_ret_default;
1231 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1232 : /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module initialization."} */
1233 2 : ldv_free(arg0);
1234 : /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_END"} */
1235 :
1236 : /* LDV {"action": "INPUT_INIT", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize the module after insmod with 'input_init' function. Invoke callback input_init from ARTIFICIAL."} */
1237 : /* LDV {"type": "CALLBACK", "call": "ldv_26_ret_default = (input_init)();", "comment": "input_init"} */
1238 2 : ldv_26_ret_default = ldv_insmod_input_init_26_14(ldv_26_input_init_default);
1239 : /* Callback post-call */
1240 2 : ldv_26_ret_default = ldv_post_init(ldv_26_ret_default);
1241 : /* LDV {"action": "INPUT_INIT", "type": "CALL_END"} */
1242 :
1243 4 : if (ldv_undef_int()) {
1244 : /* LDV {"action": "INIT_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize the module."} */
1245 2 : ldv_assume(ldv_26_ret_default != 0);
1246 : /* LDV {"action": "INIT_FAILED", "type": "CONDITION_END"} */
1247 :
1248 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
1249 : /* Skip a non-replicative signal receiving */
1250 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
1251 :
1252 : /* Exit function at a terminal state */
1253 1 : return;
1254 : }
1255 : else {
1256 : /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Module has been initialized."} */
1257 2 : ldv_assume(ldv_26_ret_default == 0);
1258 : /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_END"} */
1259 :
1260 4 : if (ldv_undef_int()) {
1261 : /* LDV {"action": "DEFAULT_REGISTER_8", "type": "DISPATCH_BEGIN", "comment": "Register 'RTC' callbacks with unknown registration function."} */
1262 2 : ldv_dispatch_default_register_8_26_10();
1263 : /* LDV {"action": "DEFAULT_REGISTER_8", "type": "DISPATCH_END"} */
1264 :
1265 : /* LDV {"action": "DEFAULT_REGISTER_10", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_CLASS' callbacks with unknown registration function."} */
1266 2 : ldv_dispatch_default_register_10_26_9();
1267 : /* LDV {"action": "DEFAULT_REGISTER_10", "type": "DISPATCH_END"} */
1268 :
1269 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_DEVICE_ATTRIBUTE' callbacks with unknown registration function."} */
1270 2 : ldv_dispatch_default_register_11_26_8();
1271 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "DISPATCH_END"} */
1272 :
1273 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_DEVICE_ATTRIBUTE' callbacks with unknown deregistration function."} */
1274 2 : ldv_dispatch_default_deregister_11_26_7();
1275 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "DISPATCH_END"} */
1276 :
1277 : /* LDV {"action": "DEFAULT_DEREGISTER_10", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_CLASS' callbacks with unknown deregistration function."} */
1278 2 : ldv_dispatch_default_deregister_10_26_6();
1279 : /* LDV {"action": "DEFAULT_DEREGISTER_10", "type": "DISPATCH_END"} */
1280 :
1281 : /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "DISPATCH_BEGIN", "comment": "Deregister 'SEQ_OPERATIONS' callbacks with unknown deregistration function."} */
1282 2 : ldv_dispatch_default_deregister_9_26_5();
1283 : /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "DISPATCH_END"} */
1284 :
1285 : /* LDV {"action": "DEFAULT_DEREGISTER_8", "type": "DISPATCH_BEGIN", "comment": "Deregister 'RTC' callbacks with unknown deregistration function."} */
1286 2 : ldv_dispatch_default_deregister_8_26_4();
1287 : /* LDV {"action": "DEFAULT_DEREGISTER_8", "type": "DISPATCH_END"} */
1288 :
1289 : }
1290 : else {
1291 : /* LDV {"action": "NONE", "type": "CONDITION_BEGIN", "comment": "Skip default callbacks registrations and deregistrations."} */
1292 : /* LDV {"action": "NONE", "type": "CONDITION_END"} */
1293 :
1294 : }
1295 : /* LDV {"action": "INPUT_EXIT", "type": "CALL_BEGIN", "callback": true, "comment": "Exit the module before its unloading with 'input_exit' function. Invoke callback input_exit from ARTIFICIAL."} */
1296 : /* LDV {"type": "CALLBACK", "call": "(input_exit)();", "comment": "input_exit"} */
1297 4 : ldv_insmod_input_exit_26_2(ldv_26_input_exit_default);
1298 : /* LDV {"action": "INPUT_EXIT", "type": "CALL_END"} */
1299 :
1300 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
1301 : /* Skip a non-replicative signal receiving */
1302 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
1303 :
1304 : /* Exit function at a terminal state */
1305 1 : return;
1306 : }
1307 : /* End of the process */
1308 : return;
1309 : /* LDV {"comment": "End of control function based on process 'insmod(artificial)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_insmod_26"} */
1310 : }
1311 :
1312 : /* AUX_FUNC_CALLBACK ldv_insmod_input_exit_26_2 */
1313 : void ldv_insmod_input_exit_26_2(void (*arg0)(void)) {
1314 4 : (input_exit)();
1315 2 : }
1316 :
1317 : /* AUX_FUNC_CALLBACK ldv_insmod_input_init_26_14 */
1318 : int ldv_insmod_input_init_26_14(int (*arg0)(void)) {
1319 6 : return (input_init)();
1320 1 : }
1321 :
1322 : /* AUX_FUNC ldv_main_33 */
1323 : void ldv_main_33(void *arg0) {
1324 : /* LDV {"thread": 33, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'main(main)'", "function": "ldv_main_33"} */
1325 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1326 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1327 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Initialize rule models."} */
1328 1 : ldv_initialize();
1329 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
1330 :
1331 : /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Start environment model scenarios."} */
1332 2 : ldv_dispatch_insmod_register_33_3();
1333 : /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_END"} */
1334 :
1335 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Stop environment model scenarios."} */
1336 2 : ldv_dispatch_insmod_deregister_33_2();
1337 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_END"} */
1338 :
1339 : /* LDV {"action": "FINAL", "type": "CONDITION_BEGIN", "comment": "Check rule model state at the exit."} */
1340 1 : ldv_check_final_state();
1341 1 : ldv_stop();
1342 : /* LDV {"action": "FINAL", "type": "CONDITION_END"} */
1343 :
1344 : /* Exit function at a terminal state */
1345 0 : return;
1346 : /* End of the process */
1347 : return;
1348 : /* LDV {"comment": "End of control function based on process 'main(main)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_main_33"} */
1349 : }
1350 :
1351 : /* AUX_FUNC ldv_random_containerless_scenario_10 */
1352 : void ldv_random_containerless_scenario_10(void *arg0) {
1353 : /* LDV {"thread": 10, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_10"} */
1354 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1355 1 : ssize_t (*ldv_10_callback_show)(struct device *, struct device_attribute *, char *);
1356 1 : struct device_attribute *ldv_10_container_struct_device_attribute;
1357 1 : struct device *ldv_10_container_struct_device_ptr;
1358 1 : char *ldv_10_ldv_param_4_2_default;
1359 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1360 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1361 3 : ldv_free(arg0);
1362 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
1363 :
1364 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1365 3 : ldv_10_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1366 3 : ldv_10_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1367 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
1368 :
1369 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1370 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1371 :
1372 : /* Jump to a subprocess 'call' initial state */
1373 1 : goto ldv_call_10;
1374 : /* End of the process */
1375 : return;
1376 1 :
1377 : /* Sbprocess call */
1378 : ldv_call_10:
1379 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1380 :
1381 4 : if (ldv_undef_int()) {
1382 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1383 3 : ldv_10_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1384 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1385 :
1386 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1387 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_cap_ev))(ldv_10_container_struct_device_ptr, ldv_10_container_struct_device_attribute, ldv_10_ldv_param_4_2_default);", "comment": "callback"} */
1388 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);
1389 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1390 :
1391 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1392 2 : ldv_free(ldv_10_ldv_param_4_2_default);
1393 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1394 :
1395 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1396 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1397 :
1398 : /* Jump to a subprocess 'call' initial state */
1399 1 : goto ldv_call_10;
1400 : }
1401 : else {
1402 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1403 2 : ldv_free(ldv_10_container_struct_device_attribute);
1404 2 : ldv_free(ldv_10_container_struct_device_ptr);
1405 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
1406 :
1407 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1408 : /* Skip a non-replicative signal receiving */
1409 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
1410 :
1411 : /* Exit function at a terminal state */
1412 1 : return;
1413 : }
1414 : /* End of the subprocess 'call' */
1415 : return;
1416 : /* 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"} */
1417 : }
1418 :
1419 : /* AUX_FUNC ldv_random_containerless_scenario_11 */
1420 : void ldv_random_containerless_scenario_11(void *arg0) {
1421 : /* LDV {"thread": 11, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_11"} */
1422 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1423 1 : ssize_t (*ldv_11_callback_show)(struct device *, struct device_attribute *, char *);
1424 1 : struct device_attribute *ldv_11_container_struct_device_attribute;
1425 1 : struct device *ldv_11_container_struct_device_ptr;
1426 1 : char *ldv_11_ldv_param_4_2_default;
1427 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1428 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1429 3 : ldv_free(arg0);
1430 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
1431 :
1432 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1433 3 : ldv_11_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1434 3 : ldv_11_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1435 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
1436 :
1437 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1438 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1439 :
1440 : /* Jump to a subprocess 'call' initial state */
1441 1 : goto ldv_call_11;
1442 : /* End of the process */
1443 : return;
1444 1 :
1445 : /* Sbprocess call */
1446 : ldv_call_11:
1447 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1448 :
1449 4 : if (ldv_undef_int()) {
1450 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1451 3 : ldv_11_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1452 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1453 :
1454 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1455 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_cap_ff))(ldv_11_container_struct_device_ptr, ldv_11_container_struct_device_attribute, ldv_11_ldv_param_4_2_default);", "comment": "callback"} */
1456 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);
1457 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1458 :
1459 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1460 2 : ldv_free(ldv_11_ldv_param_4_2_default);
1461 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1462 :
1463 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1464 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1465 :
1466 : /* Jump to a subprocess 'call' initial state */
1467 1 : goto ldv_call_11;
1468 : }
1469 : else {
1470 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1471 2 : ldv_free(ldv_11_container_struct_device_attribute);
1472 2 : ldv_free(ldv_11_container_struct_device_ptr);
1473 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
1474 :
1475 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1476 : /* Skip a non-replicative signal receiving */
1477 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
1478 :
1479 : /* Exit function at a terminal state */
1480 1 : return;
1481 : }
1482 : /* End of the subprocess 'call' */
1483 : return;
1484 : /* 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"} */
1485 : }
1486 :
1487 : /* AUX_FUNC ldv_random_containerless_scenario_12 */
1488 : void ldv_random_containerless_scenario_12(void *arg0) {
1489 : /* LDV {"thread": 12, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_12"} */
1490 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1491 1 : ssize_t (*ldv_12_callback_show)(struct device *, struct device_attribute *, char *);
1492 1 : struct device_attribute *ldv_12_container_struct_device_attribute;
1493 1 : struct device *ldv_12_container_struct_device_ptr;
1494 1 : char *ldv_12_ldv_param_4_2_default;
1495 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1496 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1497 3 : ldv_free(arg0);
1498 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
1499 :
1500 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1501 3 : ldv_12_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1502 3 : ldv_12_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1503 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
1504 :
1505 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1506 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1507 :
1508 : /* Jump to a subprocess 'call' initial state */
1509 1 : goto ldv_call_12;
1510 : /* End of the process */
1511 : return;
1512 1 :
1513 : /* Sbprocess call */
1514 : ldv_call_12:
1515 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1516 :
1517 4 : if (ldv_undef_int()) {
1518 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1519 3 : ldv_12_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1520 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1521 :
1522 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1523 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_cap_key))(ldv_12_container_struct_device_ptr, ldv_12_container_struct_device_attribute, ldv_12_ldv_param_4_2_default);", "comment": "callback"} */
1524 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);
1525 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1526 :
1527 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1528 2 : ldv_free(ldv_12_ldv_param_4_2_default);
1529 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1530 :
1531 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1532 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1533 :
1534 : /* Jump to a subprocess 'call' initial state */
1535 1 : goto ldv_call_12;
1536 : }
1537 : else {
1538 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1539 2 : ldv_free(ldv_12_container_struct_device_attribute);
1540 2 : ldv_free(ldv_12_container_struct_device_ptr);
1541 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
1542 :
1543 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1544 : /* Skip a non-replicative signal receiving */
1545 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
1546 :
1547 : /* Exit function at a terminal state */
1548 1 : return;
1549 : }
1550 : /* End of the subprocess 'call' */
1551 : return;
1552 : /* 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"} */
1553 : }
1554 :
1555 : /* AUX_FUNC ldv_random_containerless_scenario_13 */
1556 : void ldv_random_containerless_scenario_13(void *arg0) {
1557 : /* LDV {"thread": 13, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_13"} */
1558 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1559 1 : ssize_t (*ldv_13_callback_show)(struct device *, struct device_attribute *, char *);
1560 1 : struct device_attribute *ldv_13_container_struct_device_attribute;
1561 1 : struct device *ldv_13_container_struct_device_ptr;
1562 1 : char *ldv_13_ldv_param_4_2_default;
1563 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1564 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1565 3 : ldv_free(arg0);
1566 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
1567 :
1568 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1569 3 : ldv_13_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1570 3 : ldv_13_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1571 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
1572 :
1573 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1574 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1575 :
1576 : /* Jump to a subprocess 'call' initial state */
1577 1 : goto ldv_call_13;
1578 : /* End of the process */
1579 : return;
1580 1 :
1581 : /* Sbprocess call */
1582 : ldv_call_13:
1583 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1584 :
1585 4 : if (ldv_undef_int()) {
1586 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1587 3 : ldv_13_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1588 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1589 :
1590 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1591 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_cap_led))(ldv_13_container_struct_device_ptr, ldv_13_container_struct_device_attribute, ldv_13_ldv_param_4_2_default);", "comment": "callback"} */
1592 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);
1593 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1594 :
1595 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1596 2 : ldv_free(ldv_13_ldv_param_4_2_default);
1597 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1598 :
1599 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1600 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1601 :
1602 : /* Jump to a subprocess 'call' initial state */
1603 1 : goto ldv_call_13;
1604 : }
1605 : else {
1606 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1607 2 : ldv_free(ldv_13_container_struct_device_attribute);
1608 2 : ldv_free(ldv_13_container_struct_device_ptr);
1609 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
1610 :
1611 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1612 : /* Skip a non-replicative signal receiving */
1613 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
1614 :
1615 : /* Exit function at a terminal state */
1616 1 : return;
1617 : }
1618 : /* End of the subprocess 'call' */
1619 : return;
1620 : /* 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"} */
1621 : }
1622 :
1623 : /* AUX_FUNC ldv_random_containerless_scenario_14 */
1624 : void ldv_random_containerless_scenario_14(void *arg0) {
1625 : /* LDV {"thread": 14, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_14"} */
1626 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1627 1 : ssize_t (*ldv_14_callback_show)(struct device *, struct device_attribute *, char *);
1628 1 : struct device_attribute *ldv_14_container_struct_device_attribute;
1629 1 : struct device *ldv_14_container_struct_device_ptr;
1630 1 : char *ldv_14_ldv_param_4_2_default;
1631 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1632 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1633 3 : ldv_free(arg0);
1634 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
1635 :
1636 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1637 3 : ldv_14_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1638 3 : ldv_14_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1639 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
1640 :
1641 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1642 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1643 :
1644 : /* Jump to a subprocess 'call' initial state */
1645 1 : goto ldv_call_14;
1646 : /* End of the process */
1647 : return;
1648 1 :
1649 : /* Sbprocess call */
1650 : ldv_call_14:
1651 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1652 :
1653 4 : if (ldv_undef_int()) {
1654 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1655 3 : ldv_14_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1656 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1657 :
1658 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1659 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_modalias))(ldv_14_container_struct_device_ptr, ldv_14_container_struct_device_attribute, ldv_14_ldv_param_4_2_default);", "comment": "callback"} */
1660 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);
1661 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1662 :
1663 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1664 2 : ldv_free(ldv_14_ldv_param_4_2_default);
1665 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1666 :
1667 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1668 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1669 :
1670 : /* Jump to a subprocess 'call' initial state */
1671 1 : goto ldv_call_14;
1672 : }
1673 : else {
1674 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1675 2 : ldv_free(ldv_14_container_struct_device_attribute);
1676 2 : ldv_free(ldv_14_container_struct_device_ptr);
1677 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
1678 :
1679 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1680 : /* Skip a non-replicative signal receiving */
1681 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
1682 :
1683 : /* Exit function at a terminal state */
1684 1 : return;
1685 : }
1686 : /* End of the subprocess 'call' */
1687 : return;
1688 : /* 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"} */
1689 : }
1690 :
1691 : /* AUX_FUNC ldv_random_containerless_scenario_15 */
1692 : void ldv_random_containerless_scenario_15(void *arg0) {
1693 : /* LDV {"thread": 15, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_15"} */
1694 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1695 1 : ssize_t (*ldv_15_callback_show)(struct device *, struct device_attribute *, char *);
1696 1 : struct device_attribute *ldv_15_container_struct_device_attribute;
1697 1 : struct device *ldv_15_container_struct_device_ptr;
1698 1 : char *ldv_15_ldv_param_4_2_default;
1699 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1700 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1701 3 : ldv_free(arg0);
1702 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
1703 :
1704 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1705 3 : ldv_15_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1706 3 : ldv_15_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1707 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
1708 :
1709 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1710 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1711 :
1712 : /* Jump to a subprocess 'call' initial state */
1713 1 : goto ldv_call_15;
1714 : /* End of the process */
1715 : return;
1716 1 :
1717 : /* Sbprocess call */
1718 : ldv_call_15:
1719 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1720 :
1721 4 : if (ldv_undef_int()) {
1722 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1723 3 : ldv_15_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1724 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1725 :
1726 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1727 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_cap_msc))(ldv_15_container_struct_device_ptr, ldv_15_container_struct_device_attribute, ldv_15_ldv_param_4_2_default);", "comment": "callback"} */
1728 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);
1729 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1730 :
1731 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1732 2 : ldv_free(ldv_15_ldv_param_4_2_default);
1733 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1734 :
1735 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1736 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1737 :
1738 : /* Jump to a subprocess 'call' initial state */
1739 1 : goto ldv_call_15;
1740 : }
1741 : else {
1742 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1743 2 : ldv_free(ldv_15_container_struct_device_attribute);
1744 2 : ldv_free(ldv_15_container_struct_device_ptr);
1745 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
1746 :
1747 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1748 : /* Skip a non-replicative signal receiving */
1749 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
1750 :
1751 : /* Exit function at a terminal state */
1752 1 : return;
1753 : }
1754 : /* End of the subprocess 'call' */
1755 : return;
1756 : /* 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"} */
1757 : }
1758 :
1759 : /* AUX_FUNC ldv_random_containerless_scenario_16 */
1760 : void ldv_random_containerless_scenario_16(void *arg0) {
1761 : /* LDV {"thread": 16, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_16"} */
1762 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1763 1 : ssize_t (*ldv_16_callback_show)(struct device *, struct device_attribute *, char *);
1764 1 : struct device_attribute *ldv_16_container_struct_device_attribute;
1765 1 : struct device *ldv_16_container_struct_device_ptr;
1766 1 : char *ldv_16_ldv_param_4_2_default;
1767 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1768 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1769 3 : ldv_free(arg0);
1770 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
1771 :
1772 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1773 3 : ldv_16_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1774 3 : ldv_16_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1775 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
1776 :
1777 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1778 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1779 :
1780 : /* Jump to a subprocess 'call' initial state */
1781 1 : goto ldv_call_16;
1782 : /* End of the process */
1783 : return;
1784 1 :
1785 : /* Sbprocess call */
1786 : ldv_call_16:
1787 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1788 :
1789 4 : if (ldv_undef_int()) {
1790 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1791 3 : ldv_16_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1792 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1793 :
1794 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1795 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_name))(ldv_16_container_struct_device_ptr, ldv_16_container_struct_device_attribute, ldv_16_ldv_param_4_2_default);", "comment": "callback"} */
1796 2 : ldv_random_containerless_scenario_callback_16_4(ldv_16_callback_show, ldv_16_container_struct_device_ptr, ldv_16_container_struct_device_attribute, ldv_16_ldv_param_4_2_default);
1797 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1798 :
1799 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1800 2 : ldv_free(ldv_16_ldv_param_4_2_default);
1801 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1802 :
1803 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1804 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1805 :
1806 : /* Jump to a subprocess 'call' initial state */
1807 1 : goto ldv_call_16;
1808 : }
1809 : else {
1810 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1811 2 : ldv_free(ldv_16_container_struct_device_attribute);
1812 2 : ldv_free(ldv_16_container_struct_device_ptr);
1813 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
1814 :
1815 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1816 : /* Skip a non-replicative signal receiving */
1817 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
1818 :
1819 : /* Exit function at a terminal state */
1820 1 : return;
1821 : }
1822 : /* End of the subprocess 'call' */
1823 : return;
1824 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_16"} */
1825 : }
1826 :
1827 : /* AUX_FUNC ldv_random_containerless_scenario_17 */
1828 : void ldv_random_containerless_scenario_17(void *arg0) {
1829 : /* LDV {"thread": 17, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_17"} */
1830 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1831 1 : ssize_t (*ldv_17_callback_show)(struct device *, struct device_attribute *, char *);
1832 1 : struct device_attribute *ldv_17_container_struct_device_attribute;
1833 1 : struct device *ldv_17_container_struct_device_ptr;
1834 1 : char *ldv_17_ldv_param_4_2_default;
1835 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1836 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1837 3 : ldv_free(arg0);
1838 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
1839 :
1840 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1841 3 : ldv_17_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1842 3 : ldv_17_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1843 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
1844 :
1845 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1846 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1847 :
1848 : /* Jump to a subprocess 'call' initial state */
1849 1 : goto ldv_call_17;
1850 : /* End of the process */
1851 : return;
1852 1 :
1853 : /* Sbprocess call */
1854 : ldv_call_17:
1855 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1856 :
1857 4 : if (ldv_undef_int()) {
1858 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1859 3 : ldv_17_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1860 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1861 :
1862 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1863 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_phys))(ldv_17_container_struct_device_ptr, ldv_17_container_struct_device_attribute, ldv_17_ldv_param_4_2_default);", "comment": "callback"} */
1864 2 : ldv_random_containerless_scenario_callback_17_4(ldv_17_callback_show, ldv_17_container_struct_device_ptr, ldv_17_container_struct_device_attribute, ldv_17_ldv_param_4_2_default);
1865 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1866 :
1867 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1868 2 : ldv_free(ldv_17_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_17;
1876 : }
1877 : else {
1878 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1879 2 : ldv_free(ldv_17_container_struct_device_attribute);
1880 2 : ldv_free(ldv_17_container_struct_device_ptr);
1881 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
1882 :
1883 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1884 : /* Skip a non-replicative signal receiving */
1885 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "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_17"} */
1893 : }
1894 :
1895 : /* AUX_FUNC ldv_random_containerless_scenario_18 */
1896 : void ldv_random_containerless_scenario_18(void *arg0) {
1897 : /* LDV {"thread": 18, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_18"} */
1898 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1899 1 : ssize_t (*ldv_18_callback_show)(struct device *, struct device_attribute *, char *);
1900 1 : struct device_attribute *ldv_18_container_struct_device_attribute;
1901 1 : struct device *ldv_18_container_struct_device_ptr;
1902 1 : char *ldv_18_ldv_param_4_2_default;
1903 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1904 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1905 3 : ldv_free(arg0);
1906 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
1907 :
1908 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1909 3 : ldv_18_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1910 3 : ldv_18_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1911 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
1912 :
1913 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1914 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1915 :
1916 : /* Jump to a subprocess 'call' initial state */
1917 1 : goto ldv_call_18;
1918 : /* End of the process */
1919 : return;
1920 1 :
1921 : /* Sbprocess call */
1922 : ldv_call_18:
1923 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1924 :
1925 4 : if (ldv_undef_int()) {
1926 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1927 3 : ldv_18_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1928 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1929 :
1930 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1931 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_id_product))(ldv_18_container_struct_device_ptr, ldv_18_container_struct_device_attribute, ldv_18_ldv_param_4_2_default);", "comment": "callback"} */
1932 2 : ldv_random_containerless_scenario_callback_18_4(ldv_18_callback_show, ldv_18_container_struct_device_ptr, ldv_18_container_struct_device_attribute, ldv_18_ldv_param_4_2_default);
1933 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1934 :
1935 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1936 2 : ldv_free(ldv_18_ldv_param_4_2_default);
1937 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1938 :
1939 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1940 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1941 :
1942 : /* Jump to a subprocess 'call' initial state */
1943 1 : goto ldv_call_18;
1944 : }
1945 : else {
1946 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1947 2 : ldv_free(ldv_18_container_struct_device_attribute);
1948 2 : ldv_free(ldv_18_container_struct_device_ptr);
1949 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
1950 :
1951 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1952 : /* Skip a non-replicative signal receiving */
1953 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
1954 :
1955 : /* Exit function at a terminal state */
1956 1 : return;
1957 : }
1958 : /* End of the subprocess 'call' */
1959 : return;
1960 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_18"} */
1961 : }
1962 :
1963 : /* AUX_FUNC ldv_random_containerless_scenario_19 */
1964 : void ldv_random_containerless_scenario_19(void *arg0) {
1965 : /* LDV {"thread": 19, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_19"} */
1966 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1967 1 : ssize_t (*ldv_19_callback_show)(struct device *, struct device_attribute *, char *);
1968 1 : struct device_attribute *ldv_19_container_struct_device_attribute;
1969 1 : struct device *ldv_19_container_struct_device_ptr;
1970 1 : char *ldv_19_ldv_param_4_2_default;
1971 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1972 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
1973 3 : ldv_free(arg0);
1974 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
1975 :
1976 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1977 3 : ldv_19_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1978 3 : ldv_19_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1979 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
1980 :
1981 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1982 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1983 :
1984 : /* Jump to a subprocess 'call' initial state */
1985 1 : goto ldv_call_19;
1986 : /* End of the process */
1987 : return;
1988 1 :
1989 : /* Sbprocess call */
1990 : ldv_call_19:
1991 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1992 :
1993 4 : if (ldv_undef_int()) {
1994 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1995 3 : ldv_19_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
1996 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1997 :
1998 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1999 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_cap_rel))(ldv_19_container_struct_device_ptr, ldv_19_container_struct_device_attribute, ldv_19_ldv_param_4_2_default);", "comment": "callback"} */
2000 2 : ldv_random_containerless_scenario_callback_19_4(ldv_19_callback_show, ldv_19_container_struct_device_ptr, ldv_19_container_struct_device_attribute, ldv_19_ldv_param_4_2_default);
2001 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2002 :
2003 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2004 2 : ldv_free(ldv_19_ldv_param_4_2_default);
2005 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
2006 :
2007 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2008 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2009 :
2010 : /* Jump to a subprocess 'call' initial state */
2011 1 : goto ldv_call_19;
2012 : }
2013 : else {
2014 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
2015 2 : ldv_free(ldv_19_container_struct_device_attribute);
2016 2 : ldv_free(ldv_19_container_struct_device_ptr);
2017 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
2018 :
2019 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2020 : /* Skip a non-replicative signal receiving */
2021 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
2022 :
2023 : /* Exit function at a terminal state */
2024 1 : return;
2025 : }
2026 : /* End of the subprocess 'call' */
2027 : return;
2028 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_19"} */
2029 : }
2030 :
2031 : /* AUX_FUNC ldv_random_containerless_scenario_20 */
2032 : void ldv_random_containerless_scenario_20(void *arg0) {
2033 : /* LDV {"thread": 20, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_20"} */
2034 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2035 1 : ssize_t (*ldv_20_callback_show)(struct device *, struct device_attribute *, char *);
2036 1 : struct device_attribute *ldv_20_container_struct_device_attribute;
2037 1 : struct device *ldv_20_container_struct_device_ptr;
2038 1 : char *ldv_20_ldv_param_4_2_default;
2039 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2040 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2041 3 : ldv_free(arg0);
2042 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
2043 :
2044 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
2045 3 : ldv_20_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
2046 3 : ldv_20_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
2047 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
2048 :
2049 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2050 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2051 :
2052 : /* Jump to a subprocess 'call' initial state */
2053 1 : goto ldv_call_20;
2054 : /* End of the process */
2055 : return;
2056 1 :
2057 : /* Sbprocess call */
2058 : ldv_call_20:
2059 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2060 :
2061 4 : if (ldv_undef_int()) {
2062 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2063 3 : ldv_20_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
2064 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
2065 :
2066 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
2067 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_cap_snd))(ldv_20_container_struct_device_ptr, ldv_20_container_struct_device_attribute, ldv_20_ldv_param_4_2_default);", "comment": "callback"} */
2068 2 : ldv_random_containerless_scenario_callback_20_4(ldv_20_callback_show, ldv_20_container_struct_device_ptr, ldv_20_container_struct_device_attribute, ldv_20_ldv_param_4_2_default);
2069 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2070 :
2071 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2072 2 : ldv_free(ldv_20_ldv_param_4_2_default);
2073 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
2074 :
2075 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2076 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2077 :
2078 : /* Jump to a subprocess 'call' initial state */
2079 1 : goto ldv_call_20;
2080 : }
2081 : else {
2082 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
2083 2 : ldv_free(ldv_20_container_struct_device_attribute);
2084 2 : ldv_free(ldv_20_container_struct_device_ptr);
2085 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
2086 :
2087 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2088 : /* Skip a non-replicative signal receiving */
2089 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
2090 :
2091 : /* Exit function at a terminal state */
2092 1 : return;
2093 : }
2094 : /* End of the subprocess 'call' */
2095 : return;
2096 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_20"} */
2097 : }
2098 :
2099 : /* AUX_FUNC ldv_random_containerless_scenario_21 */
2100 : void ldv_random_containerless_scenario_21(void *arg0) {
2101 : /* LDV {"thread": 21, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_21"} */
2102 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2103 1 : ssize_t (*ldv_21_callback_show)(struct device *, struct device_attribute *, char *);
2104 1 : struct device_attribute *ldv_21_container_struct_device_attribute;
2105 1 : struct device *ldv_21_container_struct_device_ptr;
2106 1 : char *ldv_21_ldv_param_4_2_default;
2107 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2108 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2109 3 : ldv_free(arg0);
2110 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
2111 :
2112 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
2113 3 : ldv_21_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
2114 3 : ldv_21_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
2115 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
2116 :
2117 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2118 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2119 :
2120 : /* Jump to a subprocess 'call' initial state */
2121 1 : goto ldv_call_21;
2122 : /* End of the process */
2123 : return;
2124 1 :
2125 : /* Sbprocess call */
2126 : ldv_call_21:
2127 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2128 :
2129 4 : if (ldv_undef_int()) {
2130 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2131 3 : ldv_21_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
2132 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
2133 :
2134 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
2135 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_cap_sw))(ldv_21_container_struct_device_ptr, ldv_21_container_struct_device_attribute, ldv_21_ldv_param_4_2_default);", "comment": "callback"} */
2136 2 : ldv_random_containerless_scenario_callback_21_4(ldv_21_callback_show, ldv_21_container_struct_device_ptr, ldv_21_container_struct_device_attribute, ldv_21_ldv_param_4_2_default);
2137 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2138 :
2139 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2140 2 : ldv_free(ldv_21_ldv_param_4_2_default);
2141 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
2142 :
2143 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2144 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2145 :
2146 : /* Jump to a subprocess 'call' initial state */
2147 1 : goto ldv_call_21;
2148 : }
2149 : else {
2150 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
2151 2 : ldv_free(ldv_21_container_struct_device_attribute);
2152 2 : ldv_free(ldv_21_container_struct_device_ptr);
2153 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
2154 :
2155 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2156 : /* Skip a non-replicative signal receiving */
2157 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
2158 :
2159 : /* Exit function at a terminal state */
2160 1 : return;
2161 : }
2162 : /* End of the subprocess 'call' */
2163 : return;
2164 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_21"} */
2165 : }
2166 :
2167 : /* AUX_FUNC ldv_random_containerless_scenario_22 */
2168 : void ldv_random_containerless_scenario_22(void *arg0) {
2169 : /* LDV {"thread": 22, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_22"} */
2170 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2171 1 : ssize_t (*ldv_22_callback_show)(struct device *, struct device_attribute *, char *);
2172 1 : struct device_attribute *ldv_22_container_struct_device_attribute;
2173 1 : struct device *ldv_22_container_struct_device_ptr;
2174 1 : char *ldv_22_ldv_param_4_2_default;
2175 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2176 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2177 3 : ldv_free(arg0);
2178 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
2179 :
2180 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
2181 3 : ldv_22_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
2182 3 : ldv_22_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
2183 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
2184 :
2185 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2186 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2187 :
2188 : /* Jump to a subprocess 'call' initial state */
2189 1 : goto ldv_call_22;
2190 : /* End of the process */
2191 : return;
2192 1 :
2193 : /* Sbprocess call */
2194 : ldv_call_22:
2195 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2196 :
2197 4 : if (ldv_undef_int()) {
2198 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2199 3 : ldv_22_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
2200 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
2201 :
2202 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
2203 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_uniq))(ldv_22_container_struct_device_ptr, ldv_22_container_struct_device_attribute, ldv_22_ldv_param_4_2_default);", "comment": "callback"} */
2204 2 : ldv_random_containerless_scenario_callback_22_4(ldv_22_callback_show, ldv_22_container_struct_device_ptr, ldv_22_container_struct_device_attribute, ldv_22_ldv_param_4_2_default);
2205 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2206 :
2207 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2208 2 : ldv_free(ldv_22_ldv_param_4_2_default);
2209 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
2210 :
2211 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2212 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2213 :
2214 : /* Jump to a subprocess 'call' initial state */
2215 1 : goto ldv_call_22;
2216 : }
2217 : else {
2218 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
2219 2 : ldv_free(ldv_22_container_struct_device_attribute);
2220 2 : ldv_free(ldv_22_container_struct_device_ptr);
2221 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
2222 :
2223 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2224 : /* Skip a non-replicative signal receiving */
2225 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
2226 :
2227 : /* Exit function at a terminal state */
2228 1 : return;
2229 : }
2230 : /* End of the subprocess 'call' */
2231 : return;
2232 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_22"} */
2233 : }
2234 :
2235 : /* AUX_FUNC ldv_random_containerless_scenario_23 */
2236 : void ldv_random_containerless_scenario_23(void *arg0) {
2237 : /* LDV {"thread": 23, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_23"} */
2238 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2239 1 : ssize_t (*ldv_23_callback_show)(struct device *, struct device_attribute *, char *);
2240 1 : struct device_attribute *ldv_23_container_struct_device_attribute;
2241 1 : struct device *ldv_23_container_struct_device_ptr;
2242 1 : char *ldv_23_ldv_param_4_2_default;
2243 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2244 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2245 3 : ldv_free(arg0);
2246 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
2247 :
2248 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
2249 3 : ldv_23_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
2250 3 : ldv_23_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
2251 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
2252 :
2253 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2254 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2255 :
2256 : /* Jump to a subprocess 'call' initial state */
2257 1 : goto ldv_call_23;
2258 : /* End of the process */
2259 : return;
2260 1 :
2261 : /* Sbprocess call */
2262 : ldv_call_23:
2263 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2264 :
2265 4 : if (ldv_undef_int()) {
2266 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2267 3 : ldv_23_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
2268 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
2269 :
2270 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
2271 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_id_vendor))(ldv_23_container_struct_device_ptr, ldv_23_container_struct_device_attribute, ldv_23_ldv_param_4_2_default);", "comment": "callback"} */
2272 2 : ldv_random_containerless_scenario_callback_23_4(ldv_23_callback_show, ldv_23_container_struct_device_ptr, ldv_23_container_struct_device_attribute, ldv_23_ldv_param_4_2_default);
2273 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2274 :
2275 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2276 2 : ldv_free(ldv_23_ldv_param_4_2_default);
2277 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
2278 :
2279 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2280 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2281 :
2282 : /* Jump to a subprocess 'call' initial state */
2283 1 : goto ldv_call_23;
2284 : }
2285 : else {
2286 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
2287 2 : ldv_free(ldv_23_container_struct_device_attribute);
2288 2 : ldv_free(ldv_23_container_struct_device_ptr);
2289 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
2290 :
2291 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2292 : /* Skip a non-replicative signal receiving */
2293 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
2294 :
2295 : /* Exit function at a terminal state */
2296 1 : return;
2297 : }
2298 : /* End of the subprocess 'call' */
2299 : return;
2300 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_23"} */
2301 : }
2302 :
2303 : /* AUX_FUNC ldv_random_containerless_scenario_24 */
2304 : void ldv_random_containerless_scenario_24(void *arg0) {
2305 : /* LDV {"thread": 24, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_24"} */
2306 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2307 1 : ssize_t (*ldv_24_callback_show)(struct device *, struct device_attribute *, char *);
2308 1 : struct device_attribute *ldv_24_container_struct_device_attribute;
2309 1 : struct device *ldv_24_container_struct_device_ptr;
2310 1 : char *ldv_24_ldv_param_4_2_default;
2311 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2312 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2313 3 : ldv_free(arg0);
2314 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
2315 :
2316 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
2317 3 : ldv_24_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
2318 3 : ldv_24_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
2319 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
2320 :
2321 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2322 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2323 :
2324 : /* Jump to a subprocess 'call' initial state */
2325 1 : goto ldv_call_24;
2326 : /* End of the process */
2327 : return;
2328 1 :
2329 : /* Sbprocess call */
2330 : ldv_call_24:
2331 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2332 :
2333 4 : if (ldv_undef_int()) {
2334 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2335 3 : ldv_24_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
2336 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
2337 :
2338 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
2339 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_id_version))(ldv_24_container_struct_device_ptr, ldv_24_container_struct_device_attribute, ldv_24_ldv_param_4_2_default);", "comment": "callback"} */
2340 2 : ldv_random_containerless_scenario_callback_24_4(ldv_24_callback_show, ldv_24_container_struct_device_ptr, ldv_24_container_struct_device_attribute, ldv_24_ldv_param_4_2_default);
2341 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2342 :
2343 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2344 2 : ldv_free(ldv_24_ldv_param_4_2_default);
2345 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
2346 :
2347 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2348 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2349 :
2350 : /* Jump to a subprocess 'call' initial state */
2351 1 : goto ldv_call_24;
2352 : }
2353 : else {
2354 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
2355 2 : ldv_free(ldv_24_container_struct_device_attribute);
2356 2 : ldv_free(ldv_24_container_struct_device_ptr);
2357 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
2358 :
2359 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2360 : /* Skip a non-replicative signal receiving */
2361 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
2362 :
2363 : /* Exit function at a terminal state */
2364 1 : return;
2365 : }
2366 : /* End of the subprocess 'call' */
2367 : return;
2368 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_device_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_24"} */
2369 : }
2370 :
2371 : /* AUX_FUNC ldv_random_containerless_scenario_7 */
2372 : void ldv_random_containerless_scenario_7(void *arg0) {
2373 : /* LDV {"thread": 7, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_class)'", "function": "ldv_random_containerless_scenario_7"} */
2374 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2375 1 : char *(*ldv_7_callback_devnode)(struct device *, mode_t *);
2376 1 : struct device *ldv_7_container_struct_device_ptr;
2377 1 : unsigned int *ldv_7_ldv_param_4_1_default;
2378 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2379 1 : /* LDV {"action": "DEFAULT_REGISTER_10", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_CLASS callbacks invocations scenario."} */
2380 2 : ldv_free(arg0);
2381 : /* LDV {"action": "DEFAULT_REGISTER_10", "type": "RECEIVE_END"} */
2382 :
2383 : /* LDV {"action": "DEFAULT_ALLOC_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
2384 3 : ldv_7_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
2385 : /* LDV {"action": "DEFAULT_ALLOC_10", "type": "CONDITION_END"} */
2386 :
2387 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2388 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2389 :
2390 : /* Jump to a subprocess 'call' initial state */
2391 1 : goto ldv_call_7;
2392 : /* End of the process */
2393 : return;
2394 1 :
2395 : /* Sbprocess call */
2396 : ldv_call_7:
2397 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2398 :
2399 4 : if (ldv_undef_int()) {
2400 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2401 3 : ldv_7_ldv_param_4_1_default = ldv_xmalloc_unknown_size(0);
2402 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
2403 :
2404 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback devnode from class."} */
2405 : /* LDV {"type": "CALLBACK", "call": "((& input_devnode))(ldv_7_container_struct_device_ptr, ldv_7_ldv_param_4_1_default);", "comment": "callback"} */
2406 2 : ldv_random_containerless_scenario_callback_7_4(ldv_7_callback_devnode, ldv_7_container_struct_device_ptr, ldv_7_ldv_param_4_1_default);
2407 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2408 :
2409 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2410 2 : ldv_free(ldv_7_ldv_param_4_1_default);
2411 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
2412 :
2413 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2414 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2415 :
2416 : /* Jump to a subprocess 'call' initial state */
2417 1 : goto ldv_call_7;
2418 : }
2419 : else {
2420 : /* LDV {"action": "DEFAULT_FREE_10", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
2421 2 : ldv_free(ldv_7_container_struct_device_ptr);
2422 : /* LDV {"action": "DEFAULT_FREE_10", "type": "CONDITION_END"} */
2423 :
2424 : /* LDV {"action": "DEFAULT_DEREGISTER_10", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_CLASS callbacks invocations scenario."} */
2425 : /* Skip a non-replicative signal receiving */
2426 : /* LDV {"action": "DEFAULT_DEREGISTER_10", "type": "RECEIVE_END"} */
2427 :
2428 : /* Exit function at a terminal state */
2429 1 : return;
2430 : }
2431 : /* End of the subprocess 'call' */
2432 : return;
2433 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_class)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_7"} */
2434 : }
2435 :
2436 : /* AUX_FUNC ldv_random_containerless_scenario_8 */
2437 : void ldv_random_containerless_scenario_8(void *arg0) {
2438 : /* LDV {"thread": 8, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_8"} */
2439 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2440 1 : ssize_t (*ldv_8_callback_show)(struct device *, struct device_attribute *, char *);
2441 1 : struct device_attribute *ldv_8_container_struct_device_attribute;
2442 1 : struct device *ldv_8_container_struct_device_ptr;
2443 1 : char *ldv_8_ldv_param_4_2_default;
2444 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2445 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2446 3 : ldv_free(arg0);
2447 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
2448 :
2449 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
2450 3 : ldv_8_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
2451 3 : ldv_8_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
2452 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
2453 :
2454 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2455 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2456 :
2457 : /* Jump to a subprocess 'call' initial state */
2458 1 : goto ldv_call_8;
2459 : /* End of the process */
2460 : return;
2461 1 :
2462 : /* Sbprocess call */
2463 : ldv_call_8:
2464 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2465 :
2466 4 : if (ldv_undef_int()) {
2467 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2468 3 : ldv_8_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
2469 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
2470 :
2471 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
2472 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_cap_abs))(ldv_8_container_struct_device_ptr, ldv_8_container_struct_device_attribute, ldv_8_ldv_param_4_2_default);", "comment": "callback"} */
2473 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);
2474 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2475 :
2476 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2477 2 : ldv_free(ldv_8_ldv_param_4_2_default);
2478 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
2479 :
2480 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2481 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2482 :
2483 : /* Jump to a subprocess 'call' initial state */
2484 1 : goto ldv_call_8;
2485 : }
2486 : else {
2487 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
2488 2 : ldv_free(ldv_8_container_struct_device_attribute);
2489 2 : ldv_free(ldv_8_container_struct_device_ptr);
2490 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
2491 :
2492 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2493 : /* Skip a non-replicative signal receiving */
2494 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
2495 :
2496 : /* Exit function at a terminal state */
2497 1 : return;
2498 : }
2499 : /* End of the subprocess 'call' */
2500 : return;
2501 : /* 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"} */
2502 : }
2503 :
2504 : /* AUX_FUNC ldv_random_containerless_scenario_9 */
2505 : void ldv_random_containerless_scenario_9(void *arg0) {
2506 : /* LDV {"thread": 9, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_device_attribute)'", "function": "ldv_random_containerless_scenario_9"} */
2507 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2508 1 : ssize_t (*ldv_9_callback_show)(struct device *, struct device_attribute *, char *);
2509 1 : struct device_attribute *ldv_9_container_struct_device_attribute;
2510 1 : struct device *ldv_9_container_struct_device_ptr;
2511 1 : char *ldv_9_ldv_param_4_2_default;
2512 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2513 1 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2514 3 : ldv_free(arg0);
2515 : /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
2516 :
2517 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
2518 3 : ldv_9_container_struct_device_attribute = ldv_xmalloc_unknown_size(0);
2519 3 : ldv_9_container_struct_device_ptr = ldv_xmalloc_unknown_size(0);
2520 : /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
2521 :
2522 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2523 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2524 :
2525 : /* Jump to a subprocess 'call' initial state */
2526 1 : goto ldv_call_9;
2527 : /* End of the process */
2528 : return;
2529 1 :
2530 : /* Sbprocess call */
2531 : ldv_call_9:
2532 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2533 :
2534 4 : if (ldv_undef_int()) {
2535 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2536 3 : ldv_9_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
2537 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
2538 :
2539 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
2540 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_show_id_bustype))(ldv_9_container_struct_device_ptr, ldv_9_container_struct_device_attribute, ldv_9_ldv_param_4_2_default);", "comment": "callback"} */
2541 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);
2542 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2543 :
2544 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2545 2 : ldv_free(ldv_9_ldv_param_4_2_default);
2546 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
2547 :
2548 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
2549 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2550 :
2551 : /* Jump to a subprocess 'call' initial state */
2552 1 : goto ldv_call_9;
2553 : }
2554 : else {
2555 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
2556 2 : ldv_free(ldv_9_container_struct_device_attribute);
2557 2 : ldv_free(ldv_9_container_struct_device_ptr);
2558 : /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
2559 :
2560 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_DEVICE_ATTRIBUTE callbacks invocations scenario."} */
2561 : /* Skip a non-replicative signal receiving */
2562 : /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
2563 :
2564 : /* Exit function at a terminal state */
2565 1 : return;
2566 : }
2567 : /* End of the subprocess 'call' */
2568 : return;
2569 : /* 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"} */
2570 : }
2571 :
2572 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_10_4 */
2573 : void ldv_random_containerless_scenario_callback_10_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2574 2 : ((& input_dev_show_cap_ev))(arg1, arg2, arg3);
2575 1 : }
2576 :
2577 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_11_4 */
2578 : void ldv_random_containerless_scenario_callback_11_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2579 2 : ((& input_dev_show_cap_ff))(arg1, arg2, arg3);
2580 1 : }
2581 :
2582 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_12_4 */
2583 : void ldv_random_containerless_scenario_callback_12_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2584 2 : ((& input_dev_show_cap_key))(arg1, arg2, arg3);
2585 1 : }
2586 :
2587 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_13_4 */
2588 : void ldv_random_containerless_scenario_callback_13_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2589 2 : ((& input_dev_show_cap_led))(arg1, arg2, arg3);
2590 1 : }
2591 :
2592 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_14_4 */
2593 : void ldv_random_containerless_scenario_callback_14_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2594 2 : ((& input_dev_show_modalias))(arg1, arg2, arg3);
2595 1 : }
2596 :
2597 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_15_4 */
2598 : void ldv_random_containerless_scenario_callback_15_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2599 2 : ((& input_dev_show_cap_msc))(arg1, arg2, arg3);
2600 1 : }
2601 :
2602 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_16_4 */
2603 : void ldv_random_containerless_scenario_callback_16_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2604 2 : ((& input_dev_show_name))(arg1, arg2, arg3);
2605 1 : }
2606 :
2607 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_17_4 */
2608 : void ldv_random_containerless_scenario_callback_17_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2609 2 : ((& input_dev_show_phys))(arg1, arg2, arg3);
2610 1 : }
2611 :
2612 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_18_4 */
2613 : void ldv_random_containerless_scenario_callback_18_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2614 2 : ((& input_dev_show_id_product))(arg1, arg2, arg3);
2615 1 : }
2616 :
2617 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_19_4 */
2618 : void ldv_random_containerless_scenario_callback_19_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2619 2 : ((& input_dev_show_cap_rel))(arg1, arg2, arg3);
2620 1 : }
2621 :
2622 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_20_4 */
2623 : void ldv_random_containerless_scenario_callback_20_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2624 2 : ((& input_dev_show_cap_snd))(arg1, arg2, arg3);
2625 1 : }
2626 :
2627 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_21_4 */
2628 : void ldv_random_containerless_scenario_callback_21_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2629 2 : ((& input_dev_show_cap_sw))(arg1, arg2, arg3);
2630 1 : }
2631 :
2632 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_22_4 */
2633 : void ldv_random_containerless_scenario_callback_22_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2634 2 : ((& input_dev_show_uniq))(arg1, arg2, arg3);
2635 1 : }
2636 :
2637 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_23_4 */
2638 : void ldv_random_containerless_scenario_callback_23_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2639 2 : ((& input_dev_show_id_vendor))(arg1, arg2, arg3);
2640 1 : }
2641 :
2642 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_24_4 */
2643 : void ldv_random_containerless_scenario_callback_24_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2644 2 : ((& input_dev_show_id_version))(arg1, arg2, arg3);
2645 1 : }
2646 :
2647 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_7_4 */
2648 : void ldv_random_containerless_scenario_callback_7_4(char *(*arg0)(struct device *, mode_t *), struct device *arg1, unsigned int *arg2) {
2649 2 : ((& input_devnode))(arg1, arg2);
2650 1 : }
2651 :
2652 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_8_4 */
2653 : void ldv_random_containerless_scenario_callback_8_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2654 2 : ((& input_dev_show_cap_abs))(arg1, arg2, arg3);
2655 1 : }
2656 :
2657 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_9_4 */
2658 : void ldv_random_containerless_scenario_callback_9_4(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2659 2 : ((& input_dev_show_id_bustype))(arg1, arg2, arg3);
2660 1 : }
2661 :
2662 : /* AUX_FUNC ldv_rtc_class_scenario_4 */
2663 : void ldv_rtc_class_scenario_4(void *arg0) {
2664 : /* LDV {"thread": 4, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'rtc_class_scenario(rtc)'", "function": "ldv_rtc_class_scenario_4"} */
2665 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2666 1 : int (*ldv_4_callback_uevent)(struct device *, struct kobj_uevent_env *);
2667 1 : struct device *ldv_4_device_device;
2668 1 : struct kobj_uevent_env *ldv_4_device_struct_kobj_uevent_env_ptr;
2669 1 : int ldv_4_ret_default;
2670 1 : struct rtc_class_ops *ldv_4_rtc_class_ops_rtc_class_ops;
2671 1 : struct rtc_device *ldv_4_rtc_device_rtc_device;
2672 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2673 1 : /* Initialize automaton variables */
2674 2 : ldv_4_ret_default = 1;
2675 1 : /* LDV {"action": "DEFAULT_REGISTER_8", "type": "RECEIVE_BEGIN", "comment": "Begin RTC callbacks invocations scenario."} */
2676 3 : ldv_free(arg0);
2677 1 : /* LDV {"action": "DEFAULT_REGISTER_8", "type": "RECEIVE_END"} */
2678 :
2679 : /* LDV {"action": "DEFAULT_ALLOC_8", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
2680 3 : ldv_4_rtc_device_rtc_device = ldv_xmalloc_unknown_size(0);
2681 3 : ldv_4_rtc_class_ops_rtc_class_ops = ldv_xmalloc_unknown_size(0);
2682 3 : ldv_4_device_device = ldv_xmalloc_unknown_size(0);
2683 3 : ldv_4_device_struct_kobj_uevent_env_ptr = ldv_xmalloc_unknown_size(0);
2684 : /* LDV {"action": "DEFAULT_ALLOC_8", "type": "CONDITION_END"} */
2685 :
2686 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "The RTC device is inserted in the system."} */
2687 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
2688 :
2689 : /* Jump to a subprocess 'main' initial state */
2690 1 : goto ldv_main_4;
2691 : /* End of the process */
2692 : return;
2693 1 :
2694 : /* Sbprocess main */
2695 : ldv_main_4:
2696 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2697 :
2698 4 : if (ldv_undef_int()) {
2699 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Probe a new RTC device. Invoke callback probe from RTC."} */
2700 : /* Callback pre-call */
2701 1 : ldv_pre_probe();
2702 3 : if (ldv_4_rtc_class_ops_rtc_class_ops->open) {
2703 : /* LDV {"type": "CALLBACK", "call": "ldv_4_ret_default = (ldv_4_rtc_class_ops_rtc_class_ops->open)(ldv_4_device_device);", "comment": "probe"} */
2704 2 : ldv_4_ret_default = ldv_rtc_class_scenario_probe_4_11(ldv_4_rtc_class_ops_rtc_class_ops->open, ldv_4_device_device);
2705 : }
2706 : /* Callback post-call */
2707 4 : ldv_4_ret_default = ldv_post_probe(ldv_4_ret_default);
2708 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
2709 :
2710 4 : if (ldv_undef_int()) {
2711 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_BEGIN", "comment": "The RTC device has been successfully probed."} */
2712 2 : ldv_assume(ldv_4_ret_default == 0);
2713 : /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_END"} */
2714 :
2715 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "The RTC device is probed."} */
2716 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2717 :
2718 : /* Jump to a subprocess 'call' initial state */
2719 1 : goto ldv_call_4;
2720 : }
2721 : else {
2722 : /* LDV {"action": "PROBE_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to probe the RTC device."} */
2723 2 : ldv_assume(ldv_4_ret_default != 0);
2724 : /* LDV {"action": "PROBE_FAILED", "type": "CONDITION_END"} */
2725 :
2726 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "The RTC device is inserted in the system."} */
2727 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
2728 :
2729 : /* Jump to a subprocess 'main' initial state */
2730 1 : goto ldv_main_4;
2731 : }
2732 : }
2733 : else {
2734 : /* LDV {"action": "DEFAULT_FREE_8", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
2735 2 : ldv_free(ldv_4_rtc_device_rtc_device);
2736 : /* LDV {"action": "DEFAULT_FREE_8", "type": "CONDITION_END"} */
2737 :
2738 : /* LDV {"action": "DEFAULT_DEREGISTER_8", "type": "RECEIVE_BEGIN", "comment": "Finish RTC callbacks invocations scenario."} */
2739 : /* Skip a non-replicative signal receiving */
2740 : /* LDV {"action": "DEFAULT_DEREGISTER_8", "type": "RECEIVE_END"} */
2741 :
2742 : /* Exit function at a terminal state */
2743 1 : return;
2744 : }
2745 : /* End of the subprocess 'main' */
2746 : return;
2747 1 :
2748 : /* Sbprocess call */
2749 : ldv_call_4:
2750 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2751 :
2752 4 : if (ldv_undef_int()) {
2753 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback uevent from device_type."} */
2754 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_uevent))(ldv_4_device_device, ldv_4_device_struct_kobj_uevent_env_ptr);", "comment": "callback"} */
2755 2 : ldv_rtc_class_scenario_callback_4_4(ldv_4_callback_uevent, ldv_4_device_device, ldv_4_device_struct_kobj_uevent_env_ptr);
2756 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2757 :
2758 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "The RTC device is probed."} */
2759 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2760 :
2761 : /* Jump to a subprocess 'call' initial state */
2762 1 : goto ldv_call_4;
2763 : }
2764 : else {
2765 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback release from rtc_class_ops."} */
2766 : /* LDV {"type": "CALLBACK", "call": "((& input_dev_release))(ldv_4_device_device);", "comment": "release"} */
2767 2 : ldv_rtc_class_scenario_release_4_2(ldv_4_rtc_class_ops_rtc_class_ops->release, ldv_4_device_device);
2768 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
2769 :
2770 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "The RTC device is inserted in the system."} */
2771 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
2772 :
2773 : /* Jump to a subprocess 'main' initial state */
2774 1 : goto ldv_main_4;
2775 : }
2776 : /* End of the subprocess 'call' */
2777 : return;
2778 : /* LDV {"comment": "End of control function based on process 'rtc_class_scenario(rtc)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_rtc_class_scenario_4"} */
2779 : }
2780 :
2781 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_callback_4_4 */
2782 : void ldv_rtc_class_scenario_callback_4_4(int (*arg0)(struct device *, struct kobj_uevent_env *), struct device *arg1, struct kobj_uevent_env *arg2) {
2783 15 : ((& input_dev_uevent))(arg1, arg2);
2784 1 : }
2785 :
2786 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_4_11 */
2787 : int ldv_rtc_class_scenario_probe_4_11(int (*arg0)(struct device *), struct device *arg1) {
2788 2 : return (*arg0)(arg1);
2789 1 : }
2790 :
2791 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_4_2 */
2792 : void ldv_rtc_class_scenario_release_4_2(void (*arg0)(struct device *), struct device *arg1) {
2793 2 : ((& input_dev_release))(arg1);
2794 1 : }
2795 :
2796 : /* AUX_FUNC ldv_timer_scenario_25 */
2797 : void ldv_timer_scenario_25(void *arg0) {
2798 : /* LDV {"thread": 25, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'timer_scenario(timer)'", "function": "ldv_timer_scenario_25"} */
2799 0 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2800 0 : struct timer_list *ldv_25_container_timer_list;
2801 : /* Received labels */
2802 0 : struct ldv_struct_timer_scenario_25 *data = (struct ldv_struct_timer_scenario_25*) arg0;
2803 :
2804 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2805 : /* LDV {"action": "INSTANCE_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin TIMER callbacks invocations scenario."} */
2806 : /* Assign recieved labels */
2807 0 : if (data) {
2808 0 : ldv_25_container_timer_list = data->arg0;
2809 0 : ldv_free(data);
2810 : }
2811 : /* LDV {"action": "INSTANCE_REGISTER", "type": "RECEIVE_END"} */
2812 :
2813 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Time has come: call the timer callback. Invoke callback callback from TIMER."} */
2814 : /* Callback pre-call */
2815 0 : ldv_switch_to_interrupt_context();
2816 0 : if (ldv_25_container_timer_list->function) {
2817 : /* LDV {"type": "CALLBACK", "call": "(ldv_25_container_timer_list->function)(ldv_25_container_timer_list->data);", "comment": "callback"} */
2818 0 : ldv_timer_scenario_callback_25_2(ldv_25_container_timer_list->function, ldv_25_container_timer_list->data);
2819 : }
2820 : /* Callback post-call */
2821 0 : ldv_switch_to_process_context();
2822 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2823 :
2824 : /* LDV {"action": "INSTANCE_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish TIMER callbacks invocations scenario."} */
2825 : /* Skip a non-replicative signal receiving */
2826 : /* LDV {"action": "INSTANCE_DEREGISTER", "type": "RECEIVE_END"} */
2827 :
2828 : /* Exit function at a terminal state */
2829 0 : return;
2830 : /* End of the process */
2831 : return;
2832 : /* LDV {"comment": "End of control function based on process 'timer_scenario(timer)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_timer_scenario_25"} */
2833 : }
2834 :
2835 : /* AUX_FUNC_CALLBACK ldv_timer_scenario_callback_25_2 */
2836 : void ldv_timer_scenario_callback_25_2(void (*arg0)(unsigned long), unsigned long arg1) {
2837 0 : (*arg0)(arg1);
2838 0 : }
2839 :
2840 : /* AUX_FUNC ldv_traverse_kernel_items_scenario_5 */
2841 : void ldv_traverse_kernel_items_scenario_5(void *arg0) {
2842 : /* LDV {"thread": 5, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'traverse_kernel_items_scenario(seq_operations)'", "function": "ldv_traverse_kernel_items_scenario_5"} */
2843 2 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2844 2 : long long int *ldv_5_ldv_param_13_1_default;
2845 2 : void *ldv_5_ldv_param_2_1_default;
2846 2 : void *ldv_5_ldv_param_6_1_default;
2847 2 : void *ldv_5_ldv_param_7_1_default;
2848 2 : long long int *ldv_5_ldv_param_7_2_default;
2849 2 : struct seq_operations *ldv_5_ops_seq_operations;
2850 2 : void *ldv_5_ret_default;
2851 2 : struct seq_file *ldv_5_seq_file_seq_file;
2852 2 : /* Received labels */
2853 4 : struct ldv_struct_traverse_kernel_items_scenario_5 *data = (struct ldv_struct_traverse_kernel_items_scenario_5*) arg0;
2854 2 :
2855 2 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2856 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin SEQ_OPERATIONS callbacks invocations scenario."} */
2857 : /* Assign recieved labels */
2858 4 : if (data) {
2859 2 : ldv_5_seq_file_seq_file = data->arg0;
2860 2 : ldv_5_ops_seq_operations = data->arg1;
2861 4 : ldv_free(data);
2862 : }
2863 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
2864 :
2865 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Start sequence or do nothing."} */
2866 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_END"} */
2867 :
2868 : /* Jump to a subprocess 'start_step' initial state */
2869 4 : goto ldv_start_step_5;
2870 : /* End of the process */
2871 : return;
2872 2 :
2873 : /* Sbprocess start_step */
2874 : ldv_start_step_5:
2875 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2876 :
2877 : /* LDV {"action": "PRE_CALL_13", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2878 6 : ldv_5_ldv_param_13_1_default = ldv_xmalloc_unknown_size(0);
2879 : /* LDV {"action": "PRE_CALL_13", "type": "CONDITION_END"} */
2880 :
2881 : /* 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."} */
2882 : /* LDV {"type": "CALLBACK", "call": "ldv_5_ret_default = ((& input_devices_seq_start))(ldv_5_seq_file_seq_file, ldv_5_ldv_param_13_1_default);", "comment": "start"} */
2883 4 : ldv_5_ret_default = ldv_traverse_kernel_items_scenario_start_5_13(ldv_5_ops_seq_operations->start, ldv_5_seq_file_seq_file, ldv_5_ldv_param_13_1_default);
2884 : /* LDV {"action": "START", "type": "CALL_END"} */
2885 :
2886 : /* LDV {"action": "POST_CALL_13", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2887 4 : ldv_free(ldv_5_ldv_param_13_1_default);
2888 : /* LDV {"action": "POST_CALL_13", "type": "CONDITION_END"} */
2889 :
2890 8 : if (ldv_undef_int()) {
2891 : /* LDV {"action": "START_SUCCESS", "type": "CONDITION_BEGIN", "comment": "A new sequence is initialized successfully."} */
2892 4 : ldv_assume(ldv_5_ret_default != 0);
2893 : /* LDV {"action": "START_SUCCESS", "type": "CONDITION_END"} */
2894 :
2895 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Continue iteration over kernel items."} */
2896 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_END"} */
2897 :
2898 : /* Jump to a subprocess 'next_step' initial state */
2899 2 : goto ldv_next_step_5;
2900 : }
2901 : else {
2902 : /* LDV {"action": "START_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize a new sequence."} */
2903 4 : ldv_assume(ldv_5_ret_default == 0);
2904 : /* LDV {"action": "START_FAILED", "type": "CONDITION_END"} */
2905 :
2906 : /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
2907 4 : ldv_free(ldv_5_seq_file_seq_file);
2908 : /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_END"} */
2909 :
2910 : /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_BEGIN", "comment": "Finish SEQ_OPERATIONS callbacks invocations scenario."} */
2911 : /* Skip a non-replicative signal receiving */
2912 : /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_END"} */
2913 :
2914 : /* Exit function at a terminal state */
2915 2 : return;
2916 : }
2917 : /* End of the subprocess 'start_step' */
2918 : return;
2919 2 :
2920 : /* Sbprocess next_step */
2921 : ldv_next_step_5:
2922 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2923 :
2924 : /* LDV {"action": "PRE_CALL_7", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2925 4 : ldv_5_ldv_param_7_1_default = ldv_xmalloc_unknown_size(0);
2926 6 : ldv_5_ldv_param_7_2_default = ldv_xmalloc_unknown_size(0);
2927 : /* LDV {"action": "PRE_CALL_7", "type": "CONDITION_END"} */
2928 :
2929 : /* LDV {"action": "NEXT", "type": "CALL_BEGIN", "callback": true, "comment": "Advance to the new item. Invoke callback next from seq_operations."} */
2930 : /* LDV {"type": "CALLBACK", "call": "ldv_5_ret_default = ((& input_devices_seq_next))(ldv_5_seq_file_seq_file, ldv_5_ldv_param_7_1_default, ldv_5_ldv_param_7_2_default);", "comment": "next"} */
2931 4 : ldv_5_ret_default = ldv_traverse_kernel_items_scenario_next_5_7(ldv_5_ops_seq_operations->next, ldv_5_seq_file_seq_file, ldv_5_ldv_param_7_1_default, ldv_5_ldv_param_7_2_default);
2932 : /* LDV {"action": "NEXT", "type": "CALL_END"} */
2933 :
2934 : /* LDV {"action": "POST_CALL_7", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2935 4 : ldv_free(ldv_5_ldv_param_7_1_default);
2936 4 : ldv_free(ldv_5_ldv_param_7_2_default);
2937 : /* LDV {"action": "POST_CALL_7", "type": "CONDITION_END"} */
2938 :
2939 : /* LDV {"action": "PRE_CALL_6", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2940 4 : ldv_5_ldv_param_6_1_default = ldv_xmalloc_unknown_size(0);
2941 : /* LDV {"action": "PRE_CALL_6", "type": "CONDITION_END"} */
2942 :
2943 : /* 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."} */
2944 : /* LDV {"type": "CALLBACK", "call": "((& input_devices_seq_show))(ldv_5_seq_file_seq_file, ldv_5_ldv_param_6_1_default);", "comment": "show"} */
2945 4 : ldv_traverse_kernel_items_scenario_show_5_6(ldv_5_ops_seq_operations->show, ldv_5_seq_file_seq_file, ldv_5_ldv_param_6_1_default);
2946 : /* LDV {"action": "SHOW", "type": "CALL_END"} */
2947 :
2948 : /* LDV {"action": "POST_CALL_6", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2949 4 : ldv_free(ldv_5_ldv_param_6_1_default);
2950 : /* LDV {"action": "POST_CALL_6", "type": "CONDITION_END"} */
2951 :
2952 8 : if (ldv_undef_int()) {
2953 : /* LDV {"action": "NEXT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "More items to show are left."} */
2954 4 : ldv_assume(ldv_5_ret_default != 0);
2955 : /* LDV {"action": "NEXT_SUCCESS", "type": "CONDITION_END"} */
2956 :
2957 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Continue iteration over kernel items."} */
2958 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_END"} */
2959 :
2960 : /* Jump to a subprocess 'next_step' initial state */
2961 2 : goto ldv_next_step_5;
2962 : }
2963 : else {
2964 : /* LDV {"action": "NEXT_FAIL", "type": "CONDITION_BEGIN", "comment": "The last kernel item is reached."} */
2965 4 : ldv_assume(ldv_5_ret_default == 0);
2966 : /* LDV {"action": "NEXT_FAIL", "type": "CONDITION_END"} */
2967 :
2968 : /* LDV {"action": "PRE_CALL_2", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2969 4 : ldv_5_ldv_param_2_1_default = ldv_xmalloc_unknown_size(0);
2970 : /* LDV {"action": "PRE_CALL_2", "type": "CONDITION_END"} */
2971 :
2972 : /* LDV {"action": "STOP", "type": "CALL_BEGIN", "callback": true, "comment": "End of the sequence is reached, do necessary cleanup. Invoke callback stop from seq_operations."} */
2973 : /* LDV {"type": "CALLBACK", "call": "((& input_seq_stop))(ldv_5_seq_file_seq_file, ldv_5_ldv_param_2_1_default);", "comment": "stop"} */
2974 4 : ldv_traverse_kernel_items_scenario_stop_5_2(ldv_5_ops_seq_operations->stop, ldv_5_seq_file_seq_file, ldv_5_ldv_param_2_1_default);
2975 : /* LDV {"action": "STOP", "type": "CALL_END"} */
2976 :
2977 : /* LDV {"action": "POST_CALL_2", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2978 4 : ldv_free(ldv_5_ldv_param_2_1_default);
2979 : /* LDV {"action": "POST_CALL_2", "type": "CONDITION_END"} */
2980 :
2981 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Start sequence or do nothing."} */
2982 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_END"} */
2983 :
2984 : /* Jump to a subprocess 'start_step' initial state */
2985 2 : goto ldv_start_step_5;
2986 : }
2987 : /* End of the subprocess 'next_step' */
2988 : return;
2989 : /* 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_5"} */
2990 : }
2991 :
2992 : /* AUX_FUNC ldv_traverse_kernel_items_scenario_6 */
2993 : void ldv_traverse_kernel_items_scenario_6(void *arg0) {
2994 : /* LDV {"thread": 6, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'traverse_kernel_items_scenario(seq_operations)'", "function": "ldv_traverse_kernel_items_scenario_6"} */
2995 2 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2996 2 : long long int *ldv_6_ldv_param_13_1_default;
2997 2 : void *ldv_6_ldv_param_2_1_default;
2998 2 : void *ldv_6_ldv_param_6_1_default;
2999 2 : void *ldv_6_ldv_param_7_1_default;
3000 2 : long long int *ldv_6_ldv_param_7_2_default;
3001 2 : struct seq_operations *ldv_6_ops_seq_operations;
3002 2 : void *ldv_6_ret_default;
3003 2 : struct seq_file *ldv_6_seq_file_seq_file;
3004 2 : /* Received labels */
3005 4 : struct ldv_struct_traverse_kernel_items_scenario_5 *data = (struct ldv_struct_traverse_kernel_items_scenario_5*) arg0;
3006 2 :
3007 2 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
3008 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin SEQ_OPERATIONS callbacks invocations scenario."} */
3009 : /* Assign recieved labels */
3010 4 : if (data) {
3011 2 : ldv_6_seq_file_seq_file = data->arg0;
3012 2 : ldv_6_ops_seq_operations = data->arg1;
3013 4 : ldv_free(data);
3014 : }
3015 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
3016 :
3017 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Start sequence or do nothing."} */
3018 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_END"} */
3019 :
3020 : /* Jump to a subprocess 'start_step' initial state */
3021 4 : goto ldv_start_step_6;
3022 : /* End of the process */
3023 : return;
3024 2 :
3025 : /* Sbprocess start_step */
3026 : ldv_start_step_6:
3027 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
3028 :
3029 : /* LDV {"action": "PRE_CALL_13", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
3030 6 : ldv_6_ldv_param_13_1_default = ldv_xmalloc_unknown_size(0);
3031 : /* LDV {"action": "PRE_CALL_13", "type": "CONDITION_END"} */
3032 :
3033 : /* 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."} */
3034 : /* LDV {"type": "CALLBACK", "call": "ldv_6_ret_default = ((& input_handlers_seq_start))(ldv_6_seq_file_seq_file, ldv_6_ldv_param_13_1_default);", "comment": "start"} */
3035 4 : ldv_6_ret_default = ldv_traverse_kernel_items_scenario_start_6_13(ldv_6_ops_seq_operations->start, ldv_6_seq_file_seq_file, ldv_6_ldv_param_13_1_default);
3036 : /* LDV {"action": "START", "type": "CALL_END"} */
3037 :
3038 : /* LDV {"action": "POST_CALL_13", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
3039 4 : ldv_free(ldv_6_ldv_param_13_1_default);
3040 : /* LDV {"action": "POST_CALL_13", "type": "CONDITION_END"} */
3041 :
3042 8 : if (ldv_undef_int()) {
3043 : /* LDV {"action": "START_SUCCESS", "type": "CONDITION_BEGIN", "comment": "A new sequence is initialized successfully."} */
3044 4 : ldv_assume(ldv_6_ret_default != 0);
3045 : /* LDV {"action": "START_SUCCESS", "type": "CONDITION_END"} */
3046 :
3047 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Continue iteration over kernel items."} */
3048 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_END"} */
3049 :
3050 : /* Jump to a subprocess 'next_step' initial state */
3051 2 : goto ldv_next_step_6;
3052 : }
3053 : else {
3054 : /* LDV {"action": "START_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize a new sequence."} */
3055 4 : ldv_assume(ldv_6_ret_default == 0);
3056 : /* LDV {"action": "START_FAILED", "type": "CONDITION_END"} */
3057 :
3058 : /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
3059 4 : ldv_free(ldv_6_seq_file_seq_file);
3060 : /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_END"} */
3061 :
3062 : /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_BEGIN", "comment": "Finish SEQ_OPERATIONS callbacks invocations scenario."} */
3063 : /* Skip a non-replicative signal receiving */
3064 : /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_END"} */
3065 :
3066 : /* Exit function at a terminal state */
3067 2 : return;
3068 : }
3069 : /* End of the subprocess 'start_step' */
3070 : return;
3071 2 :
3072 : /* Sbprocess next_step */
3073 : ldv_next_step_6:
3074 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
3075 :
3076 : /* LDV {"action": "PRE_CALL_7", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
3077 4 : ldv_6_ldv_param_7_1_default = ldv_xmalloc_unknown_size(0);
3078 6 : ldv_6_ldv_param_7_2_default = ldv_xmalloc_unknown_size(0);
3079 : /* LDV {"action": "PRE_CALL_7", "type": "CONDITION_END"} */
3080 :
3081 : /* LDV {"action": "NEXT", "type": "CALL_BEGIN", "callback": true, "comment": "Advance to the new item. Invoke callback next from seq_operations."} */
3082 : /* LDV {"type": "CALLBACK", "call": "ldv_6_ret_default = ((& input_handlers_seq_next))(ldv_6_seq_file_seq_file, ldv_6_ldv_param_7_1_default, ldv_6_ldv_param_7_2_default);", "comment": "next"} */
3083 4 : ldv_6_ret_default = ldv_traverse_kernel_items_scenario_next_6_7(ldv_6_ops_seq_operations->next, ldv_6_seq_file_seq_file, ldv_6_ldv_param_7_1_default, ldv_6_ldv_param_7_2_default);
3084 : /* LDV {"action": "NEXT", "type": "CALL_END"} */
3085 :
3086 : /* LDV {"action": "POST_CALL_7", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
3087 4 : ldv_free(ldv_6_ldv_param_7_1_default);
3088 4 : ldv_free(ldv_6_ldv_param_7_2_default);
3089 : /* LDV {"action": "POST_CALL_7", "type": "CONDITION_END"} */
3090 :
3091 : /* LDV {"action": "PRE_CALL_6", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
3092 4 : ldv_6_ldv_param_6_1_default = ldv_xmalloc_unknown_size(0);
3093 : /* LDV {"action": "PRE_CALL_6", "type": "CONDITION_END"} */
3094 :
3095 : /* 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."} */
3096 : /* LDV {"type": "CALLBACK", "call": "((& input_handlers_seq_show))(ldv_6_seq_file_seq_file, ldv_6_ldv_param_6_1_default);", "comment": "show"} */
3097 4 : ldv_traverse_kernel_items_scenario_show_6_6(ldv_6_ops_seq_operations->show, ldv_6_seq_file_seq_file, ldv_6_ldv_param_6_1_default);
3098 : /* LDV {"action": "SHOW", "type": "CALL_END"} */
3099 :
3100 : /* LDV {"action": "POST_CALL_6", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
3101 4 : ldv_free(ldv_6_ldv_param_6_1_default);
3102 : /* LDV {"action": "POST_CALL_6", "type": "CONDITION_END"} */
3103 :
3104 8 : if (ldv_undef_int()) {
3105 : /* LDV {"action": "NEXT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "More items to show are left."} */
3106 4 : ldv_assume(ldv_6_ret_default != 0);
3107 : /* LDV {"action": "NEXT_SUCCESS", "type": "CONDITION_END"} */
3108 :
3109 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Continue iteration over kernel items."} */
3110 : /* LDV {"action": "NEXT_STEP", "type": "SUBPROCESS_END"} */
3111 :
3112 : /* Jump to a subprocess 'next_step' initial state */
3113 2 : goto ldv_next_step_6;
3114 : }
3115 : else {
3116 : /* LDV {"action": "NEXT_FAIL", "type": "CONDITION_BEGIN", "comment": "The last kernel item is reached."} */
3117 4 : ldv_assume(ldv_6_ret_default == 0);
3118 : /* LDV {"action": "NEXT_FAIL", "type": "CONDITION_END"} */
3119 :
3120 : /* LDV {"action": "PRE_CALL_2", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
3121 4 : ldv_6_ldv_param_2_1_default = ldv_xmalloc_unknown_size(0);
3122 : /* LDV {"action": "PRE_CALL_2", "type": "CONDITION_END"} */
3123 :
3124 : /* LDV {"action": "STOP", "type": "CALL_BEGIN", "callback": true, "comment": "End of the sequence is reached, do necessary cleanup. Invoke callback stop from seq_operations."} */
3125 : /* LDV {"type": "CALLBACK", "call": "((& input_seq_stop))(ldv_6_seq_file_seq_file, ldv_6_ldv_param_2_1_default);", "comment": "stop"} */
3126 4 : ldv_traverse_kernel_items_scenario_stop_6_2(ldv_6_ops_seq_operations->stop, ldv_6_seq_file_seq_file, ldv_6_ldv_param_2_1_default);
3127 : /* LDV {"action": "STOP", "type": "CALL_END"} */
3128 :
3129 : /* LDV {"action": "POST_CALL_2", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
3130 4 : ldv_free(ldv_6_ldv_param_2_1_default);
3131 : /* LDV {"action": "POST_CALL_2", "type": "CONDITION_END"} */
3132 :
3133 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_BEGIN", "comment": "Start sequence or do nothing."} */
3134 : /* LDV {"action": "START_STEP", "type": "SUBPROCESS_END"} */
3135 :
3136 : /* Jump to a subprocess 'start_step' initial state */
3137 2 : goto ldv_start_step_6;
3138 : }
3139 : /* End of the subprocess 'next_step' */
3140 : return;
3141 : /* 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_6"} */
3142 : }
3143 :
3144 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_next_5_7 */
3145 : void * ldv_traverse_kernel_items_scenario_next_5_7(void *(*arg0)(struct seq_file *, void *, loff_t *), struct seq_file *arg1, void *arg2, long long int *arg3) {
3146 6 : return ((& input_devices_seq_next))(arg1, arg2, arg3);
3147 : }
3148 :
3149 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_next_6_7 */
3150 2 : void * ldv_traverse_kernel_items_scenario_next_6_7(void *(*arg0)(struct seq_file *, void *, loff_t *), struct seq_file *arg1, void *arg2, long long int *arg3) {
3151 6 : return ((& input_handlers_seq_next))(arg1, arg2, arg3);
3152 : }
3153 :
3154 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_show_5_6 */
3155 2 : void ldv_traverse_kernel_items_scenario_show_5_6(int (*arg0)(struct seq_file *, void *), struct seq_file *arg1, void *arg2) {
3156 6 : ((& input_devices_seq_show))(arg1, arg2);
3157 2 : }
3158 :
3159 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_show_6_6 */
3160 : void ldv_traverse_kernel_items_scenario_show_6_6(int (*arg0)(struct seq_file *, void *), struct seq_file *arg1, void *arg2) {
3161 4 : ((& input_handlers_seq_show))(arg1, arg2);
3162 2 : }
3163 :
3164 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_start_5_13 */
3165 : void * ldv_traverse_kernel_items_scenario_start_5_13(void *(*arg0)(struct seq_file *, loff_t *), struct seq_file *arg1, long long int *arg2) {
3166 8 : return ((& input_devices_seq_start))(arg1, arg2);
3167 : }
3168 :
3169 2 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_start_6_13 */
3170 : void * ldv_traverse_kernel_items_scenario_start_6_13(void *(*arg0)(struct seq_file *, loff_t *), struct seq_file *arg1, long long int *arg2) {
3171 8 : return ((& input_handlers_seq_start))(arg1, arg2);
3172 : }
3173 :
3174 2 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_stop_5_2 */
3175 : void ldv_traverse_kernel_items_scenario_stop_5_2(void (*arg0)(struct seq_file *, void *), struct seq_file *arg1, void *arg2) {
3176 4 : ((& input_seq_stop))(arg1, arg2);
3177 2 : }
3178 :
3179 : /* AUX_FUNC_CALLBACK ldv_traverse_kernel_items_scenario_stop_6_2 */
3180 : void ldv_traverse_kernel_items_scenario_stop_6_2(void (*arg0)(struct seq_file *, void *), struct seq_file *arg1, void *arg2) {
3181 4 : ((& input_seq_stop))(arg1, arg2);
3182 2 : }
3183 :
3184 : /* AUX_FUNC main */
3185 : int main() {
3186 1 : ldv_main_33(0);
3187 0 : return 0;
3188 : }
3189 :
3190 :
3191 : /* AUX_FUNC ERR_PTR */
3192 : static inline void *ERR_PTR (long int error)
3193 : {
3194 4 :
3195 12 : return ldv_err_ptr(error);
3196 : }
3197 :
3198 : /* AUX_FUNC PTR_ERR */
3199 : static inline long int PTR_ERR (void const *ptr)
3200 : {
3201 :
3202 : return ldv_ptr_err(ptr);
3203 : }
3204 :
3205 : /* AUX_FUNC IS_ERR */
3206 : static inline long int IS_ERR (void const *ptr)
3207 : {
3208 :
3209 : return ldv_is_err(ptr);
3210 : }
3211 :
3212 : /* AUX_FUNC IS_ERR_OR_NULL */
3213 : static inline long int IS_ERR_OR_NULL (void const *ptr)
3214 : {
3215 :
3216 : return ldv_is_err_or_null(ptr);
3217 : }
3218 :
3219 : /* AUX_FUNC ldv_del_timer_sync_5 */
3220 : int ldv_del_timer_sync_5 (struct timer_list *ldv_func_arg1)
3221 : {
3222 :
3223 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'del_timer_sync'"} */
3224 : return ldv_emg_del_timer_sync(ldv_func_arg1);
3225 : }
3226 :
3227 : /* AUX_FUNC ldv_del_timer_6 */
3228 : int ldv_del_timer_6 (struct timer_list *ldv_func_arg1)
3229 : {
3230 :
3231 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'del_timer'"} */
3232 : return ldv_emg_del_timer(ldv_func_arg1);
3233 : }
3234 :
3235 : /* AUX_FUNC kzalloc */
3236 : static inline void *kzalloc (size_t size, gfp_t flags)
3237 : {
3238 0 :
3239 0 : return ldv_kzalloc(size, flags);
3240 : }
3241 :
3242 : /* AUX_FUNC ldv_dev_get_drvdata_8 */
3243 : void *ldv_dev_get_drvdata_8 (struct device const *dev)
3244 : {
3245 :
3246 : return ldv_dev_get_drvdata(dev);
3247 : }
3248 :
3249 : /* AUX_FUNC ldv_mod_timer_9 */
3250 : int ldv_mod_timer_9 (struct timer_list *ldv_func_arg1, long unsigned int ldv_func_arg2)
3251 : {
3252 0 :
3253 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'mod_timer'"} */
3254 0 : return ldv_emg_mod_timer(ldv_func_arg1, ldv_func_arg2);
3255 : }
3256 :
3257 : /* AUX_FUNC ldv_mod_timer_10 */
3258 : int ldv_mod_timer_10 (struct timer_list *ldv_func_arg1, long unsigned int ldv_func_arg2)
3259 : {
3260 0 :
3261 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'mod_timer'"} */
3262 0 : return ldv_emg_mod_timer(ldv_func_arg1, ldv_func_arg2);
3263 : }
3264 :
3265 : /* AUX_FUNC ldv_del_timer_11 */
3266 : int ldv_del_timer_11 (struct timer_list *ldv_func_arg1)
3267 : {
3268 0 :
3269 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'del_timer'"} */
3270 0 : return ldv_emg_del_timer(ldv_func_arg1);
3271 : }
3272 :
3273 : /* AUX_FUNC ldv_seq_open_12 */
3274 : int ldv_seq_open_12 (struct file *ldv_func_arg1, struct seq_operations const *ldv_func_arg2)
3275 : {
3276 1 :
3277 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'seq_open'"} */
3278 3 : return ldv_emg_seq_open(ldv_func_arg1, ldv_func_arg2);
3279 : }
3280 :
3281 : /* AUX_FUNC ldv_seq_open_13 */
3282 : int ldv_seq_open_13 (struct file *ldv_func_arg1, struct seq_operations const *ldv_func_arg2)
3283 : {
3284 1 :
3285 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'seq_open'"} */
3286 3 : return ldv_emg_seq_open(ldv_func_arg1, ldv_func_arg2);
3287 : }
3288 :
3289 : /* AUX_FUNC ldv_del_timer_sync_14 */
3290 : int ldv_del_timer_sync_14 (struct timer_list *ldv_func_arg1)
3291 : {
3292 0 :
3293 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'del_timer_sync'"} */
3294 0 : return ldv_emg_del_timer_sync(ldv_func_arg1);
3295 : }
3296 :
3297 : /* AUX_FUNC ldv_register_chrdev_15 */
3298 : static inline int ldv_register_chrdev_15 (unsigned int major, char const *name, struct file_operations const *fops)
3299 : {
3300 :
3301 1 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'register_chrdev'"} */
3302 4 : return ldv_emg_register_chrdev(major, name, fops);
3303 : }
3304 :
3305 : /* AUX_FUNC ldv_unregister_chrdev_16 */
3306 : static inline void ldv_unregister_chrdev_16 (unsigned int major, char const *name)
3307 : {
3308 :
3309 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'unregister_chrdev'"} */
3310 4 : ldv_emg_unregister_chrdev(major, name);
3311 2 : }
|