Changeset 474


Ignore:
Timestamp:
May 30, 2015, 7:57:16 PM (5 years ago)
Author:
katerina
Message:

Fix for ticket #372 (Replace obsolete smatch by clang in test suite).

Location:
trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/aclocal.m4

    r441 r474  
    12241224])
    12251225
     1226AC_DEFUN([GCC_FLAG_CHECK],[
     1227  AC_LANG_ASSERT(C)
     1228  if test "X$CC" != "X"; then
     1229     AC_MSG_CHECKING([whether ${CC} accepts $1])
     1230dnl      flag_check_cv,
     1231     saved_cflags="$CFLAGS"
     1232     CFLAGS="$CFLAGS -Werror $1"
     1233     AC_TRY_COMPILE(,, flag_check_cv=yes, flag_check_cv=no)
     1234     CFLAGS="$saved_cflags"
     1235
     1236     if test $flag_check_cv = yes; then
     1237        CFLAGS="$CFLAGS $1"
     1238        AC_MSG_RESULT([yes])
     1239     else
     1240        AC_MSG_RESULT([no])
     1241     fi
     1242  fi
     1243])
     1244
    12261245AC_DEFUN([GCC_WEMPTY_BODY],[
    12271246  AC_LANG_ASSERT(C)
    12281247  if test "X$CC" != "X"; then
    1229     AC_CACHE_CHECK([whether ${CC} accepts -Wno-empty-body],
    1230       empty_cv_body,
     1248    AC_CHECK([whether ${CC} accepts -Wno-empty-body],
     1249dnl      empty_cv_body,
    12311250      [empty_body_cflags="$CFLAGS"
    1232        CFLAGS="$CFLAGS -Wno-empty-body"
     1251       CFLAGS="$CFLAGS -Werror -Wno-empty-body"
    12331252       AC_TRY_COMPILE(,, empty_cv_body=yes, empty_cv_body=no)
    12341253       CFLAGS="$empty_body_cflags"
     
    13801399  #
    13811400  if test "x$GCC" = xyes; then
    1382      case "$host_os" in
    1383         *linux*)
    1384         SAMHAIN_X86_64
    1385         ;;
    1386         *bsd*)
    1387         SAMHAIN_X86_64
    1388         ;;
    1389         *)
    1390         SAMHAIN_X86_64
    1391         ;;
    1392       esac     
     1401     $CC -E -dM - < /dev/null | egrep '__clang__' >/dev/null 2>&1
     1402     if ! test $? = 0; then
     1403         case "$host_os" in
     1404             *linux*)
     1405             SAMHAIN_X86_64
     1406             ;;
     1407             *bsd*)
     1408             SAMHAIN_X86_64
     1409             ;;
     1410             *)
     1411             SAMHAIN_X86_64
     1412             ;;
     1413         esac
     1414     fi
    13931415  fi
    13941416fi
  • trunk/configure.ac

    r471 r474  
    17561756   if test -z "`echo "$CFLAGS" | grep "\-fno\-strength\-reduce" 2> /dev/null`"
    17571757   then
    1758         CFLAGS="$CFLAGS -fno-strength-reduce"
     1758        GCC_FLAG_CHECK([-fno-strength-reduce])
    17591759   fi
    17601760  fi
     
    17641764   if test -z "`echo "$CFLAGS" | grep "\-fno\-omit\-frame\-pointer" 2> /dev/null`"
    17651765   then
    1766         CFLAGS="$CFLAGS -fno-omit-frame-pointer"
     1766        GCC_FLAG_CHECK([-fno-omit-frame-pointer])
    17671767   fi
    17681768  fi
     
    17731773dnl Suppresses warnings from glibc pthread_cleanup_pop
    17741774dnl
    1775 GCC_WEMPTY_BODY
     1775GCC_FLAG_CHECK([-Wno-empty-body])
     1776
     1777dnl This one is for clang
     1778dnl
     1779GCC_FLAG_CHECK([-Wno-invalid-source-encoding])
     1780
    17761781
    17771782AC_MSG_CHECKING([which random module to use])
  • trunk/docs/Changelog

    r473 r474  
    11
     2        * Modify testcompile.sh to remove 'smatch' and use 'clang'
     3          instead.
     4        * Fix compile problems with clang.
    25        * Modify testcompile.sh to remove 'uno' and use 'cppcheck'
    36          for static checking
  • trunk/src/cutest_sh_unix.c

    r237 r474  
    4242      CuAssertPtrNotNull(tc, buf);
    4343#ifndef USE_SYSTEM_MALLOC
     44#ifndef __clang__
    4445      CuAssertIntEquals (tc, malloc_count, (i_malloc + 1));
     46#endif
    4547#endif
    4648      free(buf);
  • trunk/src/sh_err_console.c

    r379 r474  
    328328  /* --- daemon && initialized ---
    329329   */
    330   if ( (OnlyStderr == S_FALSE) )
     330  if ( OnlyStderr == S_FALSE )
    331331    {
    332332      fd[0] = open ( sh.srvcons.name, O_WRONLY|O_APPEND|O_NOCTTY|O_NONBLOCK);
     
    340340      }
    341341
    342       if (sh.srvcons.alt != NULL && sh.srvcons.alt[0] != '\0')
     342      if (sh.srvcons.alt[0] != '\0')
    343343        {
    344344          fd[1] = open (sh.srvcons.alt, O_WRONLY|O_APPEND|O_NOCTTY|O_NONBLOCK);
  • trunk/src/sh_gpg.c

    r454 r474  
    419419  /* use homedir of effective user
    420420   */
    421   if (sh.effective.home != NULL)
    422     {
    423       len = sl_strlen(sh.effective.home) + 6;
    424       envp[0] = calloc(1, len); /* free() ok   */
    425       if (envp[0] != NULL)
     421  len = sl_strlen(sh.effective.home) + 6;
     422  envp[0] = calloc(1, len); /* free() ok   */
     423  if (envp[0] != NULL)
    426424        sl_snprintf (envp[0], len, _("HOME=%s"), sh.effective.home);
    427       envp[1] = NULL;
    428     }
    429   else
    430     {
    431       envp[0] = NULL;
    432     }
     425  envp[1] = NULL;
    433426
    434427  /* Create the pipe
  • trunk/src/sh_hash.c

    r463 r474  
    17511751    }
    17521752         
    1753   if (buf != NULL && buf->fullpath != NULL) {
     1753  if (buf != NULL) {
    17541754
    17551755    old_len = sl_strlen(buf->fullpath);
     
    30993099        theFile->fullpath, fileHash, p->theFile.checksum));
    31003100
    3101   if ( (fileHash != NULL) && (p->theFile.checksum != NULL)   &&
     3101  if ( (fileHash != NULL) &&
    31023102       (strncmp (fileHash, p->theFile.checksum, KEY_LEN) != 0) &&
    31033103       (theFile->check_mask & MODI_CHK) != 0)
  • trunk/src/sh_inotify.c

    r465 r474  
    2222#if defined(HAVE_SYS_INOTIFY_H)
    2323
    24 #if defined(GCC_VERSION_MAJOR)
     24#if defined(GCC_VERSION_MAJOR) && !defined(__clang__)
    2525#if (GCC_VERSION_MAJOR > 4) || ((GCC_VERSION_MAJOR == 4) && (GCC_VERSION_MINOR > 8))
    2626#pragma GCC diagnostic ignored "-Wclobbered"
  • trunk/src/sh_nmail.c

    r465 r474  
    2424#endif
    2525
    26 #if defined(GCC_VERSION_MAJOR)
     26#if defined(GCC_VERSION_MAJOR) && !defined(__clang__)
    2727#if (GCC_VERSION_MAJOR > 4) || ((GCC_VERSION_MAJOR == 4) && (GCC_VERSION_MINOR > 8))
    2828#pragma GCC diagnostic ignored "-Wclobbered"
  • trunk/src/sh_srp.c

    r473 r474  
    8686int    siz_str_internal = 0;
    8787
    88 inline
     88static
    8989char * big_string (bignum * a, int base)
    9090{
  • trunk/src/sh_suidchk.c

    r458 r474  
    203203  ShSuidchkSeverity = SH_ERR_SEVERE;
    204204  if (ShSuidchkExclude != NULL)
    205     sh_suid_exclude_free(ShSuidchkExclude);
     205    sh_suid_exclude_free();
    206206
    207207  FileLimNow        = 0;
  • trunk/src/sh_tiger1_64.c

    r451 r474  
    55#include "config_xor.h"
    66
     7#if defined(__clang__)
     8#undef TIGER_OPT_ASM
     9#endif
     10
    711#if defined(TIGER_64_BIT)
    812
    9 #if defined(GCC_VERSION_MAJOR)
     13#if defined(GCC_VERSION_MAJOR) && !defined(__clang__)
    1014#if ((GCC_VERSION_MAJOR == 4) && (GCC_VERSION_MINOR > 6))
    1115#pragma GCC optimize ("O1")
    1216#endif
    1317#endif
     18
    1419
    1520/* #if defined(HAVE_LONG_64) || defined(HAVE_LONG_LONG_64) */
  • trunk/src/sh_unix.c

    r473 r474  
    972972
    973973  SL_ENTER(_("sh_unix_self_check"));
    974   if (sh.exec.path == NULL || sh.exec.path[0] == '\0')
     974  if (sh.exec.path[0] == '\0')
    975975    SL_RETURN((0), _("sh_unix_self_check"));
    976976
  • trunk/src/sh_utmp.c

    r383 r474  
    319319  SL_ENTER(_("sh_utmp_setutent"));
    320320
    321   ASSERT((sh_utmppath != NULL), _("sh_utmppath != NULL"));
    322 
    323   if (sh_utmppath == NULL)
    324     SL_RET0(_("sh_utmp_setutent"));
    325 
    326321  if (sh_utmpfile == NULL)
    327322    {
  • trunk/src/trustfile.c

    r454 r474  
    211211#define SL_ALWAYS_TRUSTED  0
    212212#endif
    213 static uid_t test_rootonly[] = { SL_ALWAYS_TRUSTED };
     213uid_t test_rootonly[] = { SL_ALWAYS_TRUSTED };
    214214
    215215#define tf_uid_neg ((uid_t)-1)
  • trunk/src/zAVLTree.c

    r465 r474  
    3939  return (zAVLKey) arg;
    4040}
     41
    4142static char * dummy_zfree_string;
     43#ifdef __clang__
     44static char * dummy_zfree_str;
     45#endif
     46
    4247static void zfree_string (void * inptr)
    4348{
     49#ifdef __clang__
     50  dummy_zfree_str = (char *) inptr;
     51#else
    4452  char * str = (char *) inptr;
     53#endif
    4554
    4655  /* Take the address to circumvent gcc 4.9 optimizer bug */
    4756  dummy_zfree_string = (char *) &inptr;
    4857
     58#ifdef __clang__
     59  dummy_zfree_str[0] = '\0';
     60  free (dummy_zfree_str);
     61#else
    4962  str[0] = '\0';
    5063  free (inptr);
     64#endif
    5165  return;
    5266}
     
    537551  if (avlnode->right)
    538552    zAVLFreeBranch(avlnode->right, freeitem);
    539   if (freeitem)
     553  if (freeitem) {
    540554    freeitem(avlnode->item);
     555    avlnode->item = NULL;
     556  }
    541557  free(avlnode);
    542558}
  • trunk/test/testcompile.sh

    r473 r474  
    2020#
    2121
    22 # dnmalloc + cppcheck + flawfinder + (38 * 2)
     22# dnmalloc + cppcheck + flawfinder + (38 * 2) - 8
    2323MAXTEST=79; export MAXTEST
    2424
     
    8585run_cppcheck ()
    8686{
    87     if [ -z "$doall" ]; then
    88         [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "check w/cppcheck";
    89         return 0
    90     fi
    9187    #
    9288    CPC=`find_path cppcheck`
     
    124120}
    125121
    126 run_smatch ()
     122run_clang ()
    127123{
    128124    export CDIR=`pwd`;
    129125
    130126    if [ -z "$doall" ]; then
    131         [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (smatch)";
     127        [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (clang)";
    132128        return 0
    133129    fi
    134130
    135     if [ ! -f "./x_samhain.c.sm" ]; then
    136         [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (skip sm)";
     131    CLANGPATH=`find_path clang`
     132    if [ -n "$CLANGPATH" ]; then
     133        CLANG_CC="$CLANGPATH"; export CLANG_CC
     134    else
     135        [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (clang)";
    137136        return 0
    138137    fi
    139138
    140     if [ "x$3" = "xdebug" ]; then memcheck=debug; else memcheck=simple; fi
    141     if [ -f ../../static/sm_scripts/smatch.pm ]; then
    142         (
    143             cd ../../static/sm_scripts;
    144            
    145             for i in ${CDIR}/*.c.sm ; do
    146                 # echo $i;
    147                 cat $i | ./unreached_code.pl | grep -v sh_threaded_module_run;
    148                 cat $i | ./ampersand_missing.sh;
    149                 cat $i | ./eqeq.pl;
    150                 cat $i | ./for_bounds.pl;    # doesn't work?
    151                 cat $i | ./unchecked_returns.pl;
    152                 cat $i | ./uninitialized.pl; # doesn't work?
    153 
    154                 # from http://people.redhat.com/mstefani/wine/smatch/
    155                 if [ -f ./while_for_check.pl ]; then
    156                     cat $i | ./while_for_check.pl; # works
    157                 fi
    158                 # --> end wine <--
    159 
    160                 # samhain specific modifications (list of free/malloc funcs)
    161                 # doesn't seem to find anything useful
    162                 if [ $memcheck = xsimple ]; then
    163                     if [ -f ./samhain_unfree.pl ]; then
    164                         cat $i | ./samhain_unfree.pl | \
    165                             egrep -v 'x_cutest_.*Test_' | \
    166                             egrep -v 'x_sh_unix.c .... .... sh_unix_copyenv';
    167                     fi
    168                 fi
    169                 if [ $memcheck = xdebug ]; then
    170                     if [ -f ./samhain_unfree_debug.pl ]; then
    171                         cat $i | ./samhain_unfree_debug.pl | \
    172                             egrep -v 'x_cutest_.*Test_' | \
    173                             egrep -v 'x_sh_unix.c .... .... sh_unix_copyenv';
    174                     fi
    175                 fi
    176                 # --> end samhain specific <--
    177 
    178                 echo malloc >  list_null_funcs_uniq;
    179                 echo getenv >> list_null_funcs_uniq;
    180                 cat $i | ./deference_check.pl |\
    181                      egrep -v 'x_trustfile.c ... ... sl_trustfile' | \
    182                      egrep -v 'x_sh_mem.c ';
    183                 rm -f list_null_funcs_uniq;
    184                 # rm -f $i
    185             done
    186         ) >test_log_smatch 2>&1
    187         if [ -f test_log_smatch ]; then
    188             lines=`cat test_log_smatch | wc -l`
    189             if [ $lines -ne 0 ]; then
    190                 cat test_log_smatch
    191                 rm -f test_log_smatch
    192                 [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "$TEST (smatch)";
    193                 return 1
    194             fi
    195         fi
    196         [ -z "$quiet" ] && log_ok $2 ${MAXTEST} "$TEST (smatch)";
    197         return 0
    198     fi
    199     [ -z "$quiet" ] && log_skip $2 ${MAXTEST} "$TEST (smatch)";
    200     return 0
     139    SAVE_TEST="$TEST"
     140    TEST="$TEST (clang)"
     141    testmake $1 $2
     142    retval=$?
     143    CLANG_CC=""; export CLANG_CC
     144    TEST="$SAVE_TEST"
     145    return $retval
    201146}
    202147
    203148testmake ()
    204149{
    205 
    206150        fail=0
    207151        #
     
    219163                [ -z "$verbose" ]     ||  log_msg_ok  "configure...  $TEST";
    220164                $MAKE clean > /dev/null 2>> test_log
    221                 $MAKE ${SMATCH} cutest > /dev/null 2>> test_log
     165                if [ -z "$CLANG_CC" ]; then
     166                    $MAKE cutest > /dev/null 2>> test_log
     167                else
     168                    sed --in-place 's/-Wno-empty-body/-Wno-empty-body -Wno-invalid-source-encoding/g' Makefile
     169                    sed --in-place 's/-fno-strength-reduce//g' Makefile
     170                    $MAKE -e CC=$CLANG_CC -e BUILD_CC=$CLANG_CC cutest > /dev/null 2>> test_log
     171                fi
    222172                if test x$? = x0; then
    223173                    [ -z "$verbose" ] || log_msg_ok   "make cutest... $TEST";
     
    247197{
    248198        log_start "COMPILE"
    249 
    250         if [ "x$doall" = xon ]; then
    251             uname -a | grep x86_64 >/dev/null
    252             if [ $? -ne 0 ]; then
    253                 if [ -f /usr/local/gcc-smatch/bin/gcc ]; then  # FIXME
    254                     SAVE_CC="${CC}"
    255                     SMATCH="DBGDEF=--smatch"; export SMATCH
    256                     SAVE_SMATCH="${SMATCH}"; export SAVE_SMATCH
    257                     CC="/usr/local/gcc-smatch/bin/gcc"; export CC
    258                     SMATCH_CC="${CC}"
    259                 fi
    260             fi
    261         fi
    262199
    263200        num=0
     
    342279        testmake $? $num || let "numfail = numfail + 1"  >/dev/null
    343280        let "num = num + 1" >/dev/null
    344         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     281        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    345282
    346283        #
     
    353290        fi
    354291        #
    355         [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
    356         #
    357292        ${TOP_SRCDIR}/configure --quiet  --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test  --enable-static --enable-suidcheck --enable-process-check ${C_LOGFILE} > /dev/null 2>> test_log
    358293        #
     
    360295        testmake $? $num || let "numfail = numfail + 1"  >/dev/null
    361296        let "num = num + 1" >/dev/null
    362         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
    363         #
    364         [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
     297        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    365298        #
    366299        # test standalone compilation
     
    377310        testmake $? $num || let "numfail = numfail + 1"  >/dev/null
    378311        let "num = num + 1" >/dev/null
    379         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     312        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    380313
    381314        #
     
    388321        fi
    389322        #
    390         [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
    391         #
    392323        ${TOP_SRCDIR}/configure --quiet  --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test  --enable-process-check --enable-port-check --enable-static > /dev/null 2>> test_log
    393324        #
     
    395326        testmake $? $num || let "numfail = numfail + 1"  >/dev/null
    396327        let "num = num + 1" >/dev/null
    397         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
    398         #
    399         [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
     328        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    400329        #
    401330        # test standalone compilation
     
    412341        testmake $? $num || let "numfail = numfail + 1"  >/dev/null
    413342        let "num = num + 1" >/dev/null
    414         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     343        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    415344
    416345        #
     
    428357        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    429358        let "num = num + 1" >/dev/null
    430         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     359        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    431360
    432361
     
    445374        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    446375        let "num = num + 1" >/dev/null
    447         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     376        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    448377
    449378        #
     
    461390        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    462391        let "num = num + 1" >/dev/null
    463         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     392        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    464393
    465394        #
     
    477406        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    478407        let "num = num + 1" >/dev/null
    479         run_smatch $? $num debug || let "numfail = numfail + 1"  >/dev/null
     408        run_clang $? $num debug || let "numfail = numfail + 1"  >/dev/null
    480409
    481410        #
     
    500429            testmake $? $num || let "numfail = numfail + 1" >/dev/null
    501430            let "num = num + 1" >/dev/null
    502             run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     431            run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    503432        fi
    504433
     
    517446        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    518447        let "num = num + 1" >/dev/null
    519         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     448        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    520449
    521450        #
     
    533462        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    534463        let "num = num + 1" >/dev/null
    535         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     464        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    536465
    537466        #
     
    549478        testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
    550479        let "num = num + 1" >/dev/null
    551         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     480        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    552481
    553482        #
     
    565494        testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
    566495        let "num = num + 1" >/dev/null
    567         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     496        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    568497
    569498        #
     
    581510        testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
    582511        let "num = num + 1" >/dev/null
    583         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     512        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    584513
    585514        #
     
    597526        testmake $? $num "skip" || let "numfail = numfail + 1" >/dev/null
    598527        let "num = num + 1" >/dev/null
    599         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     528        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    600529
    601530        #
     
    613542        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    614543        let "num = num + 1" >/dev/null
    615         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     544        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    616545
    617546        #
     
    629558        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    630559        let "num = num + 1" >/dev/null
    631         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     560        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    632561
    633562        # echo; echo "${S}__ TEST CLIENT/SERVER __${E}"; echo;
     
    647576        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    648577        let "num = num + 1" >/dev/null
    649         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     578        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    650579       
    651580        if test -r "Makefile"; then
     
    658587        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    659588        let "num = num + 1" >/dev/null
    660         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     589        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    661590
    662591        #
     
    685614            testmake $? $num || let "numfail = numfail + 1" >/dev/null
    686615            let "num = num + 1" >/dev/null
    687             run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     616            run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    688617           
    689618            if test -r "Makefile"; then
     
    696625            testmake $? $num || let "numfail = numfail + 1" >/dev/null
    697626            let "num = num + 1" >/dev/null
    698             run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     627            run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    699628            #
    700629        fi
     
    709638        fi
    710639        #
    711         [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; SMATCH=""; export SMATCH; }
    712         #
    713640        ${TOP_SRCDIR}/configure --quiet --enable-network=client  --enable-static --enable-srp --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test   --with-timeserver=127.0.0.1 ${C_LOGFILE} > /dev/null 2>> test_log   
    714641        #
     
    716643        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    717644        let "num = num + 1" >/dev/null
    718         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     645        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    719646       
    720647        if test -r "Makefile"; then
     
    727654        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    728655        let "num = num + 1" >/dev/null
    729         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
    730         #
    731         [ -z "${SMATCH_CC}" ] || { CC="${SMATCH_CC}"; export CC; SMATCH="${SAVE_SMATCH}"; export SMATCH; }
     656        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    732657        #
    733658        # test c/s compilation w/ gpg
     
    755680            testmake $? $num || let "numfail = numfail + 1" >/dev/null
    756681            let "num = num + 1" >/dev/null
    757             run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     682            run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    758683            #
    759684            if test -r "Makefile"; then
     
    766691            testmake $? $num || let "numfail = numfail + 1" >/dev/null
    767692            let "num = num + 1" >/dev/null
    768             run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     693            run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    769694        fi
    770695
     
    784709        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    785710        let "num = num + 1" >/dev/null
    786         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     711        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    787712        #
    788713        if test -r "Makefile"; then
     
    795720        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    796721        let "num = num + 1" >/dev/null
    797         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     722        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    798723
    799724        #
     
    811736        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    812737        let "num = num + 1" >/dev/null
    813         run_smatch $? $num debug || let "numfail = numfail + 1"  >/dev/null
     738        run_clang $? $num debug || let "numfail = numfail + 1"  >/dev/null
    814739        #
    815740        if test -r "Makefile"; then
     
    822747        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    823748        let "num = num + 1" >/dev/null
    824         run_smatch $? $num debug || let "numfail = numfail + 1"  >/dev/null
     749        run_clang $? $num debug || let "numfail = numfail + 1"  >/dev/null
    825750
    826751        #
     
    838763        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    839764        let "num = num + 1" >/dev/null
    840         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     765        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    841766        #
    842767        if test -r "Makefile"; then
     
    849774        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    850775        let "num = num + 1" >/dev/null
    851         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     776        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    852777
    853778        #
     
    865790        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    866791        let "num = num + 1" >/dev/null
    867         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     792        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    868793        #
    869794        if test -r "Makefile"; then
     
    876801        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    877802        let "num = num + 1" >/dev/null
    878         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     803        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    879804
    880805        #
     
    892817        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    893818        let "num = num + 1" >/dev/null
    894         run_smatch $? $num debug || let "numfail = numfail + 1"  >/dev/null
     819        run_clang $? $num debug || let "numfail = numfail + 1"  >/dev/null
    895820        #
    896821        if test -r "Makefile"; then
     
    903828        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    904829        let "num = num + 1" >/dev/null
    905         run_smatch $? $num debug || let "numfail = numfail + 1"  >/dev/null
     830        run_clang $? $num debug || let "numfail = numfail + 1"  >/dev/null
    906831
    907832        #
     
    919844        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    920845        let "num = num + 1" >/dev/null
    921         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
     846        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    922847        #
    923848        if test -r "Makefile"; then
     
    930855        testmake $? $num || let "numfail = numfail + 1" >/dev/null
    931856        let "num = num + 1" >/dev/null
    932         run_smatch $? $num || let "numfail = numfail + 1"  >/dev/null
    933 
    934         [ -z "${SMATCH}" ] || { CC="${SAVE_CC}"; export CC; }
     857        run_clang $? $num || let "numfail = numfail + 1"  >/dev/null
    935858
    936859        log_end "COMPILE"
Note: See TracChangeset for help on using the changeset viewer.