s4:torture:raw:notify: treat torture_open_connection calls with torture_assert
authorMichael Adam <obnox@samba.org>
Thu, 26 Mar 2015 18:22:08 +0000 (19:22 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 30 Mar 2015 11:41:26 +0000 (13:41 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source4/torture/raw/notify.c

index 26f7094b280c6d0ac4386ad510a703e071f5a8b3..80de189521ee83e73ad0552088ba9d4d6d7fe401 100644 (file)
@@ -1023,9 +1023,8 @@ static bool test_notify_tdis(struct torture_context *tctx,
        torture_assert(tctx, torture_setup_dir(cli1, BASEDIR),
                       "Failed to setup up test directory: " BASEDIR);
 
-       if (!torture_open_connection(&cli, tctx, 0)) {
-               return false;
-       }
+       torture_assert(tctx, torture_open_connection(&cli, tctx, 0),
+                      "Failed to open connection.");
 
        /*
          get a handle on the directory
@@ -1094,9 +1093,8 @@ static bool test_notify_exit(struct torture_context *tctx,
        torture_assert(tctx, torture_setup_dir(cli1, BASEDIR),
                       "Failed to setup up test directory: " BASEDIR);
 
-       if (!torture_open_connection(&cli, tctx, 0)) {
-               return false;
-       }
+       torture_assert(tctx, torture_open_connection(&cli, tctx, 0),
+                      "Failed to open connection.");
 
        /*
          get a handle on the directory
@@ -1164,9 +1162,8 @@ static bool test_notify_ulogoff(struct torture_context *tctx,
        torture_assert(tctx, torture_setup_dir(cli1, BASEDIR),
                       "Failed to setup up test directory: " BASEDIR);
 
-       if (!torture_open_connection(&cli, tctx, 0)) {
-               return false;
-       }
+       torture_assert(tctx, torture_open_connection(&cli, tctx, 0),
+                      "Failed to open connection.");
 
        /*
          get a handle on the directory
@@ -1241,9 +1238,8 @@ static bool test_notify_tcp_dis(struct torture_context *tctx,
        torture_assert(tctx, torture_setup_dir(cli1, BASEDIR),
                       "Failed to setup up test directory: " BASEDIR);
 
-       if (!torture_open_connection(&cli, tctx, 0)) {
-               return false;
-       }
+       torture_assert(tctx, torture_open_connection(&cli, tctx, 0),
+                      "Failed to open connection.");
 
        /*
          get a handle on the directory