You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@yetus.apache.org by GitBox <gi...@apache.org> on 2021/10/25 12:16:34 UTC

[GitHub] [yetus] iwasakims opened a new pull request #227: YETUS-1107. calcdiffs of cc raise false positive warnings.

iwasakims opened a new pull request #227:
URL: https://github.com/apache/yetus/pull/227


   https://issues.apache.org/jira/browse/YETUS-1107
   
   The cause is parallel mode of make/cmake (-j) generating warnings in non-deterministic order. Sorting the grepped output should mitigate this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [yetus] iwasakims commented on pull request #227: YETUS-1107. calcdiffs of cc raise false positive warnings.

Posted by GitBox <gi...@apache.org>.
iwasakims commented on pull request #227:
URL: https://github.com/apache/yetus/pull/227#issuecomment-951941136


   The added `${GREP}" -i -E "^/" ` is for removing useless lines begging from "from " or "In file included from" shown in the following example.
   
   ```
   [WARNING] /home/centos/srcs/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/util/StringUtil.cc:51:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
   [WARNING]                  from /home/centos/srcs/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/test/lib/TestPartitionBucket.cc:21:
   [WARNING] /home/centos/srcs/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/lib/MemoryPool.h:52:32: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   [WARNING] In file included from /home/centos/srcs/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/test/lib/TestPartitionBucket.cc:21:
   [WARNING] /home/centos/srcs/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/lib/PartitionBucket.h:127:36: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [yetus] iwasakims commented on a change in pull request #227: YETUS-1107. calcdiffs of cc raise false positive warnings.

Posted by GitBox <gi...@apache.org>.
iwasakims commented on a change in pull request #227:
URL: https://github.com/apache/yetus/pull/227#discussion_r736539423



##########
File path: precommit/src/main/shell/plugins.d/cc.sh
##########
@@ -68,5 +68,5 @@ function cc_logfilter
   declare output=$2
 
   #shellcheck disable=SC1117
-  "${GREP}" -i -E "^.*\.${CC_EXT_RE}\:[[:digit:]]*\:" "${input}" > "${output}"
+  "${GREP}" -i -E "^.*\.${CC_EXT_RE}\:[[:digit:]]*\:" "${input}" | sort > "${output}"

Review comment:
       I added maven_cc_logfilter similar to the maven_javac_logfilter. I think I got expected outcome when I tried modified maven.sh for Hadoop.
   
   ```
   $ ./dev-support/bin/test-patch --debug --project=hadoop --personality=$PWD/dev-support/bin/hadoop.sh --plugins=all --dirty-workspace --java-home=/usr/lib/jvm/java-1.8.0-openjdk --build-native=true /tmp/test.patch
   $ head -n 10 /tmp/yetus-17580.12468/patch-compile-cc-root.txt
   hadoop-common-project/hadoop-common/src/main/native/src/exception.c:121: warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
   hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:247:13: warning: ‘locks_setup’ defined but not used [-Wunused-function]
   hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:247:13: warning: ‘locks_setup’ defined but not used [-Wunused-function]
   hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:250:33: warning: implicit declaration of function ‘dlsym_CRYPTO_num_locks’; did you mean ‘dlsym_CRYPTO_malloc’? [-Wimplicit-function-declaration]
   hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:250:33: warning: implicit declaration of function ‘dlsym_CRYPTO_num_locks’; did you mean ‘dlsym_CRYPTO_malloc’? [-Wimplicit-function-declaration]
   hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:257:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_id_callback’; did you mean ‘CRYPTO_set_id_callback’? [-Wimplicit-function-declaration]
   hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:257:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_id_callback’; did you mean ‘CRYPTO_set_id_callback’? [-Wimplicit-function-declaration]
   hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:258:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_locking_callback’; did you mean ‘CRYPTO_set_locking_callback’? [-Wimplicit-function-declaration]
   hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:258:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_locking_callback’; did you mean ‘CRYPTO_set_locking_callback’? [-Wimplicit-function-declaration]
   hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:261:13: warning: ‘locks_cleanup’ defined but not used [-Wunused-function]
   ```
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [yetus] aw-was-here merged pull request #227: YETUS-1107. calcdiffs of cc raise false positive warnings.

Posted by GitBox <gi...@apache.org>.
aw-was-here merged pull request #227:
URL: https://github.com/apache/yetus/pull/227


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [yetus] iwasakims commented on pull request #227: YETUS-1107. calcdiffs of cc raise false positive warnings.

Posted by GitBox <gi...@apache.org>.
iwasakims commented on pull request #227:
URL: https://github.com/apache/yetus/pull/227#issuecomment-950869690


   The following example shows the outcome of the patch used for [hadoop-common](https://github.com/apache/hadoop/tree/trunk/hadoop-common-project/hadoop-common).
   
   ```
   $ mvn compile -Dtest=x -Pnative 2>&1 | grep -i -E "^.*\.(c|cc|cpp|cxx|c\+\+|h|hh|hpp|hxx|h\+\+)\:[[:digit:]]*\:" > /tmp/cc.log.1
   $ mvn compile -Dtest=x -Pnative 2>&1 | grep -i -E "^.*\.(c|cc|cpp|cxx|c\+\+|h|hh|hpp|hxx|h\+\+)\:[[:digit:]]*\:" > /tmp/cc.log.2
   
   
   $ diff /tmp/cc.log.1 /tmp/cc.log.2
   1a2,3
   > [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:250:33: warning: implicit declaration of function ‘dlsym_CRYPTO_num_locks’; did you mean ‘dlsym_CRYPTO_malloc’? [-Wimplicit-function-declaration]
   > [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:257:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_id_callback’; did you mean ‘CRYPTO_set_id_callback’? [-Wimplicit-function-declaration]
   6,7d7
   < [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:250:33: warning: implicit declaration of function ‘dlsym_CRYPTO_num_locks’; did you mean ‘dlsym_CRYPTO_malloc’? [-Wimplicit-function-declaration]
   < [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:257:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_id_callback’; did you mean ‘CRYPTO_set_id_callback’? [-Wimplicit-function-declaration]
   
   $ sort /tmp/cc.log.1 > /tmp/cc.log.sorted.1
   $ sort /tmp/cc.log.2 > /tmp/cc.log.sorted.2
   $ diff /tmp/cc.log.sorted.1 /tmp/cc.log.sorted.2
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [yetus] aw-was-here commented on a change in pull request #227: YETUS-1107. calcdiffs of cc raise false positive warnings.

Posted by GitBox <gi...@apache.org>.
aw-was-here commented on a change in pull request #227:
URL: https://github.com/apache/yetus/pull/227#discussion_r735643659



##########
File path: precommit/src/main/shell/plugins.d/cc.sh
##########
@@ -68,5 +68,5 @@ function cc_logfilter
   declare output=$2
 
   #shellcheck disable=SC1117
-  "${GREP}" -i -E "^.*\.${CC_EXT_RE}\:[[:digit:]]*\:" "${input}" > "${output}"
+  "${GREP}" -i -E "^.*\.${CC_EXT_RE}\:[[:digit:]]*\:" "${input}" | sort > "${output}"

Review comment:
       and, actually, there is yet another bug here...  ${BASEDIR} should get pulled out of the filename.  In the end, output should be:
   
   ```
   hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:257:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_id_callback’; did you mean ‘CRYPTO_set_id_callback’? [-Wimplicit-function-declaration]
   ```
   
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [yetus] aw-was-here commented on a change in pull request #227: YETUS-1107. calcdiffs of cc raise false positive warnings.

Posted by GitBox <gi...@apache.org>.
aw-was-here commented on a change in pull request #227:
URL: https://github.com/apache/yetus/pull/227#discussion_r735642175



##########
File path: precommit/src/main/shell/plugins.d/cc.sh
##########
@@ -68,5 +68,5 @@ function cc_logfilter
   declare output=$2
 
   #shellcheck disable=SC1117
-  "${GREP}" -i -E "^.*\.${CC_EXT_RE}\:[[:digit:]]*\:" "${input}" > "${output}"
+  "${GREP}" -i -E "^.*\.${CC_EXT_RE}\:[[:digit:]]*\:" "${input}" | sort > "${output}"

Review comment:
       There is still a bug here with maven+github. Github will be given a filename of '[WARNING] foo.c' which it won't know what to do with.  So there either needs to be a maven_cc_logfilter added or this filter changed to also strip out the extra '[ERROR] ' (note the space!) and '[WARNING] ' and whatever else maven adds.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [yetus] iwasakims edited a comment on pull request #227: YETUS-1107. calcdiffs of cc raise false positive warnings.

Posted by GitBox <gi...@apache.org>.
iwasakims edited a comment on pull request #227:
URL: https://github.com/apache/yetus/pull/227#issuecomment-950869690


   The following example shows the outcome of the patch used for [hadoop-common](https://github.com/apache/hadoop/tree/trunk/hadoop-common-project/hadoop-common).
   
   ```
   $ mvn compile -Dtest=x -Pnative 2>&1 | grep -i -E "^.*\.(c|cc|cpp|cxx|c\+\+|h|hh|hpp|hxx|h\+\+)\:[[:digit:]]*\:" > /tmp/cc.log.1
   $ mvn compile -Dtest=x -Pnative 2>&1 | grep -i -E "^.*\.(c|cc|cpp|cxx|c\+\+|h|hh|hpp|hxx|h\+\+)\:[[:digit:]]*\:" > /tmp/cc.log.2
   
   $ cat /tmp/cc.log.1
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:250:33: warning: implicit declaration of function ‘dlsym_CRYPTO_num_locks’; did you mean ‘dlsym_CRYPTO_malloc’? [-Wimplicit-function-declaration]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:257:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_id_callback’; did you mean ‘CRYPTO_set_id_callback’? [-Wimplicit-function-declaration]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:258:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_locking_callback’; did you mean ‘CRYPTO_set_locking_callback’? [-Wimplicit-function-declaration]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:261:13: warning: ‘locks_cleanup’ defined but not used [-Wunused-function]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:247:13: warning: ‘locks_setup’ defined but not used [-Wunused-function]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:250:33: warning: implicit declaration of function ‘dlsym_CRYPTO_num_locks’; did you mean ‘dlsym_CRYPTO_malloc’? [-Wimplicit-function-declaration]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:257:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_id_callback’; did you mean ‘CRYPTO_set_id_callback’? [-Wimplicit-function-declaration]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:258:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_locking_callback’; did you mean ‘CRYPTO_set_locking_callback’? [-Wimplicit-function-declaration]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:261:13: warning: ‘locks_cleanup’ defined but not used [-Wunused-function]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:247:13: warning: ‘locks_setup’ defined but not used [-Wunused-function]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/exception.c:121: warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
   [WARNING] /opt/rh/gcc-toolset-9/root/usr/bin/ld: /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/exception.c:118: warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead
   
   $ cat /tmp/cc.log.2
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:250:33: warning: implicit declaration of function ‘dlsym_CRYPTO_num_locks’; did you mean ‘dlsym_CRYPTO_malloc’? [-Wimplicit-function-declaration]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:250:33: warning: implicit declaration of function ‘dlsym_CRYPTO_num_locks’; did you mean ‘dlsym_CRYPTO_malloc’? [-Wimplicit-function-declaration]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:257:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_id_callback’; did you mean ‘CRYPTO_set_id_callback’? [-Wimplicit-function-declaration]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:257:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_id_callback’; did you mean ‘CRYPTO_set_id_callback’? [-Wimplicit-function-declaration]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:258:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_locking_callback’; did you mean ‘CRYPTO_set_locking_callback’? [-Wimplicit-function-declaration]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:261:13: warning: ‘locks_cleanup’ defined but not used [-Wunused-function]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:247:13: warning: ‘locks_setup’ defined but not used [-Wunused-function]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:258:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_locking_callback’; did you mean ‘CRYPTO_set_locking_callback’? [-Wimplicit-function-declaration]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:261:13: warning: ‘locks_cleanup’ defined but not used [-Wunused-function]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:247:13: warning: ‘locks_setup’ defined but not used [-Wunused-function]
   [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/exception.c:121: warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
   [WARNING] /opt/rh/gcc-toolset-9/root/usr/bin/ld: /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/exception.c:118: warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead
   
   
   $ diff /tmp/cc.log.1 /tmp/cc.log.2
   1a2,3
   > [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:250:33: warning: implicit declaration of function ‘dlsym_CRYPTO_num_locks’; did you mean ‘dlsym_CRYPTO_malloc’? [-Wimplicit-function-declaration]
   > [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:257:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_id_callback’; did you mean ‘CRYPTO_set_id_callback’? [-Wimplicit-function-declaration]
   6,7d7
   < [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:250:33: warning: implicit declaration of function ‘dlsym_CRYPTO_num_locks’; did you mean ‘dlsym_CRYPTO_malloc’? [-Wimplicit-function-declaration]
   < [WARNING] /home/centos/srcs/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:257:3: warning: implicit declaration of function ‘dlsym_CRYPTO_set_id_callback’; did you mean ‘CRYPTO_set_id_callback’? [-Wimplicit-function-declaration]
   
   $ sort /tmp/cc.log.1 > /tmp/cc.log.sorted.1
   $ sort /tmp/cc.log.2 > /tmp/cc.log.sorted.2
   $ diff /tmp/cc.log.sorted.1 /tmp/cc.log.sorted.2
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org