Signed-off-by: Stanislav Kholmanskikh <[email protected]>
---
 .../tirpc_expertlevel_rpcb_set/tirpc_rpcb_set.c    |   22 ++++--------------
 .../tirpc_rpcb_unset.c                             |   23 ++++---------------
 2 files changed, 10 insertions(+), 35 deletions(-)

diff --git 
a/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_set/tirpc_rpcb_set.c
 
b/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_set/tirpc_rpcb_set.c
index 4b60586..eb42618 100644
--- 
a/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_set/tirpc_rpcb_set.c
+++ 
b/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_set/tirpc_rpcb_set.c
@@ -33,35 +33,25 @@
 #include <tirpc/rpc/svc.h>
 #include <errno.h>
 
-//Standard define
 #define PROCNUM 1
 #define VERSNUM 1
 
 int main(int argn, char *argc[])
 {
-       //Program parameters : argc[1] : HostName or Host IP
-       //                                         argc[2] : Server Program 
Number
-       //                                         other arguments depend on 
test case
+       /*
+        * argc[1] - HostName or Host IP
+        * argc[2] - Server Program Number
+        */
 
-       //run_mode can switch into stand alone program or program launch by 
shell script
-       //1 : stand alone, debug mode, more screen information
-       //0 : launch by shell script as test case, only one printf -> result 
status
-       int run_mode = 0;
-       int test_status = 1;    //Default test result set to FAILED
+       int test_status = 1;
        int progNum = atoi(argc[2]);
        SVCXPRT *transp = NULL;
        struct netconfig *nconf = NULL;
        struct netbuf svcaddr;
 
-       //Initialization
-       if (run_mode) {
-               printf("Before creation\n");
-               printf("nconf : %d\n", nconf);
-       }
 
        nconf = getnetconfigent("udp");
        if (nconf == (struct netconfig *)NULL) {
-               //syslog(LOG_ERR, "getnetconfigent for udp failed");
                printf("err nconf\n");
                exit(1);
        }
@@ -70,8 +60,6 @@ int main(int argn, char *argc[])
 
        test_status = !rpcb_set(progNum, VERSNUM, nconf, &svcaddr);
 
-       //This last printf gives the result status to the tests suite
-       //normally should be 0: test has passed or 1: test has failed
        printf("%d\n", test_status);
 
        return test_status;
diff --git 
a/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_unset/tirpc_rpcb_unset.c
 
b/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_unset/tirpc_rpcb_unset.c
index 75155cf..adb951f 100644
--- 
a/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_unset/tirpc_rpcb_unset.c
+++ 
b/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_unset/tirpc_rpcb_unset.c
@@ -33,35 +33,24 @@
 #include <tirpc/rpc/svc.h>
 #include <errno.h>
 
-//Standard define
 #define PROCNUM 1
 #define VERSNUM 1
 
 int main(int argn, char *argc[])
 {
-       //Program parameters : argc[1] : HostName or Host IP
-       //                                         argc[2] : Server Program 
Number
-       //                                         other arguments depend on 
test case
+       /*
+        * argc[1] - HostName or Host IP
+        * argc[2] - Server Program Number
+        */
 
-       //run_mode can switch into stand alone program or program launch by 
shell script
-       //1 : stand alone, debug mode, more screen information
-       //0 : launch by shell script as test case, only one printf -> result 
status
-       int run_mode = 0;
-       int test_status = 1;    //Default test result set to FAILED
+       int test_status = 1;
        int progNum = atoi(argc[2]);
        SVCXPRT *transp = NULL;
        struct netconfig *nconf = NULL;
        struct netbuf svcaddr;
 
-       //Initialization
-       if (run_mode) {
-               printf("Before creation\n");
-               printf("nconf : %d\n", nconf);
-       }
-
        nconf = getnetconfigent("udp");
        if (nconf == (struct netconfig *)NULL) {
-               //syslog(LOG_ERR, "getnetconfigent for udp failed");
                printf("err nconf\n");
                exit(1);
        }
@@ -72,8 +61,6 @@ int main(int argn, char *argc[])
 
        test_status = !rpcb_unset(progNum, VERSNUM, nconf);
 
-       //This last printf gives the result status to the tests suite
-       //normally should be 0: test has passed or 1: test has failed
        printf("%d\n", test_status);
 
        return test_status;
-- 
1.7.1


------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to