LCOV - code coverage report
Current view: top level - home/alexey/klever/native-scheduler-work-dir/native-scheduler-work-dir/scheduler/jobs/032ed983781f2acce615a4df71b22f31/klever-core-work-dir/929d281/linux-drivers-clk2/avtg/drivers/scsi/sr_mod.ko/linux:drivers:clk2/weaver - sr_ioctl.c.aux (source / functions) Hit Total Coverage
Test: coverage.info Lines: 29 29 100.0 %
Date: 2017-01-25 Functions: 3 3 100.0 %

          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/device.h>
      29             : 
      30             : 
      31             : struct ldv_struct_insmod_4 {
      32             :  int signal_pending;
      33             : };
      34             : 
      35             : struct ldv_struct_partially_ordered_scenario_1 {
      36             :  struct device_driver *arg0;
      37             :  int signal_pending;
      38             : };
      39             : 
      40             : /* EMG Function declarations */
      41             : void ldv_random_containerless_scenario_3(void *);
      42             : void ldv_random_containerless_scenario_callback_3_10(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
      43             : void ldv_random_containerless_scenario_callback_3_4(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
      44             : 
      45             : /* EMG variable declarations */
      46           1 : struct ldv_thread ldv_thread_3;
      47             : 
      48             : /* EMG variable initialization */
      49             : 
      50             : /* EMG function definitions */
      51             : /* AUX_FUNC ldv_random_containerless_scenario_3 */
      52             : void ldv_random_containerless_scenario_3(void *arg0) {
      53             :  /* LDV {"thread": 3, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_kernel_param)'", "function": "ldv_random_containerless_scenario_3"} */
      54           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
      55           1 :  int (*ldv_3_callback_get)(char *, struct kernel_param *);
      56           1 :  int (*ldv_3_callback_set)(char *, struct kernel_param *);
      57           1 :  struct kernel_param *ldv_3_container_struct_kernel_param;
      58           1 :  char *ldv_3_ldv_param_10_0_default;
      59           1 :  char *ldv_3_ldv_param_4_0_default;
      60           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
      61           1 :  /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
      62           3 :  ldv_free(arg0);
      63           1 :  /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
      64             : 
      65             :  /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
      66           3 :  ldv_3_container_struct_kernel_param = ldv_xmalloc_unknown_size(0);
      67             :  /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
      68             : 
      69             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
      70             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
      71             : 
      72             :  /* Jump to a subprocess 'call' initial state */
      73           1 :  goto ldv_call_3;
      74             :  /* End of the process */
      75             :  return;
      76           1 : 
      77             :  /* Sbprocess call */
      78             :  ldv_call_3:
      79             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
      80             : 
      81           4 :  if (ldv_undef_int()) {
      82             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
      83           3 :   ldv_3_ldv_param_4_0_default = ldv_xmalloc_unknown_size(0);
      84             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
      85             : 
      86           4 :   if (ldv_undef_int()) {
      87             :    /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
      88           3 :    ldv_3_ldv_param_10_0_default = ldv_xmalloc_unknown_size(0);
      89             :    /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
      90             : 
      91             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback set from kernel_param."} */
      92             :    /* LDV {"type": "CALLBACK", "call": "((& param_set_int))(ldv_3_ldv_param_10_0_default, ldv_3_container_struct_kernel_param);", "comment": "callback"} */
      93           2 :    ldv_random_containerless_scenario_callback_3_10(ldv_3_callback_set, ldv_3_ldv_param_10_0_default, ldv_3_container_struct_kernel_param);
      94             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
      95             : 
      96             :    /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
      97           2 :    ldv_free(ldv_3_ldv_param_10_0_default);
      98             :    /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
      99             : 
     100             :   }
     101             :   else {
     102             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback get from kernel_param."} */
     103             :    /* LDV {"type": "CALLBACK", "call": "((& param_get_int))(ldv_3_ldv_param_4_0_default, ldv_3_container_struct_kernel_param);", "comment": "callback"} */
     104           2 :    ldv_random_containerless_scenario_callback_3_4(ldv_3_callback_get, ldv_3_ldv_param_4_0_default, ldv_3_container_struct_kernel_param);
     105             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     106             : 
     107             :   }
     108             :   /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     109           4 :   ldv_free(ldv_3_ldv_param_4_0_default);
     110             :   /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
     111             : 
     112             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     113             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     114             : 
     115             :   /* Jump to a subprocess 'call' initial state */
     116           1 :   goto ldv_call_3;
     117             :  }
     118             :  else {
     119             :   /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
     120           2 :   ldv_free(ldv_3_container_struct_kernel_param);
     121             :   /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
     122             : 
     123             :   /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
     124             :   /* Skip a non-replicative signal receiving */
     125             :   /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
     126             : 
     127             :   /* Exit function at a terminal state */
     128           1 :   return;
     129             :  }
     130             :  /* End of the subprocess 'call' */
     131             :  return;
     132             :  /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_kernel_param)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_3"} */
     133             : }
     134             : 
     135             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_3_10 */
     136             : void ldv_random_containerless_scenario_callback_3_10(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
     137           1 :  ((& param_set_int))(arg1, arg2);
     138           1 : }
     139             : 
     140             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_3_4 */
     141             : void ldv_random_containerless_scenario_callback_3_4(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
     142           1 :  ((& param_get_int))(arg1, arg2);
     143           1 : }
     144             : 
     145             : 
     146             : /* AUX_FUNC  ERR_PTR */
     147             : static inline void *ERR_PTR (long int error)
     148             : {
     149             : 
     150             :  return ldv_err_ptr(error);
     151             : }
     152             : 
     153             : /* AUX_FUNC  PTR_ERR */
     154             : static inline long int PTR_ERR (void const *ptr)
     155             : {
     156             : 
     157             :  return ldv_ptr_err(ptr);
     158             : }
     159             : 
     160             : /* AUX_FUNC  IS_ERR */
     161             : static inline long int IS_ERR (void const *ptr)
     162             : {
     163             : 
     164             :  return ldv_is_err(ptr);
     165             : }
     166             : 
     167             : /* AUX_FUNC  IS_ERR_OR_NULL */
     168             : static inline long int IS_ERR_OR_NULL (void const *ptr)
     169             : {
     170             : 
     171             :  return ldv_is_err_or_null(ptr);
     172             : }
     173             : 
     174             : /* AUX_FUNC  kzalloc */
     175             : static inline void *kzalloc (size_t size, gfp_t flags)
     176             : {
     177             : 
     178             :  return ldv_kzalloc(size, flags);
     179             : }

Generated by: LCOV version 1.10