Skip to contentSkip to conversation

Fix a few syntax error

PATCH In review tangchen 4 participants 35 messages Jan 6, 2011 – Jan 13, 2011 2 messages not in the archive

lore
Share & tools
lore

tangchen

author
#0 lore raw

cover Fix a few syntax error

There are several small bugs making LTP unable to be built, most of which are syntax errors.

1. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/fchmod/fchmod03.c
2. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/flock/flock04.c
3. Add missing ";" in testcases/kernel/syscalls/getpagesize/getpagesize01.c
4. Correct the parameters' names for parse_opts() in testcases/kernel/syscalls/lchown/lchown02.c
5. Add some preprocessor variables in /testcases/kernel/mem/ksm/ksm01.c bacause KSM is not supported on RHEL5
6. Add missing operators for parse_opts() in testcases/kernel/syscalls/msync/msync04.c
7. Fix an wrong using of macro WTERMSIG in testcases/kernel/syscalls/pipe/pipe04.c
8. Fix the wrong variable name of wtstatus in testcases/kernel/syscalls/pipe/pipe09.c
9. Add a missing ")" in testcases/kernel/syscalls/pread/pread03.c
10. Remove a redundant "{" in testcases/kernel/syscalls/sched_getparam/sched_getparam02.c
11. Fix the wrong using of perror() in testcases/kernel/syscalls/sched_setparam/sched_setparam03.c
12. Add a missing variable TST_TOTAL in testcases/kernel/syscalls/socketpair/socketpair02.c
13. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/statfs/statfs03.c

Signature · 17 lines
Best Regards,
Tang chen
--------------------------------------------------
Tang Chen



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
author
#1 lore raw

PATCH 1/13 Add missing parameters for tst_brkm()

---
  testcases/kernel/syscalls/fchmod/fchmod03.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/testcases/kernel/syscalls/fchmod/fchmod03.c
index 9c4ab34..d0c1255 100644

testcases/kernel/syscalls/fchmod/fchmod03.c +1 -1
@@ -178,7 +178,7 @@ void cleanup()
      TEST_CLEANUP;
 
      if (close(fd) == -1)
-        tst_brkm(TWARN|TERRNO, "close failed");
+        tst_brkm(TWARN|TERRNO, NULL, "close failed");
 
      tst_rmdir();
 
Signature · 19 lines
1.7.0.4


-- 
Best Regards,
Tang chen



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#2 lore raw

Re: [LTP] [PATCH 01/13]Add missing parameters for tst_brkm()

testcases/kernel/syscalls/fchmod/fchmod03.c void cleanup() · line 181

Quoted 8 lines · tangchen
testcases/kernel/syscalls/fchmod/fchmod03.c +1 -1
@@ -178,7 +178,7 @@ void cleanup()
      TEST_CLEANUP;
 
      if (close(fd) == -1)
-        tst_brkm(TWARN|TERRNO, "close failed");
+        tst_brkm(TWARN|TERRNO, NULL, "close failed");

i guess we should add a non-null gcc attribute to the tst_brkm function ... and perhaps a printf attribute if it doesnt have one already
-mike

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

author
#3 lore raw

PATCH 2/13 Add missing parameters for tst_brkm()

In reply to tangchen
---
  testcases/kernel/syscalls/flock/flock04.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/testcases/kernel/syscalls/flock/flock04.c
index cd6b230..a3bc855 100644

testcases/kernel/syscalls/flock/flock04.c +2 -2
@@ -123,7 +123,7 @@ int main(int argc, char **argv)
                  exit(0);
              } else
                  if (wait(&status) == -1)
-                    tst_brkm(TBROK|TERRNO, "wait failed");
+                    tst_brkm(TBROK|TERRNO, cleanup, "wait failed");
 
              pid = FORK_OR_VFORK();
              if (pid == -1)
@@ -144,7 +144,7 @@ int main(int argc, char **argv)
                  exit(0);
              } else
                  if (wait(&status) == -1)
-                    tst_brkm(TBROK|TERRNO, "wait failed");
+                    tst_brkm(TBROK|TERRNO, cleanup, "wait failed");
              TEST(flock(fd, LOCK_UN));
          } else
              tst_resm(TFAIL|TERRNO, "flock failed");
Signature · 30 lines
1.7.0.4


-- 
Best Regards,
Tang chen
--------------------------------------------------
Tang Chen
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
No.6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8513
FUJITSU INTERNAL: 7998-8513
FAX: +86+25-83317685
EMail: [email protected]
--------------------------------------------------
This communication is for use by the intended recipient(s) only and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not an intended recipient of this communication, you are hereby notified that any dissemination, distribution or copying hereof is strictly prohibited.  If you have received this communication in error, please notify me by reply e-mail, permanently delete this communication from your system, and destroy any hard copies you may have printed



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
author
#4 lore raw

PATCH 3/13 Add a missing ";"

In reply to tangchen
---
  .../kernel/syscalls/getpagesize/getpagesize01.c    |    8 +++++---
  1 files changed, 5 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/testcases/kernel/syscalls/getpagesize/getpagesize01.c index 09c229e..9b6e27e 100644

testcases/kernel/syscalls/getpagesize/getpagesize01.c +5 -3
@@ -77,8 +77,9 @@ int main(int ac, char **av)
 
          /* check return code */
          if (TEST_RETURN == -1) {
-            tst_resm(TFAIL|TTERRNO, "getpagesize failed"),
-            continue;    /* next loop for MTKERNEL */
+            tst_resm(TFAIL|TTERRNO, "getpagesize failed");
+            /* next loop for MTKERNEL */
+            continue;
          }
 
          if (STD_FUNCTIONAL_TEST) {
@@ -126,4 +127,5 @@ void cleanup()
       * print errno log if that option was specified.
       */
      TEST_CLEANUP;
-}
\ No newline at end of file
+}
+
Signature · 30 lines
1.7.0.4


-- 
Best Regards,
Tang chen
--------------------------------------------------
Tang Chen
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
No.6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8513
FUJITSU INTERNAL: 7998-8513
FAX: +86+25-83317685
EMail: [email protected]
--------------------------------------------------
This communication is for use by the intended recipient(s) only and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not an intended recipient of this communication, you are hereby notified that any dissemination, distribution or copying hereof is strictly prohibited.  If you have received this communication in error, please notify me by reply e-mail, permanently delete this communication from your system, and destroy any hard copies you may have printed



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
author
#5 lore raw

PATCH 4/13 Correct the wrong parameters names

In reply to tangchen
---
  testcases/kernel/syscalls/lchown/lchown02.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/testcases/kernel/syscalls/lchown/lchown02.c
index 9a213a2..04cb943 100644

testcases/kernel/syscalls/lchown/lchown02.c +1 -1
@@ -151,7 +151,7 @@ int main(int argc, char *argv[])
      gid_t group_id;
      int i;
 
-    if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+    if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
          tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
      setup();
Signature · 18 lines
1.7.0.4

-- 
Best Regards,
Tang chen



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
author
#6 lore raw

PATCH 5/13 Add some preprocessor variables

In reply to tangchen

KSM is not supported on RHEL5.

---
  testcases/kernel/mem/ksm/ksm01.c        |   18 +++++++++++++++---
  testcases/kernel/syscalls/mmap/mmap10.c |    6 +++++-
  2 files changed, 20 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/testcases/kernel/mem/ksm/ksm01.c
index 09f71d7..2b10fef 100644

testcases/kernel/mem/ksm/ksm01.c +6 -2
@@ -70,11 +70,15 @@
  #include "test.h"
  #include "usctest.h"
 
-#define _PATH_KSM    "/sys/kernel/mm/ksm/"
-#define MB        (1024 * 1024)
 
  char *TCID = "ksm01";
  int TST_TOTAL = 1;
+
+#ifdef    MADV_MERGEABLE
+
+#define _PATH_KSM    "/sys/kernel/mm/ksm/"
+#define MB        (1024 * 1024)
+
  static int opt_num, opt_size;
  static char *opt_numstr, *opt_sizestr;
  /* memory pointer to identify per process, MB, and byte like
@@ -536,4 +540,12 @@ void group_check(int run, int pages_shared, int 

pages_sharing,

      check("pages_unshared", NULL, pages_unshared);
      check("sleep_millisecs", NULL, sleep_millisecs);
      check("pages_to_scan", NULL, pages_to_scan);

-}
\ No newline at end of file
+}
+
+#else
+int main(int argc, char *argv[])
+{
+ tst_brkm(TRETR, tst_exit, "KSM is unsupported");
+}
+#endif
+

(quoted diff) +0 -0

b/testcases/kernel/syscalls/mmap/mmap10.c
index b31975e..e3a158e 100644

testcases/kernel/syscalls/mmap/mmap10.c +5 -1
@@ -115,9 +115,13 @@ void mmapzero(void)
      if (x == MAP_FAILED)
          tst_brkm(TBROK|TERRNO, cleanup, "mmap");
      if (opt_ksm) {
+#ifdef    MADV_MERGEABLE
          tst_resm(TINFO, "add to KSM regions.");
          if (madvise(x, SIZE+SIZE-4096, MADV_MERGEABLE) == -1)
              tst_brkm(TBROK|TERRNO, cleanup, "madvise");
+#else
+        tst_brkm(TRETR, cleanup, "KSM is unsupported.");
+#endif
      }
      x[SIZE] = 0;
 
@@ -175,4 +179,4 @@ void help(void)
  {
      printf("  -a      Test anonymous pages\n");
      printf("  -s      Add to KSM regions\n");
-}
\ No newline at end of file
+}
Signature · 19 lines
1.7.0.4


-- 
Best Regards,
Tang chen



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#7 lore raw

Re: [LTP] [PATCH 05/13]Add some preprocessor variables

Review

Quoted 6 lines · tangchen
(quoted diff) +6 -0
+#else
+int main(int argc, char *argv[])
+{
+    tst_brkm(TRETR, tst_exit, "KSM is unsupported");
+}
+#endif

i forget ... what did we decide for situations like this ? tst_bkrm(TCONF) ? -mike

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#8 lore raw

Re: [LTP] [PATCH 05/13]Add some preprocessor variables

Quoted 9 lines · Mike Frysinger

Review

Quoted 6 lines · tangchen
(quoted diff) +6 -0
+#else
+int main(int argc, char *argv[])
+{
+    tst_brkm(TRETR, tst_exit, "KSM is unsupported");
+}
+#endif

i forget ... what did we decide for situations like this ? tst_bkrm(TCONF) ?

TCONF makes more sense.
Thanks,
-Garrett

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

author
#9 lore raw

PATCH 6/13 Add missing operators

In reply to tangchen
---
  testcases/kernel/syscalls/msync/msync04.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/testcases/kernel/syscalls/msync/msync04.c
index 3e4b9a4..4e5dccb 100644

testcases/kernel/syscalls/msync/msync04.c +1 -1
@@ -93,7 +93,7 @@ int main(int ac, char **av)
      char *msg;        /* message returned from parse_opts */
 
      /* Parse standard options given to run the test. */
-    if ((msg = parse_opts(ac, av, NULL, NULL)) NULL)
+    if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
          tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
      TEST_EXP_ENOS(exp_enos);
Signature · 19 lines
1.7.0.4


-- 
Best Regards,
Tang chen



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#10 lore raw

Re: [LTP] [PATCH 06/13]Add missing operators

Quoted 11 lines · tangchen
---
 testcases/kernel/syscalls/msync/msync04.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
testcases/kernel/syscalls/msync/msync04.c +0 -0
index 3e4b9a4..4e5dccb 100644

testcases/kernel/syscalls/msync/msync04.c int main(int ac, char **av) · line 97

Quoted 6 lines
testcases/kernel/syscalls/msync/msync04.c +1 -1
@@ -93,7 +93,7 @@ int main(int ac, char **av)
     char *msg;        /* message returned from parse_opts */
 
     /* Parse standard options given to run the test. */
-    if ((msg = parse_opts(ac, av, NULL, NULL)) NULL)
+    if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
         tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);

Patch is good despite the fact that the description is misleading. I checked in a different fix though.
Thanks,
-Garrett

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

author
#11 lore raw

PATCH 7/13 Fix an wrong using of macro WTERMSIG

In reply to tangchen

WRETMSIG need a argument.

---
  testcases/kernel/syscalls/pipe/pipe04.c |    8 +++++---
  1 files changed, 5 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/testcases/kernel/syscalls/pipe/pipe04.c
index 20d87d4..f153f4a 100644

testcases/kernel/syscalls/pipe/pipe04.c +3 -2
@@ -80,7 +80,7 @@ int main(int ac, char **av)
      int lc;            /* loop counter */
      char *msg;        /* message returned from parse_opts */
      pid_t c1pid, c2pid;
-    int wtchild, wtstatus;
+    int wtstatus;
      int bytesread;
      int acnt = 0, bcnt = 0;
 
@@ -187,7 +187,8 @@ int main(int ac, char **av)
                       "writing to a pipe");
          }
          if (waitpid(c2pid, &wtstatus, 0) != -1) {
-            if (!WIFSIGNALED(wtstatus) || WTERMSIG != SIGKILL)
+            if (!WIFSIGNALED(wtstatus) ||
+                WTERMSIG(wtstatus) != SIGKILL)
                  tst_resm(TFAIL|TERRNO, "unexpected wait status "
                      "%d", wtstatus);
              else
@@ -249,4 +250,5 @@ void alarmfunc(int sig)
      /* for some reason tst_brkm doesn't seem to work in a signal 

handler */
tst_brkm(TFAIL, cleanup, "one or more children did't die in 60
second "

          "time limit");

-}
\ No newline at end of file
+}
+

Signature · 19 lines
1.7.0.4


-- 
Best Regards,
Tang chen



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
author
#12 lore raw

PATCH 8/13 Fix the wrong variable name of wtstatus

In reply to tangchen
---
  testcases/kernel/syscalls/pipe/pipe09.c |    5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/testcases/kernel/syscalls/pipe/pipe09.c
index 7990fb6..ac9796e 100644

testcases/kernel/syscalls/pipe/pipe09.c +3 -2
@@ -131,7 +131,7 @@ int main(int ac, char **av)
 
          if (waitpid(fork_1, &wtstatus, 0) == -1)
              tst_brkm(TBROK, cleanup, "waitpid failed");
-        if (WIFEXITED(wstatus) && WEXITSTATUS(wtstatus) != 0) {
+        if (WIFEXITED(wtstatus) && WEXITSTATUS(wtstatus) != 0) {
              tst_brkm(TBROK, cleanup, "child exited abnormally");
          }
 
@@ -226,4 +226,5 @@ void cleanup()
       * print errno log if that option was specified.
       */
      TEST_CLEANUP;
-}
\ No newline at end of file
+}
+
Signature · 18 lines
1.7.0.4

-- 
Best Regards,
Tang chen



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
author
#13 lore raw

PATCH 9/13 Add a missing ")"

In reply to tangchen
---
  testcases/kernel/syscalls/pread/pread03.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/testcases/kernel/syscalls/pread/pread03.c
index 3a33ced..3bfad80 100644

testcases/kernel/syscalls/pread/pread03.c +1 -1
@@ -106,7 +106,7 @@ int main(int ac, char **av)
      char *test_desc;    /* test specific error message */
 
      /* Parse standard options given to run the test. */
-    if ((msg = parse_opts(ac, av, NULL, NULL) != NULL)
+    if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
          tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
      setup();
Signature · 19 lines
1.7.0.4


-- 
Best Regards,
Tang chen



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#14 lore raw

Re: [LTP] [PATCH 09/13]Add a missing ")"

Quoted 2 lines · tangchen

 testcases/kernel/syscalls/pread/pread03.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)

please use more useful summaries. in this case, your summary should be prefixed with "pread03: ".
-mike

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

author
#15 lore raw

PATCH 10/13 Remove a redundant "{"

In reply to tangchen
---
  .../syscalls/sched_getparam/sched_getparam02.c     |    5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/testcases/kernel/syscalls/sched_getparam/sched_getparam02.c index 72d7d20..4a15acc 100644

testcases/kernel/syscalls/sched_getparam/sched_getparam02.c +3 -2
@@ -94,7 +94,7 @@ int main(int ac, char **av)
      pid_t child_pid;
 
      /* parse standard options */
-    if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+    if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
          tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
      setup();
@@ -180,4 +180,5 @@ void cleanup()
       * print errno log if that option was specified.
       */
      TEST_CLEANUP;
-}
\ No newline at end of file
+}
+
Signature · 19 lines
1.7.0.4


-- 
Best Regards,
Tang chen



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#16 lore raw

Re: [LTP] [PATCH 10/13]Remove a redundant "{"

testcases/kernel/syscalls/sched_getparam/sched_getparam02.c void cleanup() · line 184

Quoted 8 lines · tangchen
testcases/kernel/syscalls/sched_getparam/sched_getparam02.c +2 -1
@@ -180,4 +180,5 @@ void cleanup()
       * print errno log if that option was specified.
       */
      TEST_CLEANUP;
-}
\ No newline at end of file
+}
+

please dont add trailing newlines
-mike

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

author
#17 lore raw

PATCH 11/13 Fix the wrong using of perror()

In reply to tangchen
---
  .../syscalls/sched_setparam/sched_setparam03.c     |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/testcases/kernel/syscalls/sched_setparam/sched_setparam03.c index eb70588..16f3d3a 100644

testcases/kernel/syscalls/sched_setparam/sched_setparam03.c +4 -2
@@ -121,7 +121,8 @@ int main(int ac, char **av)
              TEST(sched_setparam(getppid(), &param));
 
              if (TEST_RETURN == -1) {
-                perror("sched_setparam returned %ld", TEST_RETURN);
+                fprintf(stderr, "sched_setparam returned %ld: "
+                    "%s\n", TEST_RETURN, strerror(errno));
                  exit(0);
              }
              exit(1);
@@ -201,4 +202,5 @@ int verify_priority()
 
      tst_resm(TWARN, "sched_getparam() failed");
      return 0;
-}
\ No newline at end of file
+}
+
Signature · 19 lines
1.7.0.4


-- 
Best Regards,
Tang chen



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#18 lore raw

Re: [LTP] [PATCH 11/13]Fix the wrong using of perror()

testcases/kernel/syscalls/sched_setparam/sched_setparam03.c int main(int ac, char **av) · line 128

Quoted 12 lines · tangchen
testcases/kernel/syscalls/sched_setparam/sched_setparam03.c +2 -1
@@ -121,7 +121,8 @@ int main(int ac, char **av)
              TEST(sched_setparam(getppid(), &param));
 
              if (TEST_RETURN == -1) {
-                perror("sched_setparam returned %ld", TEST_RETURN);
+                fprintf(stderr, "sched_setparam returned %ld: "
+                    "%s\n", TEST_RETURN, strerror(errno));
                  exit(0);
              }
              exit(1);

odd, this should have caused a compile error ...

also, i wonder why this test isnt using tst_* helpers for its output ... -mike

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

author
#19 lore raw

PATCH 12/13 Add a missing variable TST_TOTAL

In reply to tangchen
---
  .../kernel/syscalls/socketpair/socketpair02.c      |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/testcases/kernel/syscalls/socketpair/socketpair02.c index e898066..7ac74f3 100644

testcases/kernel/syscalls/socketpair/socketpair02.c +4 -2
@@ -65,7 +65,8 @@
  extern char *TESTDIR;        /* temporary dir created by tst_tmpdir() */
 
  /* Global Variables */
-char *TCID = "socketpair02";    /* test program identifier.              */
+char *TCID = "socketpair02";    /* test program identifier.*/
+int TST_TOTAL = 1;
 
  /* Extern Global Functions */
  /******************************************************************************/
@@ -162,4 +163,5 @@ int main(int argc, char *argv[])
      tst_resm(TPASS, "socketpair(SOCK_NONBLOCK) PASSED");
      cleanup();
      tst_exit();
-}
\ No newline at end of file
+}
+
Signature · 19 lines
1.7.0.4


-- 
Best Regards,
Tang chen



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#20 lore raw

Re: [LTP] [PATCH 12/13]Add a missing variable TST_TOTAL

testcases/kernel/syscalls/socketpair/socketpair02.c int main(int argc, char *argv[]) · line 167

Quoted 10 lines · tangchen
testcases/kernel/syscalls/socketpair/socketpair02.c +2 -1
@@ -162,4 +163,5 @@ int main(int argc, char *argv[])
      tst_resm(TPASS, "socketpair(SOCK_NONBLOCK) PASSED");
      cleanup();
      tst_exit();
-}
\ No newline at end of file
+}
+

please, no trailing new lines
-mike

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

author
#21 lore raw

PATCH 13/13 Add missing parameters for tst_brkm()

In reply to tangchen
---
  testcases/kernel/syscalls/statfs/statfs03.c |    5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/testcases/kernel/syscalls/statfs/statfs03.c
index d60316b..226557e 100644

testcases/kernel/syscalls/statfs/statfs03.c +3 -2
@@ -140,7 +140,8 @@ void setup()
      } else {
          sprintf(path, "%s/%s", fname, fname);
          if ((fileHandle = creat(path, 0444)) == -1) {
-            tst_brkm(TFAIL|TERRNO, "creat (2) FAILED to creat temp file");
+            tst_brkm(TFAIL|TERRNO, cleanup,
+                 "creat (2) FAILED to creat temp file");
          }
      }
 
@@ -176,4 +177,4 @@ void cleanup()
      /* delete the test directory created in setup() */
      tst_rmdir();
 
-}
\ No newline at end of file
+}
Signature · 18 lines
1.7.0.4

-- 
Best Regards,
Tang chen



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#22 lore raw
In reply to tangchen
Quoted 19 lines · tangchen

There are several small bugs making LTP unable to be built, most of which are syntax errors.

1. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/fchmod/fchmod03.c
2. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/flock/flock04.c
3. Add missing ";" in testcases/kernel/syscalls/getpagesize/getpagesize01.c
4. Correct the parameters' names for parse_opts() in testcases/kernel/syscalls/lchown/lchown02.c
5. Add some preprocessor variables in /testcases/kernel/mem/ksm/ksm01.c bacause KSM is not supported on RHEL5
6. Add missing operators for parse_opts() in testcases/kernel/syscalls/msync/msync04.c
7. Fix an wrong using of macro WTERMSIG in testcases/kernel/syscalls/pipe/pipe04.c
8. Fix the wrong variable name of wtstatus in testcases/kernel/syscalls/pipe/pipe09.c
9. Add a missing ")" in testcases/kernel/syscalls/pread/pread03.c

Quoted 8 lines

10. Remove a redundant "{" in testcases/kernel/syscalls/sched_getparam/sched_getparam02.c
11. Fix the wrong using of perror() in testcases/kernel/syscalls/sched_setparam/sched_setparam03.c
12. Add a missing variable TST_TOTAL in testcases/kernel/syscalls/socketpair/socketpair02.c
13. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/statfs/statfs03.c

this is weird ... how did all these *compile errors* manage to get *committed* ??
-mike

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#23 lore raw
Quoted 29 lines · Mike Frysinger
Quoted 19 lines · tangchen

There are several small bugs making LTP unable to be built, most of which are syntax errors.

1. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/fchmod/fchmod03.c
2. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/flock/flock04.c
3. Add missing ";" in testcases/kernel/syscalls/getpagesize/getpagesize01.c
4. Correct the parameters' names for parse_opts() in testcases/kernel/syscalls/lchown/lchown02.c
5. Add some preprocessor variables in /testcases/kernel/mem/ksm/ksm01.c bacause KSM is not supported on RHEL5
6. Add missing operators for parse_opts() in testcases/kernel/syscalls/msync/msync04.c
7. Fix an wrong using of macro WTERMSIG in testcases/kernel/syscalls/pipe/pipe04.c
8. Fix the wrong variable name of wtstatus in testcases/kernel/syscalls/pipe/pipe09.c
9. Add a missing ")" in testcases/kernel/syscalls/pread/pread03.c

Quoted 8 lines

10. Remove a redundant "{" in testcases/kernel/syscalls/sched_getparam/sched_getparam02.c
11. Fix the wrong using of perror() in testcases/kernel/syscalls/sched_setparam/sched_setparam03.c
12. Add a missing variable TST_TOTAL in testcases/kernel/syscalls/socketpair/socketpair02.c
13. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/statfs/statfs03.c

Quoted 2 lines

this is weird ... how did all these *compile errors* manage to get *committed* ??

A really bad merge (I posted a reply to it a while ago in the archives). -Garrett

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#24 lore raw
Quoted 31 lines · Garrett Cooper
Quoted 29 lines · Mike Frysinger
Quoted 27 lines · tangchen

There are several small bugs making LTP unable to be built, most of which are syntax errors.

1. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/fchmod/fchmod03.c
2. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/flock/flock04.c
3. Add missing ";" in testcases/kernel/syscalls/getpagesize/getpagesize01.c
4. Correct the parameters' names for parse_opts() in testcases/kernel/syscalls/lchown/lchown02.c
5. Add some preprocessor variables in /testcases/kernel/mem/ksm/ksm01.c bacause KSM is not supported on RHEL5
6. Add missing operators for parse_opts() in testcases/kernel/syscalls/msync/msync04.c
7. Fix an wrong using of macro WTERMSIG in testcases/kernel/syscalls/pipe/pipe04.c
8. Fix the wrong variable name of wtstatus in testcases/kernel/syscalls/pipe/pipe09.c
9. Add a missing ")" in testcases/kernel/syscalls/pread/pread03.c
10. Remove a redundant "{" in testcases/kernel/syscalls/sched_getparam/sched_getparam02.c
11. Fix the wrong using of perror() in testcases/kernel/syscalls/sched_setparam/sched_setparam03.c
12. Add a missing variable TST_TOTAL in testcases/kernel/syscalls/socketpair/socketpair02.c
13. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/statfs/statfs03.c

Quoted 4 lines
Quoted 2 lines

this is weird ... how did all these *compile errors* manage to get *committed* ??

A really bad merge (I posted a reply to it a while ago in the archives).

Well, that and I also turned on -Werror to catch warnings-related errors. -Garrett

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#25 lore raw
In reply to Garrett Cooper
Quoted 30 lines · Garrett Cooper
Quoted 29 lines · Mike Frysinger
Quoted 27 lines · tangchen

There are several small bugs making LTP unable to be built, most of which are syntax errors.

1. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/fchmod/fchmod03.c
2. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/flock/flock04.c
3. Add missing ";" in testcases/kernel/syscalls/getpagesize/getpagesize01.c
4. Correct the parameters' names for parse_opts() in testcases/kernel/syscalls/lchown/lchown02.c
5. Add some preprocessor variables in /testcases/kernel/mem/ksm/ksm01.c bacause KSM is not supported on RHEL5
6. Add missing operators for parse_opts() in testcases/kernel/syscalls/msync/msync04.c
7. Fix an wrong using of macro WTERMSIG in testcases/kernel/syscalls/pipe/pipe04.c
8. Fix the wrong variable name of wtstatus in testcases/kernel/syscalls/pipe/pipe09.c
9. Add a missing ")" in testcases/kernel/syscalls/pread/pread03.c
10. Remove a redundant "{" in testcases/kernel/syscalls/sched_getparam/sched_getparam02.c
11. Fix the wrong using of perror() in testcases/kernel/syscalls/sched_setparam/sched_setparam03.c
12. Add a missing variable TST_TOTAL in testcases/kernel/syscalls/socketpair/socketpair02.c
13. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/statfs/statfs03.c

Quoted 4 lines
Quoted 2 lines

this is weird ... how did all these *compile errors* manage to get *committed* ??

A really bad merge (I posted a reply to it a while ago in the archives).

i guess i read that as "things are fixed now" rather than "there are still some latent issues laying about"
-mike

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#26 lore raw
Quoted 31 lines · Mike Frysinger
Quoted 30 lines · Garrett Cooper
Quoted 29 lines · Mike Frysinger
Quoted 27 lines · tangchen

There are several small bugs making LTP unable to be built, most of which are syntax errors.

1. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/fchmod/fchmod03.c
2. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/flock/flock04.c
3. Add missing ";" in testcases/kernel/syscalls/getpagesize/getpagesize01.c
4. Correct the parameters' names for parse_opts() in testcases/kernel/syscalls/lchown/lchown02.c
5. Add some preprocessor variables in /testcases/kernel/mem/ksm/ksm01.c bacause KSM is not supported on RHEL5
6. Add missing operators for parse_opts() in testcases/kernel/syscalls/msync/msync04.c
7. Fix an wrong using of macro WTERMSIG in testcases/kernel/syscalls/pipe/pipe04.c
8. Fix the wrong variable name of wtstatus in testcases/kernel/syscalls/pipe/pipe09.c
9. Add a missing ")" in testcases/kernel/syscalls/pread/pread03.c
10. Remove a redundant "{" in testcases/kernel/syscalls/sched_getparam/sched_getparam02.c
11. Fix the wrong using of perror() in testcases/kernel/syscalls/sched_setparam/sched_setparam03.c
12. Add a missing variable TST_TOTAL in testcases/kernel/syscalls/socketpair/socketpair02.c
13. Add missing parameters for tst_brkm() in testcases/kernel/syscalls/statfs/statfs03.c

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

this is weird ... how did all these *compile errors* manage to get *committed* ??

A really bad merge (I posted a reply to it a while ago in the archives).

i guess i read that as "things are fixed now" rather than "there are still some latent issues laying about"

306 to be exact still need to be resolved; my previous number was
much lower because I forgot the power of make -k.
I'll post the problem files soon (as a list) and a way for
reproducing the problems so that others can provide patches (maybe), but [un]fortunately many times I have to go in and fix other items anyhow, as the process that it goes and executes things sometimes leaves test directories hanging around. On the bright side I've fixed about 20-30 or so legitimate test bugs so far.
Thanks,
-Garrett "still making progress, but steady as she goes"

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#27 lore raw
In reply to Garrett Cooper
Quoted 1 line · Garrett Cooper

A really bad merge (I posted a reply to it a while ago in the archives).

is there a way for us to manage the git hooks ? we could have them reject trivial merge commits (ones that should be fast forwards), and commits with merge cruft in it ...
-mike

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#28 lore raw
Quoted 6 lines · Mike Frysinger
Quoted 1 line · Garrett Cooper

A really bad merge (I posted a reply to it a while ago in the archives).

is there a way for us to manage the git hooks ?  we could have them reject trivial merge commits (ones that should be fast forwards), and commits with merge cruft in it ...

This was nastier. A lot of the problems I caused was ignorance and
human error based -- in particular I thought that git reset --hard would actually reset merges (but it didn't!) and I didn't bother to fake the push before I did it and the rest is history. So I don't know if adding hooks would fix that, but I think that the tool should reset merges if I do reset --hard.
I need to note some of the fun points I've had with git so far
because there are a handful of items with the tool that have really made my life painful in the past couple of weeks that should be fixed. Thanks,
-Garrett

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#29 lore raw
Quoted 11 lines · Garrett Cooper
Quoted 6 lines · Mike Frysinger
Quoted 1 line · Garrett Cooper

A really bad merge (I posted a reply to it a while ago in the archives).

is there a way for us to manage the git hooks ?  we could have them reject trivial merge commits (ones that should be fast forwards), and commits with merge cruft in it ...

  This was nastier. A lot of the problems I caused was ignorance and human error based -- in particular I thought that git reset --hard would actually reset merges (but it didn't!)

sure it will ... you just have to reset to before the merge

Quoted 1 line

I didn't bother to fake the push before I did it and the rest is history.

if you caught it soon, you could have pushed up an old one and forced it back to the sane state ...
git push --force origin <older commit>:refs/head/master

Quoted 1 line

So I don't know if adding hooks would fix that

i saw that you had actual conflicts in there, and the hook would have caught that (">>>>>>>>>" and "=========" and such)

but i'm not sure if your non-trivial merge would have been detected as a trivial merge since we dont want that (it'd prevent people from being able to pull a branch from someone else)
-mike

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#30 lore raw
Quoted 21 lines · Mike Frysinger
Quoted 11 lines · Garrett Cooper
Quoted 6 lines · Mike Frysinger
Quoted 1 line · Garrett Cooper

A really bad merge (I posted a reply to it a while ago in the archives).

is there a way for us to manage the git hooks ? we could have them reject trivial merge commits (ones that should be fast forwards), and commits with merge cruft in it ...

This was nastier. A lot of the problems I caused was ignorance and
human error based -- in particular I thought that git reset --hard would actually reset merges (but it didn't!)

sure it will ... you just have to reset to before the merge

Quoted 1 line

I didn't bother to fake the push before I did it and the rest is history.

if you caught it soon, you could have pushed up an old one and forced it back to the sane state ...
git push --force origin <older commit>:refs/head/master

Quoted 8 lines
Quoted 1 line

So I don't know if adding hooks would fix that

i saw that you had actual conflicts in there, and the hook would have caught that (">>>>>>>>>" and "=========" and such)

but i'm not sure if your non-trivial merge would have been detected as a trivial merge since we dont want that (it'd prevent people from being able to pull a branch from someone else)

Ok -- good to note for next time I guess. I fixed all of the compilation errors so now people can report runtime issues. There are a handful of them.
Thanks,
-Garrett

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web. Learn how to
best implement a security strategy that keeps consumers' information secure and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#31 lore raw

Hi!

Quoted 3 lines

Ok -- good to note for next time I guess. I fixed all of the compilation errors so now people can report runtime issues. There are a handful of them.

I still could not compile the latest git. I've got a bunch of:

pipe declared with warn_unused_result
write declared with warn_unused_result
read declared with warn_unused_result

little less of:

getcwd declared with warn_unused_result
chdir declared with warn_unused_result
ftruncate declared with warn_unused_result
system declared with warn_unused_result

plus some printf() formatting issues

And after disabling -Werror it stops on getdelays.c with

getdelays.c: In function 'main':
getdelays.c:525: warning: implicit declaration of function 'tst_exit' getdelays.c:526: warning: control reaches end of non-void function getdelays.c:266: warning: 'cmd_type' may be used uninitialized in this function
../../../../lib/libltp.a(tst_res.o): In function `cat_file':
/home/metan/Work/git/ltp-dev/lib/tst_res.c:710: undefined reference to TCID' /home/metan/Work/git/ltp-dev/lib/tst_res.c:728: undefined reference to TCID' /home/metan/Work/git/ltp-dev/lib/tst_res.c:720: undefined reference to TCID' ../../../../lib/libltp.a(tst_res.o): In function tst_res':
/home/metan/Work/git/ltp-dev/lib/tst_res.c:321: undefined reference to TCID' ../../../../lib/libltp.a(tst_res.o): In function tst_condense':
/home/metan/Work/git/ltp-dev/lib/tst_res.c:377: undefined reference to TCID' ../../../../lib/libltp.a(tst_res.o):/home/metan/Work/git/ltp-dev/lib/tst_res.c:3 05: more undefined references to TCID' follow ../../../../lib/libltp.a(tst_res.o): In function `tst_brk':
/home/metan/Work/git/ltp-dev/lib/tst_res.c:613: undefined reference to `TST_TOTAL'

The same goes for testcases/kernel/io/ltp-aiodio/dirty.c and testcases/kernel/security/cap_bound/dummy.c

Then it hangs on securebits but is suppose that this is bug somewhere in configure not detecting securebits headers right. I'll look into this later.

The realtime tests hangs on:

async_handler_jk.c: In function 'main':
async_handler_jk.c:162: warning: implicit declaration of function 'tst_exit'
async_handler_jk.c:163: warning: control reaches end of non-void
function
/tmp/ccGU6ubN.o: In function `main':
/home/metan/Work/git/ltp-dev/testcases/realtime/func/async_handler/async_handler_jk.c:162:
undefined reference to `tst_exit'
collect2: ld returned 1 exit status
make[2]: *** [async_handler_jk] Error 1
make[2]: Leaving directory `/home/metan/Work/git/ltp-dev/testcases/realtime/func/async_handler' make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/metan/Work/git/ltp-dev/testcases/realtime/func'
make: *** [all] Error 2

The rest seems to compile fine.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

A message that is not in the archive (sent off-list or not yet received): [email protected]

#33 lore raw

Hi!

Quoted 7 lines
Quoted 5 lines

I still could not compile the latest git. I've got a bunch of:

pipe declared with warn_unused_result
write declared with warn_unused_result
read declared with warn_unused_result

Now you know why I used void casts in a few spots :). Some are of value, some are fud.

The problem seems to be that in different versions of libc different calls are marked with warn_unused_result. I'm still thinking if -Werror is right default for git tree. And I'm almost sure that it's wrong for releases.

Quoted 4 lines

Ok. It would be nice to have a summary email (off-list) with all of these warnings, as they can lead to really bad problems. I may do like I've done in some directories as well and add -Wno-error with a comment stating why things were done that way.

Will send.

BTW: just now, you are missing SAFE_SETEGID and SAFE_SETEUID implementation
so compilation stops at fchown04.c

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

A message that is not in the archive (sent off-list or not yet received): [email protected]

#35 lore raw

Hi!

Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines

I still could not compile the latest git. I've got a bunch of:

pipe declared with warn_unused_result
write declared with warn_unused_result
read declared with warn_unused_result

Now you know why I used void casts in a few spots :). Some are of value, some are fud.

Quoted 7 lines
Quoted 4 lines

The problem seems to be that in different versions of libc different calls are marked with warn_unused_result. I'm still thinking if -Werror is right default for git tree. And I'm almost sure that it's wrong for releases.

Agreed, but people need to turn it on before committing test code, so that their code doesn't introduce any new warnings.

Well that doesn't catch up warnings if they are compiling, let's say on ancient rhel distros. Unless somebody checks the code on recent enough glibc... As far as I remember warn_unused_result is quite recent feature.

Quoted 14 lines
Quoted 6 lines
Quoted 4 lines

Ok. It would be nice to have a summary email (off-list) with all of these warnings, as they can lead to really bad problems. I may do like I've done in some directories as well and add -Wno-error with a comment stating why things were done that way.

Will send.

Thanks. Subrata sent me a bunch of warnings-related errors so I'll need to follow up on them. Now that tst_brk is reentrant (for better or for worse -- I needed to do this so people could use SAFE_CLOSE, etc in cleanup functions otherwise the compiler would whine that code doesn't return), the compiler isn't smart enough to realize that the following will always result in an immediate exit:

Quoted 5 lines

int
main(void)

{
    tst_brkm(TCONF, NULL, "gcc is dumb");
}

Well, that's the whole reason for attribute __noreturn__. The compiler is not smart enough and it's not easy to make it smarter, without a buch of matematicians and a lot of work. And as such code leads, usually, to bug, the gcc folks rather prints the warning. There are even parts of gcc compiler, that are compiled with warnings disabled...

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#36 lore raw

Hi!

Quoted 11 lines
Quoted 5 lines

int
main(void)

{
    tst_brkm(TCONF, NULL, "gcc is dumb");
}

Well, that's the whole reason for attribute __noreturn__. The compiler is not smart enough and it's not easy to make it smarter, without a buch of matematicians and a lot of work. And as such code leads, usually, to bug, the gcc folks rather prints the warning. There are even parts of gcc compiler, that are compiled with warnings disabled...

Thinking of this again, even a bunch of matematicians wouldn't help here. As the compiler doesn't have any means to find out, when main is compiled, how tst_brkm() is actually implemented. That is not possible before the linker comes into play and in case of dynamic linker, this warning could be generated only at runtime. That's IMHO the whole reason for attribute __noreturn__.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list