Print this page
Test of DTrace assert probes

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/ip/keysock.c
          +++ new/usr/src/uts/common/inet/ip/keysock.c
↓ open down ↓ 560 lines elided ↑ open up ↑
 561  561  static int
 562  562  keysock_open(queue_t *q, dev_t *devp, int flag, int sflag, cred_t *credp)
 563  563  {
 564  564          keysock_t *ks;
 565  565          keysock_consumer_t *kc;
 566  566          mblk_t *mp;
 567  567          ipsec_info_t *ii;
 568  568          netstack_t *ns;
 569  569          keysock_stack_t *keystack;
 570  570  
      571 +#ifdef KEBE
      572 +        /*
      573 +         * Some test ASSERT()s that only work with the new dtrace-style assert.
      574 +         */
      575 +        ASSERT(q == NULL);      /* Will likely fail. (575) */
      576 +        ASSERT3P(q, ==, NULL); /* Same here. (576) */
      577 +#endif
      578 +
 571  579          if (secpolicy_ip_config(credp, B_FALSE) != 0) {
 572  580                  /* Privilege debugging will log the error */
 573  581                  return (EPERM);
 574  582          }
 575  583  
 576  584          if (q->q_ptr != NULL)
 577  585                  return (0);  /* Re-open of an already open instance. */
 578  586  
 579  587          ns = netstack_find_by_cred(credp);
 580  588          ASSERT(ns != NULL);
↓ open down ↓ 1806 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX