ehlo,
The simple patch is attached. The side effect of this patch is reduction time spent in the scan-make-tests from 9 minutes to 4 minutes.
LS
On (09/10/14 10:01), Lukas Slebodnik wrote:
ehlo,
The simple patch is attached. The side effect of this patch is reduction time spent in the scan-make-tests from 9 minutes to 4 minutes.
LS
From c0beec11cb406b68fed8a3367795bafdd108aefb Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik lslebodn@redhat.com Date: Thu, 9 Oct 2014 09:50:50 +0200 Subject: [PATCH] CI: Don't execute static analysis on tests.
clang does not understand semantic of asserts from libraries.
Example of false positevive. 121 data->dirp = opendir(TESTS_PATH); // Value assigned to field 'dirp' 122 if (data->dirp == NULL) { //Assuming pointer value is null //Taking true branch 123 int err = errno; 124 fprintf(stderr, "Could not open directory:'%s' [%s]\n", 125 TESTS_PATH, strerror(err)); 126 } 127 assert_non_null(data->dirp); 129 data->dir_fd = dirfd(data->dirp); //Null pointer passed as an argument to a 'nonnull' parameter
Execution of tests would fail on line 127.
contrib/ci/run | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/contrib/ci/run b/contrib/ci/run index 00cf95094e62a16dfa60b5365ed4373f01bfdf51..cd5897c66bfca15f9ed87298affc147bc4500a58 100755 --- a/contrib/ci/run +++ b/contrib/ci/run @@ -255,13 +255,11 @@ function build_coverage() "${CONFIGURE_ARG_LIST[@]}" \ --with-test-dir="$test_dir"
- # Build everything, including tests
- # Not building "tests" due to https://fedorahosted.org/sssd/ticket/2350
- stage scan-make-tests scan_build_single \
- stage scan-make scan_build_single \ "$scan_report_dir" \ -plist-html \ --html-title="sssd - scan-build report" \
make-check-wrap -j $CPU_NUM check -- true
make -j $CPU_NUM all
^^^ I can call make with V=0 if we decide to do it.
LS
On 10/09/2014 01:05 PM, Lukas Slebodnik wrote:
On (09/10/14 10:01), Lukas Slebodnik wrote:
make -j $CPU_NUM all
^^^ I can call make with V=0 if we decide to do it.
I think it would be irrelevant to this patch. Let's add it to whatever solution we implement for enforcing Clang check.
Nick
On 10/09/2014 11:01 AM, Lukas Slebodnik wrote:
ehlo,
The simple patch is attached. The side effect of this patch is reduction time spent in the scan-make-tests from 9 minutes to 4 minutes.
ACK
It looks fine, but I haven't tested it. It would be nice to have a link to CI test results to go with the patch.
Can we work towards fixing the test frameworks so Clang understands what's going on?
Nick
On 10/10/2014 12:06 PM, Nikolai Kondrashov wrote:
On 10/09/2014 11:01 AM, Lukas Slebodnik wrote:
ehlo,
The simple patch is attached. The side effect of this patch is reduction time spent in the scan-make-tests from 9 minutes to 4 minutes.
Actually, there should be no reduction in overall run time, as tests will be analyzed when they're built in the following "make-check" stage.
This does reduce number of warnings in the report, though.
Nick
sssd-devel@lists.fedorahosted.org