]> andersk Git - splint.git/blobdiff - test/Makefile.am
Fixed processing of multi-dimensional arrays.
[splint.git] / test / Makefile.am
index abe2d7167d61aef6a7c013b15fac6242902e3a9f..3e49407681a69ca02e264cbbc99d15116de5bc15 100644 (file)
@@ -13,6 +13,7 @@ DIFFFLAGS =
 
 ## Set up the splint commands
 
+#SPLINT    =  valgrind --leak-resolution=high --num-callers=20 --show-reachable=no --leak-check=no $(top_builddir)/src/splint$(EXEEXT)
 SPLINT    =  $(top_builddir)/src/splint$(EXEEXT)
 
 ### These are shell-specific
@@ -20,8 +21,8 @@ SPLINT    =  $(top_builddir)/src/splint$(EXEEXT)
 ## unexport LCLIMPORTDIR
 
 ### This is horrible!  Can't we make top_builddir absolute?
+#SPLINTNEST = valgrind --leak-resolution=high --num-callers=20 --show-reachable=no --leak-check=no ../$(top_builddir)/src/splint$(EXEEXT)
 SPLINTNEST = ../$(top_builddir)/src/splint$(EXEEXT)
-
 SPLINTPNEST = @$(SPLINTNEST) -nof
 SPLINTP   = @$(SPLINT) -nof
 
@@ -40,15 +41,15 @@ SPLINTRNEST   = $(SPLINTRNNEST) -exportlocal +debugfcnconstraint
 UNITTESTS = \
   help \
   abstptr abstract alias alttypes ansireserved argorder \
-  args arraydims arrayinit arraylit blocks break cases cast charlit clauses commentchar compdestroy \
+  args arraydims arrayinit arraylit blocks break cases cast chararraylit charlit clauses commentchar compdestroy \
   compoundliterals compoundstmt constannot controldepth csyntax czechnames czechoslovaknames deadparam \
   decl divzero enum enumtag exports external fields flags forbody format freearray \
-  funcpointer functionmacro glob globals impabstract info init inparam internal iter keep libs \
-  linked lintcomments list loopexec looptesteffect \
-  macros macrosef merge mergenull modifies modtest moduncon \
-  mongoincludes mystrncat noeffect null observer oldstyle outglob outparam \
+  funcpointer functionmacro glob globals impabstract info init innerarray inparam internal iter keep libs \
+  linked lintcomments list longint loopexec looptesteffect \
+  macros macrosef malloc merge mergenull modifies modtest moduncon \
+  mongoincludes mystrncat noeffect null nullret nullassign numabstract observer oldstyle outglob outparam \
   parentype postnotnull preds prefixes printflike rc refcounts release repexpose \
-  returned sharing shifts slovaknames \
+  returned russian sharing shifts sizesigns slovaknames \
   specclauses \
   special stack staticarray strings \
   stringliteral \
@@ -59,7 +60,7 @@ UNITEXPECTS = $(addsuffix .expect, $(UNITTESTS))
 
 SUBDIRTESTS = metastate mergestate tainted fileio \
    simplebufferConstraintTests moreBufferTests moreBufferTests2 globalbufferannotation \
-   maxset strchr for manual
+   maxset strchr sizeoftest for manual
 
 ### warnuse doesn't work yet!
 SUBDIRTESTS += tests2.2
@@ -82,13 +83,11 @@ version:
 
 help:
        -@$(SPLINT)
-       -@LARCH_PATH=/dev/null; $(SPLINT) -nof empty.lcl
        -@$(SPLINT) -help
        -@$(SPLINTP) -asdf
        -@$(SPLINTP) +boolint +boolint 
        -@$(SPLINT) -help flags alpha
 
-
 #commenting these out for the release because they will almost always fail
 #since the default will only fit one system
 #Don't want to panic the user... 
@@ -102,6 +101,8 @@ help:
 .PHONY: clean-local
 clean-local:
        -rm -f *~ #*# *.o *.lcs a.out
+       -rm -f *.out
+       -rm  *.lcd *.lh
        -cd db1; $(MAKE) clean
        -cd db2; $(MAKE) clean
        -cd db3; $(MAKE) clean
@@ -123,13 +124,17 @@ $(SPLINT):
 
 CLEANOUTPUT = $(GREP) -v "Splint 3." | $(GREP) -v "$(SPLINT)" | $(GREP) -v "^make.*\[[1-9]*\]:" | $(GREP) -v "^gmake.*\[[1-9]*\]:" |   $(GREP) -v "^gmake -e" |  $(GREP) -v "^make -e" |$(GREP) -v "config.status: creating test/Makefile" | $(GREP) -v "cd .. && " | $(GREP) -v "CONFIG_HEADERS=" | $(GREP) -v "CONFIG_FILES="
 
+#drl 12/07/2002 These rules for .c and .expect files don't make sense
+# and they are confusing make dist so I'm taking them out.
+
 ## Not real C code
 
-.c.expect:
-       $(MAKE) $* |& $(CLEANOUTPUT) >$*.expect && cat $*.expect
+#.c.expect:
+#      $(MAKE) $* |& $(CLEANOUTPUT) >$*.expect && cat $*.expect
+#
+#.c.diff:
+#      $(MAKE) $* |& $(CLEANOUTPUT) >$*.out && diff $*.expect $*.out
 
-.c.diff:
-       $(MAKE) $* |& $(CLEANOUTPUT) >$*.out && diff $*.expect $*.out
 
 #drl temporally take this out.
 #.PHONY: expects
@@ -265,13 +270,18 @@ cast:
        -$(SPLINTR) cast -accessmodule -expect 20
        -$(SPLINTRN) cast2.c +checks -exportlocal -exportheader -expect 3
 
+.PHONY: chararraylit
+chararraylit:
+       -$(SPLINTR) chararraylit.c -expect 2
+
 ### Two addition errors detected with 2.5 with -numliteral.
 
+### evans 2002-12-15: finds one more but in charlit
 .PHONY: charlit
 charlit:
        -$(SPLINTR) +hints charlit.c -expect 4
        -$(SPLINTR) +hints -numliteral charlit.c -expect 6
-       -$(SPLINTR) +hints charlit.c +charintliteral +ignoresigns
+       -$(SPLINTR) +hints charlit.c +charintliteral +ignoresigns -expect 1
 
 .PHONY: clauses
 clauses: 
@@ -290,12 +300,16 @@ controldepth:
        -$(SPLINTR) +hints -controlnestdepth 2 controldepth.c -expect 2
        -$(SPLINTR) +hints -controlnestdepth 1 controldepth.c -expect 2
 
+###
+### 1 extra warning reported for +strict now because of out-of-bounds read
+###
+
 .PHONY: compdestroy
 compdestroy:
        -$(SPLINTRN) compdestroy.c +checks -exportlocal -exportheader -expect 1
        -$(SPLINTRN) compdestroy.c +checks -exportlocal -exportheader +strictdestroy -expect 2
        -$(SPLINTRN) compdestroy.c +checks -exportlocal -exportheader +strictdestroy +strictusereleased -expect 3
-       -$(SPLINTRN) compdestroy.c +strict +partial -exportheader -expect 3
+       -$(SPLINTRN) compdestroy.c +strict +partial -exportheader -expect 4
 
 .PHONY: compoundliterals
 compoundliterals:
@@ -358,7 +372,7 @@ deadparam:
 .PHONY: decl
 decl:
        -$(SPLINTR) decl.c -expect 2
-       -$(SPLINTRN) decl.c +strict -exportlocal -expect 5
+       -$(SPLINTRN) decl.c +strict -exportlocal -expect 6
        -$(SPLINTR) decl2 -expect 4
 
 .PHONY: divzero
@@ -457,6 +471,12 @@ init:
        -$(SPLINTR) init.c -expect 14
        -$(SPLINTRN) init.c +checks -exportlocal -exportheadervar -expect 17
 
+### evans 2003-09-16
+.PHONY: innerarray
+innerarray:
+       -$(SPLINTR) innerarray.c -expect 10
+
+
 
 .PHONY: inparam
 inparam:
@@ -489,13 +509,14 @@ keep:
 ### libs
 ### 2001-05-22: 2 new errors found (fixed spec of signal)
 ### 2001-05-30: 3 new errors found (formatconst)
+### 2002-07-08: 2 new errors found (getc modifies errno)
 
 .PHONY: libs
 libs:
        -$(SPLINTR) libs.c +longunsignedunsignedintegral -expect 18
        -$(SPLINTR) libs.c -expect 22
        -$(SPLINTR) libs.c +globunspec +modunspec -expect 25
-       -$(SPLINTR) libs.c +strictlib +globunspec +modunspec -expect 42
+       -$(SPLINTR) libs.c +strictlib +globunspec +modunspec -expect 44
 
 .PHONY: lintcomments
 lintcomments:
@@ -507,6 +528,17 @@ lintcomments:
 list:
        -$(SPLINTR) list.c -expect 3
 
+###
+### 2002-12-12: Added test case for +longint and +shortint flags
+###
+
+.PHONY: longint
+longint:
+       -$(SPLINTR) longint.c -expect 3
+       -$(SPLINTR) longint.c +longint -expect 2
+       -$(SPLINTR) longint.c +shortint -expect 2
+       -$(SPLINTR) longint.c +shortint +longint -expect 0
+
 ###
 ### 2002-01-01: Added test case for obvious loop execution.
 ###
@@ -533,6 +565,10 @@ macrosef:
        -$(SPLINTR) macrosef.c +allmacros -expect 3
        -$(SPLINTR) macrosef.c +allmacros +sefuncon -expect 4
 
+.PHONY: malloc
+malloc:
+       -$(SPLINTRN) malloc.c +bounds -exportlocal -expect 7
+
 .PHONY: merge
 merge:
        -$(SPLINTRN) merge.c +checks -exportlocal -exportheadervar -exportheader -expect 3
@@ -554,7 +590,7 @@ modtest:
 .PHONY: moduncon
 moduncon:
        -$(SPLINTR) moduncon.c +moduncon -memchecks -expect 4
-       -$(SPLINTRN) moduncon.c +strict -exportlocal -expect 22
+       -$(SPLINTRN) moduncon.c +strict +impboundsconstraints -exportlocal -expect 22 
 
 .PHONY: mongoincludes
 mongoincludes:
@@ -583,7 +619,7 @@ null:
        -$(SPLINTR) null1.c -null -mustdefine -expect 4
        -$(SPLINTR) null2.c -expect 11
        -$(SPLINTR) null3.c -expect 15
-       -$(SPLINTR) null3.c -warnunixlib +unixlib -expect 16
+       -$(SPLINTR) null3.c +unixlib -expect 16
        -$(SPLINTR) null4.c -expect 1
        -$(SPLINTR) null5.c -expect 4
        -$(SPLINTR) null6 -expect 4
@@ -595,7 +631,7 @@ null:
 .PHONY: nullret
 nullret:
        -$(SPLINTR) nullret.c -expect 2
-       -$(SPLINTR) -nullret nullret.c -expect 1
+       -$(SPLINTR) -nullret nullret.c -expect 0
 
 .PHONY: nullassign
 nullassign:
@@ -603,6 +639,14 @@ nullassign:
        -$(SPLINTR) -nullassign nullassign.c -expect 1
 
 
+### Added for 3.1 - evans 2002-12-14
+
+.PHONY: numabstract
+numabstract:
+       -$(SPLINTR) numabstract.c -expect 11
+       -$(SPLINTR) numabstract.c +numabstractlit -expect 9
+       -$(SPLINTR) numabstract.c -numabstractcast -expect 10
+
 #
 # Before 2.4, expected one more because error was reported both as 
 # dependent and observer.
@@ -645,7 +689,7 @@ parentype:
 preds:
        -$(SPLINTR) +hints preds.c -expect 6
        -$(SPLINTRN) +hints preds.c -weak -expect 1
-       -$(SPLINTRN) +hints preds.c -strict -exportlocal -exportheader -expect 12
+       -$(SPLINTRN) +hints preds.c -strict +impboundsconstraints -exportlocal -exportheader -expect 10
 
 .PHONY: prefixes
 prefixes:
@@ -704,6 +748,11 @@ repexpose:
 returned:
        ${SPLINTR} returned.c -expect 1
 
+### russian added 2003-06-07: bug reported in pre-processing non-standard characters.
+.PHONY: russian
+russian:
+       ${SPLINTR} russian.c 
+
 .PHONY: sharing
 sharing: 
        -$(SPLINTR) sharing1.c -expect 21
@@ -718,6 +767,13 @@ shifts:
        -$(SPLINTR) shifts.c -shiftimplementation -expect 3
        -$(SPLINTR) shifts.c -shiftnegative -expect 1
 
+#drl comment this out until sizesigns is added to cvs
+
+### evans - added 2002-08-17: check warnings with arbitrary integral types
+sizesigns:
+       -$(SPLINTR) +strict sizesigns.c -expect 5
+       -$(SPLINTR) +strict +matchanyintegral sizesigns.c -expect 4
+
 .PHONY: slovaknames
 slovaknames:
        -$(SPLINTR) +hints slovaknames.c -expect 1
@@ -726,11 +782,15 @@ slovaknames:
        -$(SPLINTR) +hints +slovak -slovakvars slovaknames.c -expect 2
        -$(SPLINTR) +hints +slovak -accessslovak slovaknames.c -expect 7
 
+##
+## evans 2002-07-22: 1 less warning for specclauses3.c because of NULL result
+##
+
 .PHONY: specclauses
 specclauses:
        -$(SPLINTR) specclauses.c -expect 6
        -$(SPLINTR) specclauses2.c -expect 8
-       -$(SPLINTR) specclauses3.c -expect 6
+       -$(SPLINTR) specclauses3.c -expect 5
        -$(SPLINTR) specclauses4.c -expect 3
        -$(SPLINTR) specclauses5.c -expect 3
 
@@ -900,6 +960,7 @@ freearray:
 sizeof:
        -$(SPLINTR) +bounds sizeof.c -expect 1
 
+
 .PHONY: buffertest
 buffertest:
        -$(SPLINTR) +bounds buffertest1.c -expect 5
@@ -916,10 +977,10 @@ $(SUBDIRTESTS):
        cd $@; $(MAKE) SPLINT="$(SPLINTRNNEST)"
 
 #drl 11/29/2001 This is a very ugly hack to get make dist to work
-EXTRA_DIST =  ./abst_t.lcl ./abst_t.lcs  \
-              ./abstptr.lcl ./abstptr.lcs \
-              ./alias.lcl ./alias.lcs \
-              ./alias2.lcl ./alias2.lcs \
+EXTRA_DIST =  ./abst_t.lcl \
+              ./abstptr.lcl \
+              ./alias.lcl \
+              ./alias2.lcl \
               ./alias3.lcl  \
               ./db1/erc.lcl \
               ./db1/bool.lcl \
@@ -928,42 +989,22 @@ EXTRA_DIST =  ./abst_t.lcl ./abst_t.lcs  \
               ./db1/empset.lcl \
               ./db1/eref.lcl \
               ./db1/ereftab.lcl \
-              ./alias3.lcs \
-              ./alias3.lh  \
               ./alias4.lcl  \
-              ./alias4.lcs \
-              ./alias4.lh \
               ./alias5.lcl \
-              ./alias5.lcs \
-              ./alias5.lh \
               ./argorder2.lcl \
-              ./argorder2.lcs \
               ./argorder4.lcl \
-              ./argorder4.lcs \
               ./args.lcl \
-              ./args.lcs \
               ./cast.lcl \
-              ./cast.lcs \
               ./decl2.lcl \
-              ./decl2.lcs \
               ./empty.lcl \
               ./enum.lcl \
-              ./enum.lcs \
               ./glob.lcl \
-              ./glob.lcs \
               ./impabstract.lcl \
-              ./impabstract.lcs \
               ./iter.lcl \
-              ./iter.lcs \
               ./macros.lcl \
-              ./macros.lcs \
               ./macrosef.lcl \
-              ./macrosef.lcs \
               ./modtest.lcl \
-              ./modtest.lcs \
               ./mut.lcl \
-              ./mut.lcs \
-              ./mut.lh \
               ./mut.lh.expect \
               ./db2/dbase.lcl \
               ./db2/employee.lcl \
@@ -972,27 +1013,18 @@ EXTRA_DIST =  ./abst_t.lcl ./abst_t.lcs  \
               ./db2/eref.lcl \
               ./db2/ereftab.lcl \
               ./db2/etest.lcl \
-              ./null6.lcd \
               ./null6.lcl \
-              ./null6.lcs \
               ./observer.lcl \
-              ./observer.lcs \
               ./oldstyle.lcl \
-              ./oldstyle.lcs \
               ./outglob.lcl \
-              ./outglob.lcs \
               ./outparam.lcl \
-              ./outparam.lcs \
               ./rc1.splintrc \
               ./rc2.splintrc \
               ./rc3.splintrc \
               ./rc3.splintrc.os2 \
               ./repexpose.lcl \
-              ./repexpose.lcs \
-              ./repexpose.lh \
               ./repexpose.lh.expect \
               ./special.lcl \
-              ./special.lcs \
               ./db3/.splintrc \
               ./db3/bool.lcl \
               ./db3/check.lcl \
@@ -1002,24 +1034,17 @@ EXTRA_DIST =  ./abst_t.lcl ./abst_t.lcs  \
               ./db3/erc.lcl \
               ./db3/eref.lcl \
               ./db3/ereftab.lcl \
+              ./db3/README \
+              ./db3/clean \
+              ./db3/tidy \
               ./tq.lcl \
-              ./tq.lcs \
               ./ud2.lcl \
-              ./ud2.lcs \
               ./for/.splintrc \
               ./globalbufferannotation/.splintrc \
               ./maxset/.splintrc \
               ./strchr/.splintrc \
               ./tests2.2/bool.lcl \
-              ./tests2.2/bool.lcs \
-              ./tests2.2/libraries.lcd \
-              ./tests2.2/obsolete.lcd \
-              ./tests2.2/oldversion.lcd \
               ./tests2.4/subdir/main.lcl \
-              ./tests2.4/subdir/main.lcs \
-              ./tests2.5/newlint.lcd \
-              ./warnuse/warnuse.lcd \
-              ./empty.lcs \
               ./abstptr.c \
               ./alias.c \
               ./alias2.c \
@@ -1052,6 +1077,7 @@ EXTRA_DIST =  ./abst_t.lcl ./abst_t.lcs  \
               ./cases2.c \
               ./cast.c \
               ./cast2.c \
+              ./chararraylit.c \
               ./charlit.c \
               ./clauses.c \
               ./clauses2.c \
@@ -1124,6 +1150,7 @@ EXTRA_DIST =  ./abst_t.lcl ./abst_t.lcs  \
               ./longconstants.c \
               ./macros.c \
               ./macrosef.c \
+             ./malloc.c \
               ./merge.c \
               ./modclient.c \
               ./modifies.c \
@@ -1247,6 +1274,8 @@ EXTRA_DIST =  ./abst_t.lcl ./abst_t.lcs  \
               ./simplebufferConstraintTests/test3.c \
               ./simplebufferConstraintTests/test7.c \
               ./sizeoftest/sizeof.c \
+              ./sizeoftest/sizeofConst.c \
+              ./sizeoftest/Makefile \
               ./strchr/strchr.c \
               ./suppressfile/test.c \
               ./tainted/sprintf.c \
@@ -1371,6 +1400,7 @@ EXTRA_DIST =  ./abst_t.lcl ./abst_t.lcs  \
               buffertest.expect \
               cases.expect \
               cast.expect \
+              chararraylit.expect \
               charlit.expect \
               clauses.expect \
               commentchar.expect \
@@ -1518,7 +1548,7 @@ EXTRA_DIST =  ./abst_t.lcl ./abst_t.lcs  \
               ./tests2.5/immutable.h \
               ./tests2.5/impabsmodule.h \
               ./tests2.5/socket.h \
-              ./Makefile-test.os2 \
+              ./Makefile.os2 \
               ./db1/Makefile \
               ./db2/Makefile \
               ./db3/Makefile \
@@ -1549,11 +1579,16 @@ EXTRA_DIST =  ./abst_t.lcl ./abst_t.lcs  \
                 unioninit.expect  unioninit.c utypes.c \
                 utypes.expect widestrings.expect  widestrings.c  \
                 functionmacro.expect functionmacro.c  info.c info.expect \
-                loopexec.c looptesteffect.c mergenull.c shifts.c \
+                longint.c loopexec.c looptesteffect.c mergenull.c shifts.c \
+               longint.expect nullret.expect numabstract.expect \
+               sizesigns.expect typeof.expect \
                 manual.expect ./manual/Makefile \
                 ./manual/annotglobs.c  ./manual/bool.c  ./manual/bool.h  ./manual/clauses.c  ./manual/employee.h  ./manual/exposure.c  ./manual/globals.c  ./manual/ignore.c  ./manual/implicit.c  ./manual/intSet.h  ./manual/list.c  ./manual/loop.c  ./manual/macros.c  ./manual/modify.c  ./manual/mstring.c  ./manual/mstring.h  ./manual/mstringnn.c  ./manual/multiError.c  ./manual/names.c  ./manual/noeffect.c  ./manual/null.c  ./manual/only.c  ./manual/order.c  ./manual/palindrome.c  ./manual/palindrome.h  ./manual/refs.c  ./manual/returned.c  ./manual/rgb.c  ./manual/rstring.c  ./manual/rstring.h  ./manual/sample.c  ./manual/setChar.c  ./manual/setname.c  ./manual/setname.h  ./manual/special.c  ./manual/stack.c  ./manual/sumsquares.c  ./manual/switch.c  ./manual/testpal.c  ./manual/types.c  ./manual/unique.c  ./manual/usedef.c  ./manual/bounds.c \
                   arraydims.expect arraydims.c \
                   moreBufferTests2/fixedArrayType.c oldstyle2.c \
                   divzero.expect parentype.expect \
                   divzero.c parentype.c \
-stringliteral.expect  stringliteral.c
+stringliteral.expect  stringliteral.c \
+  numabstract.c sizesigns.c typeof.c   nullassign.expect 
+
+#              sizesigns.c sizesigns.expect \
This page took 0.046117 seconds and 4 git commands to generate.