[Gluster-infra] Creation of Clang Job in Upstream Jenkins

Prasanna Kalever pkalever at redhat.com
Tue Mar 22 10:18:41 UTC 2016


Hello,

​W​
e have integrated clang checker job in local Jenkins 10.70.41.41, thanks to
Raghavendra Talur for sitting with me.

Can someone grant me the access to upstream Jenkins
​​
? so that I can replicate the clang job there.
​As part of this, I request to install '
clang-analyzer.noarch
​' package​
​ in all the slaves​
​
​.
​

I am thinking of using "Clang Analysis" as the label for this
​
build
​,
​ Is that okay?​


clang scripts will also be part of gluster repo, can be run  using 'make
clang-check'
http://review.gluster.org/#/c/11083/



Here is the log from the local Jenkins build:

...
08:49:04 | Analyzing api/src without commit ... |
08:49:04
08:49:04 scan-build: Using '/usr/bin/clang' for static analysis
08:49:04 make[1]: Entering directory
'/home/jenkins/root/workspace/Clang_check/api/src'
08:49:04   CC       glfs.lo
08:49:09   CC       glfs-mgmt.lo
08:49:10 glfs-mgmt.c:462:9: warning: Value stored to 'ret' is never read
08:49:10         ret = dict_allocate_and_serialize (dict,
&req.dict.dict_val,
08:49:10         ^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
08:49:10 glfs-mgmt.c:879:14: warning: Null pointer argument in call to
string comparison function
08:49:10         if (!strcmp (cmd_args->volfile_server_transport, "unix")) {
08:49:10              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
08:49:10 /usr/include/bits/string2.h:817:8: note: expanded from macro
'strcmp'
08:49:10             : __builtin_strcmp (s1, s2)))); })
08:49:10               ^~~~~~~~~~~~~~~~~~~~~~~~~
08:49:10 2 warnings generated.
08:49:10   CC       glfs-fops.lo
08:49:26   CC       glfs-resolve.lo
08:49:31 glfs-resolve.c:302:3: warning: Value stored to 'ret' is never read
08:49:31                 ret = -1;
08:49:31                 ^     ~~
08:49:31 glfs-resolve.c:1068:17: warning: Value stored to 'ret' is never
read
08:49:31                 ret = -1;
08:49:31                 ^     ~~
08:49:31 glfs-resolve.c:1084:17: warning: Value stored to 'ret' is never
read
08:49:31                 ret = glfs_create_object (&sym_loc,
&target_object);
08:49:31                 ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
08:49:31 3 warnings generated.
08:49:31   CC       glfs-handleops.lo
08:49:33 glfs-handleops.c:110:17: warning: Value stored to 'ret' is never
read
08:49:33                 ret = glfs_create_object (&loc, &object);
08:49:33                 ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
08:49:33 glfs-handleops.c:1352:17: warning: Value stored to 'ret' is never
read
08:49:33                 ret = -1;
08:49:33                 ^     ~~
08:49:33 2 warnings generated.
08:49:33   CCLD     libgfapi.la
08:49:33   CC       glfs-master.lo
08:49:34   CCLD     api.la
08:49:34 make[1]: Leaving directory
'/home/jenkins/root/workspace/Clang_check/api/src'
08:49:34 scan-build: 7 bugs found.
08:49:34 scan-build: Run 'scan-view
/home/jenkins/root/workspace/Clang_check/baseline/results/api_src/2016-03-22-084904-2127-1'
to examine bug reports.
08:49:34 Applying: WIP: This is a test for clang-check
08:49:34
08:49:34 | Analyzing api/src with commit ... |
08:49:34
08:49:34 scan-build: Using '/usr/bin/clang' for static analysis
08:49:34 make[1]: Entering directory
'/home/jenkins/root/workspace/Clang_check/api/src'
08:49:34   CC       glfs.lo
08:49:34 glfs.c: In function ‘pub_glfs_fini’:
08:49:34 glfs.c:1045:28: warning: unused variable ‘rtalur_dummy_var’
[-Wunused-variable]
08:49:34          int                rtalur_dummy_var = -1;
08:49:34                             ^
08:49:39   CC       glfs-mgmt.lo
08:49:40 glfs-mgmt.c:462:9: warning: Value stored to 'ret' is never read
08:49:40         ret = dict_allocate_and_serialize (dict,
&req.dict.dict_val,
08:49:40         ^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
08:49:40 glfs-mgmt.c:879:14: warning: Null pointer argument in call to
string comparison function
08:49:40         if (!strcmp (cmd_args->volfile_server_transport, "unix")) {
08:49:40              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
08:49:40 /usr/include/bits/string2.h:817:8: note: expanded from macro
'strcmp'
08:49:40             : __builtin_strcmp (s1, s2)))); })
08:49:40               ^~~~~~~~~~~~~~~~~~~~~~~~~
08:49:40 2 warnings generated.
08:49:40   CC       glfs-fops.lo
08:49:56   CC       glfs-resolve.lo
08:50:01 glfs-resolve.c:302:3: warning: Value stored to 'ret' is never read
08:50:01                 ret = -1;
08:50:01                 ^     ~~
08:50:01 glfs-resolve.c:1068:17: warning: Value stored to 'ret' is never
read
08:50:01                 ret = -1;
08:50:01                 ^     ~~
08:50:01 glfs-resolve.c:1084:17: warning: Value stored to 'ret' is never
read
08:50:01                 ret = glfs_create_object (&sym_loc,
&target_object);
08:50:01                 ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
08:50:01 3 warnings generated.
08:50:01   CC       glfs-handleops.lo
08:50:04 glfs-handleops.c:110:17: warning: Value stored to 'ret' is never
read
08:50:04                 ret = glfs_create_object (&loc, &object);
08:50:04                 ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
08:50:04 glfs-handleops.c:1352:17: warning: Value stored to 'ret' is never
read
08:50:04                 ret = -1;
08:50:04                 ^     ~~
08:50:04 2 warnings generated.
08:50:04   CCLD     libgfapi.la
08:50:04   CC       glfs-master.lo
08:50:05   CCLD     api.la
08:50:05 make[1]: Leaving directory
'/home/jenkins/root/workspace/Clang_check/api/src'
08:50:05 scan-build: 7 bugs found.
08:50:05 scan-build: Run 'scan-view
/home/jenkins/root/workspace/Clang_check/target/results/api_src/2016-03-22-084934-2814-1'
to examine bug reports.
08:50:05 TERM environment variable not set.
08:50:05
08:50:05 BASELINE BUGS LIST (before applying patch):
08:50:05 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
08:50:05 Unix API --> 1
08:50:05 All Bugs --> 7
08:50:05 Dead assignment --> 6
08:50:05
08:50:05 TARGET BUGS LIST (after applying patch):
08:50:05 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
08:50:05 Unix API --> 1
08:50:05 All Bugs --> 7
08:50:05 Dead assignment --> 6
08:50:05
08:50:05 SUMMARY OF CLANG-ANALYZER:
08:50:05 ~~~~~~~~~~~~~~~~~~~~~~~~~~
08:50:05
08:50:05 Patch Value given by Clang analyzer '+1'
08:50:05
08:50:05
08:50:05 Explore complete results at:
08:50:05
/home/jenkins/root/workspace/Clang_check/baseline/results/api_src/2016-03-22-084904-2127-1/index.html
08:50:05
/home/jenkins/root/workspace/Clang_check/target/results/api_src/2016-03-22-084934-2814-1/index.html
08:50:05
08:50:05 ================= Done with Clang Analysis =================
08:50:05
08:50:05 + RET=0
08:50:05 + '[' 0 '!=' 0 ']'
08:50:05 + set +x
08:50:05
08:50:05 Recording test results
08:50:05 None of the test reports contained any result
08:50:05 Finished: SUCCESS


--
Prasanna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gluster.org/pipermail/gluster-infra/attachments/20160322/336fec6f/attachment.html>


More information about the Gluster-infra mailing list