LCOV - code coverage report
Current view: top level - source3/torture - test_buffersize.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 0 17 0.0 %
Date: 2024-04-21 15:09:00 Functions: 0 1 0.0 %

          Line data    Source code
       1             : /*
       2             :    Unix SMB/CIFS implementation.
       3             :    Test buffer sizes in cli_qpathinfo
       4             :    Copyright (C) Volker Lendecke 2012
       5             : 
       6             :    This program is free software; you can redistribute it and/or modify
       7             :    it under the terms of the GNU General Public License as published by
       8             :    the Free Software Foundation; either version 3 of the License, or
       9             :    (at your option) any later version.
      10             : 
      11             :    This program is distributed in the hope that it will be useful,
      12             :    but WITHOUT ANY WARRANTY; without even the implied warranty of
      13             :    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      14             :    GNU General Public License for more details.
      15             : 
      16             :    You should have received a copy of the GNU General Public License
      17             :    along with this program.  If not, see <http://www.gnu.org/licenses/>.
      18             : */
      19             : 
      20             : #include "includes.h"
      21             : #include "torture/proto.h"
      22             : #include "libsmb/libsmb.h"
      23             : #include "libcli/security/dom_sid.h"
      24             : #include "libcli/security/secdesc.h"
      25             : #include "libcli/security/security.h"
      26             : #include "trans2.h"
      27             : #include "source3/libsmb/clirap.h"
      28             : 
      29           0 : bool run_qpathinfo_bufsize(int dummy)
      30             : {
      31           0 :         struct cli_state *cli = NULL;
      32           0 :         bool ret = false;
      33           0 :         int i;
      34             : 
      35           0 :         printf("Starting qpathinfo_bufsize\n");
      36             : 
      37           0 :         if (!torture_open_connection(&cli, 0)) {
      38           0 :                 printf("torture_open_connection failed\n");
      39           0 :                 goto fail;
      40             :         }
      41             : 
      42           0 :         for (i=0; i<500; i++) {
      43           0 :                 uint8_t *rdata;
      44           0 :                 uint32_t num_rdata;
      45           0 :                 cli_qpathinfo(cli, cli, "\\", SMB_FILE_ALL_INFORMATION,
      46             :                               0, i, &rdata, &num_rdata);
      47             :         }
      48             : 
      49           0 :         ret = true;
      50           0 : fail:
      51           0 :         if (cli != NULL) {
      52           0 :                 torture_close_connection(cli);
      53             :         }
      54           0 :         return ret;
      55             : }

Generated by: LCOV version 1.14