[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/app/cwmp/netcwmp/tests/src/Makefile.am b/ap/app/cwmp/netcwmp/tests/src/Makefile.am
new file mode 100755
index 0000000..0c53096
--- /dev/null
+++ b/ap/app/cwmp/netcwmp/tests/src/Makefile.am
@@ -0,0 +1,20 @@
+ 
+AM_CPPFLAGS = -DUSE_CWMP_MEMORY_POOL -I./  -I$(top_srcdir)/libcwmp/src/inc  -I$(top_srcdir)/libpool/include  -I$(top_srcdir)/libxmlet/include   -I$(top_srcdir)/libcwmp/include 
+
+
+
+
+bin_PROGRAMS = testall
+
+testall_SOURCES = abts.c testutil.c test_model.c test_rpc.c test_pool.c
+
+
+
+
+testall_LDADD =  -L$(top_srcdir)/libpool/src -L$(top_srcdir)/libxmlet/src -L$(top_srcdir)/libcwmp/src -lpool -lxmlet  -lcwmp  -lpthread 
+
+
+testall_CPPFLAGS = $(AM_CPPFLAGS) 
+
+
+
diff --git a/ap/app/cwmp/netcwmp/tests/src/Makefile.in b/ap/app/cwmp/netcwmp/tests/src/Makefile.in
new file mode 100755
index 0000000..3451b46
--- /dev/null
+++ b/ap/app/cwmp/netcwmp/tests/src/Makefile.in
@@ -0,0 +1,588 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = testall$(EXEEXT)
+subdir = tests/src
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/build/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_testall_OBJECTS = testall-abts.$(OBJEXT) testall-testutil.$(OBJEXT) \
+	testall-test_model.$(OBJEXT) testall-test_rpc.$(OBJEXT) \
+	testall-test_pool.$(OBJEXT)
+testall_OBJECTS = $(am_testall_OBJECTS)
+testall_DEPENDENCIES =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(testall_SOURCES)
+DIST_SOURCES = $(testall_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_CPU = @BUILD_CPU@
+BUILD_OS = @BUILD_OS@
+BUILD_VENDOR = @BUILD_VENDOR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+HOST_CPU = @HOST_CPU@
+HOST_OS = @HOST_OS@
+HOST_VENDOR = @HOST_VENDOR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NMEDIT = @NMEDIT@
+OBJEXT = @OBJEXT@
+OPENSSL_DIR = @OPENSSL_DIR@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CPPFLAGS = -DUSE_CWMP_MEMORY_POOL -I./  -I$(top_srcdir)/libcwmp/src/inc  -I$(top_srcdir)/libpool/include  -I$(top_srcdir)/libxmlet/include   -I$(top_srcdir)/libcwmp/include 
+testall_SOURCES = abts.c testutil.c test_model.c test_rpc.c test_pool.c
+testall_LDADD = -L$(top_srcdir)/libpool/src -L$(top_srcdir)/libxmlet/src -L$(top_srcdir)/libcwmp/src -lpool -lxmlet  -lcwmp  -lpthread  -lnvram -L$(top_srcdir)/../../../lib/libnvram
+testall_CPPFLAGS = $(AM_CPPFLAGS) 
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/src/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tests/src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+testall$(EXEEXT): $(testall_OBJECTS) $(testall_DEPENDENCIES) 
+	@rm -f testall$(EXEEXT)
+	$(LINK) $(testall_OBJECTS) $(testall_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testall-abts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testall-test_model.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testall-test_pool.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testall-test_rpc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testall-testutil.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+testall-abts.o: abts.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT testall-abts.o -MD -MP -MF $(DEPDIR)/testall-abts.Tpo -c -o testall-abts.o `test -f 'abts.c' || echo '$(srcdir)/'`abts.c
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/testall-abts.Tpo $(DEPDIR)/testall-abts.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='abts.c' object='testall-abts.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o testall-abts.o `test -f 'abts.c' || echo '$(srcdir)/'`abts.c
+
+testall-abts.obj: abts.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT testall-abts.obj -MD -MP -MF $(DEPDIR)/testall-abts.Tpo -c -o testall-abts.obj `if test -f 'abts.c'; then $(CYGPATH_W) 'abts.c'; else $(CYGPATH_W) '$(srcdir)/abts.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/testall-abts.Tpo $(DEPDIR)/testall-abts.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='abts.c' object='testall-abts.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o testall-abts.obj `if test -f 'abts.c'; then $(CYGPATH_W) 'abts.c'; else $(CYGPATH_W) '$(srcdir)/abts.c'; fi`
+
+testall-testutil.o: testutil.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT testall-testutil.o -MD -MP -MF $(DEPDIR)/testall-testutil.Tpo -c -o testall-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/testall-testutil.Tpo $(DEPDIR)/testall-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='testutil.c' object='testall-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o testall-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+testall-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT testall-testutil.obj -MD -MP -MF $(DEPDIR)/testall-testutil.Tpo -c -o testall-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/testall-testutil.Tpo $(DEPDIR)/testall-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='testutil.c' object='testall-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o testall-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+testall-test_model.o: test_model.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT testall-test_model.o -MD -MP -MF $(DEPDIR)/testall-test_model.Tpo -c -o testall-test_model.o `test -f 'test_model.c' || echo '$(srcdir)/'`test_model.c
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/testall-test_model.Tpo $(DEPDIR)/testall-test_model.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test_model.c' object='testall-test_model.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o testall-test_model.o `test -f 'test_model.c' || echo '$(srcdir)/'`test_model.c
+
+testall-test_model.obj: test_model.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT testall-test_model.obj -MD -MP -MF $(DEPDIR)/testall-test_model.Tpo -c -o testall-test_model.obj `if test -f 'test_model.c'; then $(CYGPATH_W) 'test_model.c'; else $(CYGPATH_W) '$(srcdir)/test_model.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/testall-test_model.Tpo $(DEPDIR)/testall-test_model.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test_model.c' object='testall-test_model.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o testall-test_model.obj `if test -f 'test_model.c'; then $(CYGPATH_W) 'test_model.c'; else $(CYGPATH_W) '$(srcdir)/test_model.c'; fi`
+
+testall-test_rpc.o: test_rpc.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT testall-test_rpc.o -MD -MP -MF $(DEPDIR)/testall-test_rpc.Tpo -c -o testall-test_rpc.o `test -f 'test_rpc.c' || echo '$(srcdir)/'`test_rpc.c
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/testall-test_rpc.Tpo $(DEPDIR)/testall-test_rpc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test_rpc.c' object='testall-test_rpc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o testall-test_rpc.o `test -f 'test_rpc.c' || echo '$(srcdir)/'`test_rpc.c
+
+testall-test_rpc.obj: test_rpc.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT testall-test_rpc.obj -MD -MP -MF $(DEPDIR)/testall-test_rpc.Tpo -c -o testall-test_rpc.obj `if test -f 'test_rpc.c'; then $(CYGPATH_W) 'test_rpc.c'; else $(CYGPATH_W) '$(srcdir)/test_rpc.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/testall-test_rpc.Tpo $(DEPDIR)/testall-test_rpc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test_rpc.c' object='testall-test_rpc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o testall-test_rpc.obj `if test -f 'test_rpc.c'; then $(CYGPATH_W) 'test_rpc.c'; else $(CYGPATH_W) '$(srcdir)/test_rpc.c'; fi`
+
+testall-test_pool.o: test_pool.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT testall-test_pool.o -MD -MP -MF $(DEPDIR)/testall-test_pool.Tpo -c -o testall-test_pool.o `test -f 'test_pool.c' || echo '$(srcdir)/'`test_pool.c
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/testall-test_pool.Tpo $(DEPDIR)/testall-test_pool.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test_pool.c' object='testall-test_pool.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o testall-test_pool.o `test -f 'test_pool.c' || echo '$(srcdir)/'`test_pool.c
+
+testall-test_pool.obj: test_pool.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT testall-test_pool.obj -MD -MP -MF $(DEPDIR)/testall-test_pool.Tpo -c -o testall-test_pool.obj `if test -f 'test_pool.c'; then $(CYGPATH_W) 'test_pool.c'; else $(CYGPATH_W) '$(srcdir)/test_pool.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/testall-test_pool.Tpo $(DEPDIR)/testall-test_pool.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test_pool.c' object='testall-test_pool.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o testall-test_pool.obj `if test -f 'test_pool.c'; then $(CYGPATH_W) 'test_pool.c'; else $(CYGPATH_W) '$(srcdir)/test_pool.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/ap/app/cwmp/netcwmp/tests/src/abts.c b/ap/app/cwmp/netcwmp/tests/src/abts.c
new file mode 100755
index 0000000..f224edd
--- /dev/null
+++ b/ap/app/cwmp/netcwmp/tests/src/abts.c
@@ -0,0 +1,433 @@
+/* Copyright 2000-2004 Ryan Bloom

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ *

+ * Portions of this file were taken from testall.c in the APR test suite,

+ * written by members of the Apache Software Foundation.

+ */

+

+#include "abts.h"

+#include "abts_tests.h"

+#include "testutil.h"

+

+#define ABTS_STAT_SIZE 6

+static char status[ABTS_STAT_SIZE] = {'|', '/', '-', '|', '\\', '-'};

+static int curr_char;

+static int verbose = 1;

+static int exclude = 0;

+static int quiet = 0;

+static int list_tests = 0;

+

+const char **testlist = NULL;

+

+static int find_test_name(const char *testname) {

+    int i;

+    for (i = 0; testlist[i] != NULL; i++) {

+        if (!strcmp(testlist[i], testname)) {

+            return 1;

+        }

+    }

+    return 0;

+}

+

+/* Determine if the test should be run at all */

+static int should_test_run(const char *testname) {

+    int found = 0;

+    if (list_tests == 1) {

+        return 0;

+    }

+    if (testlist == NULL) {

+        return 1;

+    }

+    found = find_test_name(testname);

+    if ((found && !exclude) || (!found && exclude)) {

+        return 1;

+    }

+    return 0;

+}

+

+static void reset_status(void)

+{

+    curr_char = 0;

+}

+

+static void update_status(void)

+{

+    if (!quiet) {

+        curr_char = (curr_char + 1) % ABTS_STAT_SIZE;

+        fprintf(stdout, "\b%c", status[curr_char]);

+        fflush(stdout);

+    }

+}

+

+static void end_suite(abts_suite *suite)

+{

+    if (suite != NULL) {

+        sub_suite *last = suite->tail;

+        if (!quiet) {

+            fprintf(stdout, "\b");

+            fflush(stdout);

+        }

+        if (last->failed == 0) {

+            fprintf(stdout, "SUCCESS\n");

+            fflush(stdout);

+        }

+        else {

+            fprintf(stdout, "FAILED %d of %d\n", last->failed, last->num_test);

+            fflush(stdout);

+        }

+    }

+}

+

+abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name_full)

+{

+    sub_suite *subsuite;

+    char *p;

+    const char *suite_name;

+    curr_char = 0;

+    

+    /* Only end the suite if we actually ran it */

+    if (suite && suite->tail &&!suite->tail->not_run) {

+        end_suite(suite);

+    }

+

+    subsuite = malloc(sizeof(*subsuite));

+    subsuite->num_test = 0;

+    subsuite->failed = 0;

+    subsuite->next = NULL;

+    /* suite_name_full may be an absolute path depending on __FILE__ 

+     * expansion */

+    suite_name = strrchr(suite_name_full, '/');

+    if (suite_name) {

+        suite_name++;

+    } else {

+        suite_name = suite_name_full;

+    }

+    p = strrchr(suite_name, '.');

+    if (p) {

+        subsuite->name = memcpy(calloc(p - suite_name + 1, 1),

+                                suite_name, p - suite_name);

+    }

+    else {

+        subsuite->name = suite_name;

+    }

+

+    if (list_tests) {

+        fprintf(stdout, "%s\n", subsuite->name);

+    }

+    

+    subsuite->not_run = 0;

+

+    if (suite == NULL) {

+        suite = malloc(sizeof(*suite));

+        suite->head = subsuite;

+        suite->tail = subsuite;

+    }

+    else {

+        suite->tail->next = subsuite;

+        suite->tail = subsuite;

+    }

+

+    if (!should_test_run(subsuite->name)) {

+        subsuite->not_run = 1;

+        return suite;

+    }

+

+    reset_status();

+    fprintf(stdout, "%-20s:  ", subsuite->name);

+    update_status();

+    fflush(stdout);

+

+    return suite;

+}

+

+void abts_run_test(abts_suite *ts, test_func f, void *value)

+{

+    abts_case tc;

+    sub_suite *ss;

+

+    if (!should_test_run(ts->tail->name)) {

+        return;

+    }

+    ss = ts->tail;

+

+    tc.failed = 0;

+    tc.suite = ss;

+    

+    ss->num_test++;

+    update_status();

+

+    f(&tc, value);

+    

+    if (tc.failed) {

+        ss->failed++;

+    }

+}

+

+static int report(abts_suite *suite)

+{

+    int count = 0;

+    sub_suite *dptr;

+

+    if (suite && suite->tail &&!suite->tail->not_run) {

+        end_suite(suite);

+    }

+

+    for (dptr = suite->head; dptr; dptr = dptr->next) {

+        count += dptr->failed;

+    }

+

+    if (list_tests) {

+        return 0;

+    }

+

+    if (count == 0) {

+        printf("All tests passed.\n");

+        return 0;

+    }

+

+    dptr = suite->head;

+    fprintf(stdout, "%-15s\t\tTotal\tFail\tFailed %%\n", "Failed Tests");

+    fprintf(stdout, "===================================================\n");

+    while (dptr != NULL) {

+        if (dptr->failed != 0) {

+            float percent = ((float)dptr->failed / (float)dptr->num_test);

+            fprintf(stdout, "%-15s\t\t%5d\t%4d\t%6.2f%%\n", dptr->name, 

+                    dptr->num_test, dptr->failed, percent * 100);

+        }

+        dptr = dptr->next;

+    }

+    return 1;

+}

+

+void abts_log_message(const char *fmt, ...)

+{

+    va_list args;

+    update_status();

+

+    if (verbose) {

+        va_start(args, fmt);

+        vfprintf(stderr, fmt, args);

+        va_end(args);

+        fprintf(stderr, "\n");

+        fflush(stderr);

+    }

+}

+

+void abts_int_equal(abts_case *tc, const int expected, const int actual, int lineno)

+{

+    update_status();

+    if (tc->failed) return;

+

+    if (expected == actual) return;

+

+    tc->failed = TRUE;

+    if (verbose) {

+        fprintf(stderr, "Line %d: expected <%d>, but saw <%d>\n", lineno, expected, actual);

+        fflush(stderr);

+    }

+}

+

+void abts_int_nequal(abts_case *tc, const int expected, const int actual, int lineno)

+{

+    update_status();

+    if (tc->failed) return;

+

+    if (expected != actual) return;

+

+    tc->failed = TRUE;

+    if (verbose) {

+        fprintf(stderr, "Line %d: expected <%d>, but saw <%d>\n", lineno, expected, actual);

+        fflush(stderr);

+    }

+}

+

+void abts_str_equal(abts_case *tc, const char *expected, const char *actual, int lineno)

+{

+    update_status();

+    if (tc->failed) return;

+

+    if (!expected && !actual) return;

+    if (expected && actual)

+        if (!strcmp(expected, actual)) return;

+

+    tc->failed = TRUE;

+    if (verbose) {

+        fprintf(stderr, "Line %d: expected <%s>, but saw <%s>\n", lineno, expected, actual);

+        fflush(stderr);

+    }

+}

+

+void abts_str_notequal(abts_case *tc, const char *expected, const char *actual, int lineno)

+{

+    update_status();

+    if (tc->failed) return;

+

+    if (!expected && !actual) return;

+    if (expected && actual)

+        if (strcmp(expected, actual) != 0) return;

+

+    tc->failed = TRUE;

+    if (verbose) {

+        fprintf(stderr, "Line %d: expected <%s>  == saw <%s>, but we expect it not equal!\n", lineno, expected, actual);

+        fflush(stderr);

+    }

+}

+

+void abts_str_nequal(abts_case *tc, const char *expected, const char *actual,

+                       size_t n, int lineno)

+{

+    update_status();

+    if (tc->failed) return;

+

+    if (!strncmp(expected, actual, n)) return;

+

+    tc->failed = TRUE;

+    if (verbose) {

+        fprintf(stderr, "Line %d: expected <%s>, but saw <%s>\n", lineno, expected, actual);

+        fflush(stderr);

+    }

+}

+

+void abts_ptr_notnull(abts_case *tc, const void *ptr, int lineno)

+{

+    update_status();

+    if (tc->failed) return;

+

+    if (ptr != NULL) return;

+

+    tc->failed = TRUE;

+    if (verbose) {

+        fprintf(stderr, "Line %d: Expected NULL, but saw <%p>\n", lineno, ptr);

+        fflush(stderr);

+    }

+}

+ 

+void abts_ptr_equal(abts_case *tc, const void *expected, const void *actual, int lineno)

+{

+    update_status();

+    if (tc->failed) return;

+

+    if (expected == actual) return;

+

+    tc->failed = TRUE;

+    if (verbose) {

+        fprintf(stderr, "Line %d: expected <%p>, but saw <%p>\n", lineno, expected, actual);

+        fflush(stderr);

+    }

+}

+

+void abts_fail(abts_case *tc, const char *message, int lineno)

+{

+    update_status();

+    if (tc->failed) return;

+

+    tc->failed = TRUE;

+    if (verbose) {

+        fprintf(stderr, "Line %d: %s\n", lineno, message);

+        fflush(stderr);

+    }

+}

+ 

+void abts_assert(abts_case *tc, const char *message, int condition, int lineno)

+{

+    update_status();

+    if (tc->failed) return;

+

+    if (condition) return;

+

+    tc->failed = TRUE;

+    if (verbose) {

+        fprintf(stderr, "Line %d: %s\n", lineno, message);

+        fflush(stderr);

+    }

+}

+

+void abts_true(abts_case *tc, int condition, int lineno)

+{

+    update_status();

+    if (tc->failed) return;

+

+    if (condition) return;

+

+    tc->failed = TRUE;

+    if (verbose) {

+        fprintf(stderr, "Line %d: Condition is false, but expected true\n", lineno);

+        fflush(stderr);

+    }

+}

+

+void abts_not_impl(abts_case *tc, const char *message, int lineno)

+{

+    update_status();

+

+    tc->suite->not_impl++;

+    if (verbose) {

+        fprintf(stderr, "Line %d: %s\n", lineno, message);

+        fflush(stderr);

+    }

+}

+

+int main(int argc, const char *const argv[]) {

+    int i;

+    int rv;

+    int list_provided = 0;

+    abts_suite *suite = NULL;

+   

+    for (i = 1; i < argc; i++) {

+        if (!strcmp(argv[i], "-v")) {

+            verbose = 1;

+            continue;

+        }

+        if (!strcmp(argv[i], "-x")) {

+            exclude = 1;

+            continue;

+        }

+        if (!strcmp(argv[i], "-l")) {

+            list_tests = 1;

+            continue;

+        }

+        if (!strcmp(argv[i], "-q")) {

+            quiet = 1;

+            continue;

+        }

+        if (argv[i][0] == '-') {

+            fprintf(stderr, "Invalid option: `%s'\n", argv[i]);

+            exit(1);

+        }

+        list_provided = 1;

+    }

+

+    if (list_provided) {

+        /* Waste a little space here, because it is easier than counting the

+         * number of tests listed.  Besides it is at most three char *.

+         */

+        testlist = calloc(argc + 1, sizeof(char *));

+        for (i = 1; i < argc; i++) {

+            testlist[i - 1] = argv[i];

+        }

+    }

+

+    initialize();

+

+    printf("sizeof alltests is: %d\n", (int)(sizeof(alltests) / sizeof(struct testlist *)));

+

+    for (i = 0; i < (sizeof(alltests) / sizeof(struct testlist *)); i++) {

+        suite = alltests[i].func(suite);

+    }

+

+    rv = report(suite);

+

+    return rv;

+}

+       

diff --git a/ap/app/cwmp/netcwmp/tests/src/abts.h b/ap/app/cwmp/netcwmp/tests/src/abts.h
new file mode 100755
index 0000000..ee9d63a
--- /dev/null
+++ b/ap/app/cwmp/netcwmp/tests/src/abts.h
@@ -0,0 +1,116 @@
+/* Copyright 2000-2004 Ryan Bloom

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+

+#ifndef __TEST_ABTS_H__

+#define __TEST_ABTS_H__

+

+#ifdef __cplusplus

+extern "C" {

+#endif

+

+#include <stdarg.h>

+#include <stdio.h>

+#include <stdlib.h>

+#include <string.h>

+

+#ifndef ABTS_H

+#define ABTS_H

+

+#ifndef FALSE

+#define FALSE 0

+#endif

+#ifndef TRUE

+#define TRUE  1

+#endif

+

+struct sub_suite {

+    const char *name;

+    int num_test;

+    int failed;

+    int not_run;

+    int not_impl;

+    struct sub_suite *next;

+};

+typedef struct sub_suite sub_suite;

+

+struct abts_suite {

+    sub_suite *head;

+    sub_suite *tail;

+};

+typedef struct abts_suite abts_suite;

+

+struct abts_case {

+    int failed;

+    sub_suite *suite;

+};

+typedef struct abts_case abts_case;

+

+typedef void (*test_func)(abts_case *tc, void *data);

+

+#define ADD_SUITE(suite) abts_add_suite(suite, __FILE__);

+

+abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name);

+void abts_run_test(abts_suite *ts, test_func f, void *value);

+void abts_log_message(const char *fmt, ...);

+

+void abts_int_equal(abts_case *tc, const int expected, const int actual, int lineno);

+void abts_int_nequal(abts_case *tc, const int expected, const int actual, int lineno);

+void abts_str_equal(abts_case *tc, const char *expected, const char *actual, int lineno);

+void abts_str_notequal(abts_case *tc, const char *expected, const char *actual, int lineno);

+void abts_str_nequal(abts_case *tc, const char *expected, const char *actual,

+                       size_t n, int lineno);

+void abts_ptr_notnull(abts_case *tc, const void *ptr, int lineno);

+void abts_ptr_equal(abts_case *tc, const void *expected, const void *actual, int lineno);

+void abts_true(abts_case *tc, int condition, int lineno);

+void abts_fail(abts_case *tc, const char *message, int lineno);

+void abts_not_impl(abts_case *tc, const char *message, int lineno);

+void abts_assert(abts_case *tc, const char *message, int condition, int lineno);

+

+/* Convenience macros. Ryan hates these! */

+#define ABTS_INT_EQUAL(a, b, c)     abts_int_equal(a, b, c, __LINE__)

+#define ABTS_INT_NEQUAL(a, b, c)    abts_int_nequal(a, b, c, __LINE__)

+#define ABTS_STR_EQUAL(a, b, c)     abts_str_equal(a, b, c, __LINE__)

+#define ABTS_STR_NOTEQUAL(a, b, c)     abts_str_notequal(a, b, c, __LINE__)

+#define ABTS_STR_NEQUAL(a, b, c, d) abts_str_nequal(a, b, c, d, __LINE__)

+#define ABTS_PTR_NOTNULL(a, b)      abts_ptr_notnull(a, b, __LINE__)

+#define ABTS_PTR_NULL(a, b)         abts_ptr_equal(a, NULL, b, __LINE__)

+#define ABTS_PTR_EQUAL(a, b, c)     abts_ptr_equal(a, b, c, __LINE__)

+#define ABTS_TRUE(a, b)             abts_true(a, b, __LINE__);

+#define ABTS_FAIL(a, b)             abts_fail(a, b, __LINE__);

+#define ABTS_NOT_IMPL(a, b)         abts_not_impl(a, b, __LINE__);

+#define ABTS_ASSERT(a, b, c)        abts_assert(a, b, c, __LINE__);

+

+abts_suite *run_tests(abts_suite *suite);

+abts_suite *run_tests1(abts_suite *suite);

+

+

+#define ASSERT_NULL(x)      ABTS_PTR_NULL(tc, x)

+#define ASSERT_NOTNULL(x)      ABTS_PTR_NOTNULL(tc, x)

+#define ASSERT_TRUE(x)      ABTS_TRUE(tc, x)

+#define ASSERT_FALSE(x)      ABTS_TRUE(tc, !x)

+

+#define ASSERT_STR_EQ(a,b)      ABTS_STR_EQUAL(tc, a,b)

+#define ASSERT_STR_NEQ(a,b)      ABTS_STR_NOTEQUAL(tc, a,b)

+

+

+#endif

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif

+

+

diff --git a/ap/app/cwmp/netcwmp/tests/src/abts_tests.h b/ap/app/cwmp/netcwmp/tests/src/abts_tests.h
new file mode 100755
index 0000000..0a9505d
--- /dev/null
+++ b/ap/app/cwmp/netcwmp/tests/src/abts_tests.h
@@ -0,0 +1,31 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more

+ * contributor license agreements.  See the NOTICE file distributed with

+ * this work for additional information regarding copyright ownership.

+ * The ASF licenses this file to You under the Apache License, Version 2.0

+ * (the "License"); you may not use this file except in compliance with

+ * the License.  You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+

+#ifndef TEST_INCLUDES

+#define TEST_INCLUDES

+

+#include "abts.h"

+#include "testutil.h"

+

+const struct testlist {

+    abts_suite *(*func)(abts_suite *suite);

+} alltests[] = {

+    {testsuite_model},

+    {testsuite_pool},    

+    {testsuite_rpc}

+};

+

+#endif /* APR_TEST_INCLUDES */

diff --git a/ap/app/cwmp/netcwmp/tests/src/device.xml b/ap/app/cwmp/netcwmp/tests/src/device.xml
new file mode 100755
index 0000000..e3c470f
--- /dev/null
+++ b/ap/app/cwmp/netcwmp/tests/src/device.xml
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<cwmp>

+  

+  <model>

+    <object name="InternetGatewayDevice">

+      <param name="DeviceSummary"                     get_func="TRF_Get_DeviceSummary"></param>

+      <param name="LANDeviceNumberOfEntries"  get_func="TRF_Get_LANDeviceNumberOfEntries"></param>

+      <param name="WANDeviceNumberOfEntries"  get_func="TRF_Get_WANDeviceNumberOfEntries"></param>

+      <object name="DeviceInfo">

+        <param name="SpecVersion"               get_func="cpe_get_igd_di_specversion"></param>

+        <param name="HardwareVersion"           get_func="cpe_get_igd_di_hardwareversion"></param>

+        <param name="SoftwareVersion"   rw="1"  get_func="cpe_get_igd_di_softwareversion"  set_func="cpe_set_igd_di_softwareversion"></param>

+        <param name="ProvisioningCode"  rw="1"  get_func="cpe_get_igd_di_provisioningcode" set_func="cpe_set_igd_di_provisioningcode"></param>

+        <param name="Manufacturer"              get_func="cpe_get_igd_di_manufacturer"></param>

+        <param name="ManufacturerOUI"           get_func="cpe_get_igd_di_manufactureroui"></param>

+        <param name="ProductClass"              get_func="cpe_get_igd_di_productclass"></param>

+        <param name="SerialNumber"              get_func="cpe_get_igd_di_serialnumber"></param>

+        <object name="X_CT-COM_LoadInfo">

+          <param name="ProcessorLoad"   get_func="TRF_Get_ProcessorLoad"></param>

+          <param name="MemoryLoad" 	    get_func="TRF_Get_MemoryLoad"></param>

+        </object>

+      </object>

+      <object name="ManagementServer">

+        <param name="ConnectionRequestURL"   get_func="cpe_get_igd_ms_connectionrequesturl"></param>

+        <param name="ConnectionRequestUsername"     rw="1"      noti_rw="1"  get_func="cpe_get_igd_ms_connectionrequestusername" set_func="cpe_set_igd_ms_connectionrequestusername"></param>

+        <param name="ConnectionRequestPassword"     rw="1"      noti_rw="1"  get_func="cpe_get_igd_ms_connectionrequestpassword" set_func="cpe_set_igd_ms_connectionrequestpassword"></param>

+        <param name="Username"                      rw="1"      noti_rw="1"  get_func="cpe_get_igd_ms_username"      set_func="cpe_set_igd_ms_username"></param>

+        <param name="Password"                      rw="1"      noti_rw="1"  get_func="cpe_get_igd_ms_password"     set_func="cpe_set_igd_ms_password"></param>

+        <param name="URL"          noti_rw="1"      rw="1"                   get_func="cpe_get_igd_ms_url"  set_func="cpe_get_igd_ms_url"></param>

+        <param name="PeriodicInformEnable"          rw="1" noti_rw="1" type="s" get_func="TRF_Get_MS_PeriodicInformEnable"      set_func="TRF_Set_MS_PeriodicInformEnable"></param>

+        <param name="PeriodicInformInterval"        rw="1" noti_rw="1"  get_func="TRF_Get_MS_PeriodicInformInterval"    set_func="TRF_Set_MS_PeriodicInformInterval"></param>

+        <param name="PeriodicInformTime"            rw="1"          type="s" get_func="TRF_Get_MS_PeriodicInformTime"        set_func="TRF_Set_MS_PeriodicInformTime"></param>

+        <param name="ParameterKey" 						 get_func="TRF_Get_MS_ParameterKey" set_func="TRF_Set_MS_ParameterKey"/>

+        <param name="UDPConnectionRequestAddress"                            get_func="TRF_Get_MS_UDPConnectionRequestAddress" set_func="TRF_Set_MS_UDPConnectionRequestAddress"></param>

+        <param name="UDPConnectionRequestAddressNotificationLimit"   get_func="TRF_Get_MS_UDPConnectionNotficationLimit"></param>

+        <param name="STUNEnable"                    rw="1"          type="s" get_func="TRF_Get_MS_STUNEnable"        set_func="TRF_Set_MS_STUNEnable"></param>

+        <param name="STUNServerAddress"             rw="1"                   get_func="TRF_Get_MS_STUNServerAddress" set_func="TRF_Set_MS_STUNServerAddress"></param>

+        <param name="STUNServerPort"                rw="1"           get_func="TRF_Get_MS_STUNServerPort"    set_func="TRF_Set_MS_STUNServerPort"></param>

+        <param name="STUNUsername"                  rw="1"                   get_func="TRF_Get_MS_STUNUsername"      set_func="TRF_Set_MS_STUNUsername"></param>

+        <param name="STUNPassword"                  rw="1"                   get_func="TRF_Get_MS_STUNPassword"      set_func="TRF_Set_MS_STUNPassword"></param>

+        <param name="STUNMaximumKeepAlivePeriod"    rw="1"          type="s" get_func="TRF_Get_MS_STUNMaxPeriod"     set_func="TRF_Set_MS_STUNMaxPeriod"></param>

+        <param name="STUNMinimumKeepAlivePeriod"    rw="1"          type="s" get_func="TRF_Get_MS_STUNMinPeriod"     set_func="TRF_Set_MS_STUNMinPeriod"></param>

+        <param name="NATDetected"                                   type="s" get_func="TRF_Get_MS_NATDetected"       set_func="TRF_Set_MS_NATDetected"></param>

+      </object>

+      <object name="WANDevice" rw="1" refresh_func="TRF_Refresh_WANDevice">

+        <object name="{i}">

+          <param name="WANConnectionNumberOfEntries"  get_func="TRF_Get_WANConnectionNumberOfEntries"></param>

+          <object name="WANConnectionDevice" refresh_func="TRF_Refresh_WANConnection">

+            <object name="{i}">

+              <param name="WANIPConnectionNumberOfEntries"    get_func="TRF_Get_WANIPConnectionNumberOfEntries"></param>

+              <param name="WANPPPConnectionNumberOfEntries"   get_func="TRF_Get_WANPPPConnectionNumberOfEntries"></param>

+              <object name="WANIPConnection"  refresh_func="TRF_Refresh_WANIPorPPPConnection">

+                <object name="{i}">

+                  <param name="Enable"   		rw="1"		type="s" get_func="TRF_Get_WANIP_Enable" set_func="TRF_Set_WANIP_Enable"></param>

+                  <param name="AddressingType"  noti_rw="1"	rw="1"   get_func="TRF_Get_WANIP_AddressingType" set_func="TRF_Set_WANIP_AddressingType"></param>

+                  <param name="ExternalIPAddress" noti_rw="1" rw="1"   get_func="TRF_Get_WANIP_ExternalIPAddress" set_func="TRF_Set_WANIP_ExternalIPAddress"></param>

+                  <param name="SubnetMask"   	noti_rw="1"	rw="1"   get_func="TRF_Get_WANIP_SubnetMask" set_func="TRF_Set_WANIP_SubnetMask"></param>

+                  <param name="DefaultGateway"   			rw="1"   get_func="TRF_Get_WANIP_DefaultGateway" set_func="TRF_Set_WANIP_DefaultGateway"></param>

+                  <param name="DNSServers"   				rw="1"   get_func="TRF_Get_WANIP_DNSServers" set_func="TRF_Set_WANIP_DNSServers"></param>

+                  <param name="MACAddress"   				rw="1"   get_func="TRF_Get_WANIP_MACAddress" set_func="TRF_Set_WANIP_MACAddress"></param>

+                  <object name="Stats">

+                    <param name="EthernetBytesSent"   					 get_func="TRF_Get_WAN_Stats_BytesSent"></param>

+                    <param name="EthernetBytesReceived"   				 get_func="TRF_Get_WAN_Stats_BytesReceived"></param>

+                    <param name="EthernetPacketsSent"   				 get_func="TRF_Get_WAN_Stats_PacketsSent"></param>

+                    <param name="EthernetPacketsReceived"   			 get_func="TRF_Get_WAN_Stats_PacketsReceived"></param>

+                  </object>

+                </object>

+              </object>

+              <object name="WANPPPConnection" refresh_func="TRF_Refresh_WANIPorPPPConnection">

+                <object name="{i}">

+                  <param name="Enable"   			rw="1"	type="s" get_func="TRF_Get_WANPPP_Enable" set_func="TRF_Set_WANPPP_Enable"></param>

+                  <param name="DefaultGateway"  					 get_func="TRF_Get_WANPPP_DefaultGateway"></param>

+                  <param name="Username" noti_rw="1" rw="1"			 get_func="TRF_Get_WANPPP_Username" set_func="TRF_Set_WANPPP_Username"></param>

+                  <param name="Password" noti_rw="1" rw="1"			 get_func="TRF_Get_WANPPP_Password" set_func="TRF_Set_WANPPP_Password"></param>

+                  <param name="ExternalIPAddress" 					 get_func="TRF_Get_WANPPP_ExternalIPAddress"></param>

+                  <param name="DNSServers"   		rw="1"			 get_func="TRF_Get_WANPPP_DNSServers" set_func="TRF_Set_WANPPP_DNSServers"></param>

+                  <param name="MACAddress"   		rw="1"	type="s" get_func="TRF_Get_WANPPP_MACAddress" set_func="TRF_Set_WANPPP_MACAddress"></param>

+                  <param name="ConnectionTrigger"	rw="1"			 get_func="TRF_Get_WANPPP_ConnectionTrigger" set_func="TRF_Set_WANPPP_ConnectionTrigger"></param>

+				  <object name="Stats">

+					<param name="EthernetBytesSent"   					 get_func="TRF_Get_WAN_Stats_BytesSent"></param>

+					<param name="EthernetBytesReceived"   				 get_func="TRF_Get_WAN_Stats_BytesReceived"></param>

+					<param name="EthernetPacketsSent"   				 get_func="TRF_Get_WAN_Stats_PacketsSent"></param>

+					<param name="EthernetPacketsReceived"   			 get_func="TRF_Get_WAN_Stats_PacketsReceived"></param>

+				  </object>

+                </object>

+              </object>

+            </object>

+          </object>

+        </object>

+      </object>

+      <object name="IPPingDiagnostics">

+        <param name="DiagnosticsState"    rw="1"          	get_func="TRF_Get_Ping_DiagnosticsState"    set_func="TRF_Set_Ping_DiagnosticsState"></param>

+        <param name="Interface"           rw="1"   			get_func="TRF_Get_Ping_Interface"  		   set_func="TRF_Set_Ping_Interface"></param>

+        <param name="Host"                rw="1"			get_func="TRF_Get_Ping_Host" 			   set_func="TRF_Set_Ping_Host"></param>

+        <param name="NumberOfRepetitions" rw="1"    get_func="TRF_Get_Ping_NumberOfRepetitions" set_func="TRF_Set_Ping_NumberOfRepetitions"></param>

+        <param name="Timeout"             rw="1"    get_func="TRF_Get_Ping_Timeout" 			   set_func="TRF_Set_Ping_Timeout"></param>

+        <param name="DataBlockSize"       rw="1"    get_func="TRF_Get_Ping_DataBlockSize"       set_func="TRF_Set_Ping_DataBlockSize"></param>

+        <param name="DSCP"                rw="1"    get_func="TRF_Get_Ping_DSCP" 			   set_func="TRF_Set_Ping_DSCP"></param>

+        <param name="SuccessCount"                  get_func="TRF_Get_Ping_SuccessCount"></param>

+        <param name="FailureCount"                  get_func="TRF_Get_Ping_FailureCount"></param>

+        <param name="AverageResponseTime"           get_func="TRF_Get_Ping_AverageResponseTime"></param>

+        <param name="MinimumResponseTime"           get_func="TRF_Get_Ping_MinimumResponseTime"></param>

+        <param name="MaximumResponseTime"           get_func="TRF_Get_Ping_MaximumResponseTime"></param>

+      </object>

+      <object name="TraceRouteDiagnostics">

+        <param name="DiagnosticsState"   rw="1"             get_func="TRF_Get_Traceroute_DiagnosticsState" set_func="TRF_Set_Traceroute_DiagnosticsState"></param>

+        <param name="Interface"          rw="1"    		    get_func="TRF_Get_Traceroute_Interface" 		  set_func="TRF_Set_Traceroute_Interface"></param>

+        <param name="Host"               rw="1" 			get_func="TRF_Get_Traceroute_Host" 			  set_func="TRF_Set_Traceroute_Host"></param>

+        <param name="NumberOfTries"      rw="1"     get_func="TRF_Get_Traceroute_NumberOfTries" 	  set_func="TRF_Set_Traceroute_NumberOfTries"></param>

+        <param name="Timeout"            rw="1"     get_func="TRF_Get_Traceroute_Timeout" 		  set_func="TRF_Set_Traceroute_Timeout"></param>

+        <param name="DataBlockSize"      rw="1"     get_func="TRF_Get_Traceroute_DataBlockSize" 	  set_func="TRF_Set_Traceroute_DataBlockSize"></param>

+        <param name="DSCP"               rw="1"     get_func="TRF_Get_Traceroute_DSCP" 			  set_func="TRF_Set_Traceroute_DSCP"></param>

+        <param name="MaxHopCount"        rw="1"     get_func="TRF_Get_Traceroute_MaxHopCount" 	  set_func="TRF_Set_Traceroute_MaxHopCount"></param>

+        <param name="ResponseTime"                	get_func="TRF_Get_Traceroute_ResponseTime"></param>

+        <param name="RouteHopsNumberOfEntries"      get_func="TRF_Get_Traceroute_RouteHopsNumberOfEntries"></param>

+        <object name="RouteHops" refresh_func="TRF_Refresh_RouteHops">

+          <object name="{i}">

+            <param name="HopHost"              				get_func="TRF_Get_Traceroute_HopHost"></param>

+            <param name="HopHostAddress"              		get_func="TRF_Get_Traceroute_HopHostAddress"></param>

+            <param name="HopErrorCode"           	get_func="TRF_Get_Traceroute_HopErrorCode"></param>

+            <param name="HopRTTimes"              			get_func="TRF_Get_Traceroute_HopRTTimes"></param>

+          </object>

+        </object>

+      </object>

+      <object name="X_CT-COM_HttpGetDiagnostics">

+        <param name="DiagnosticsState"   rw="1"             get_func="TRF_Get_HttpGet_DiagnosticsState" 	set_func="TRF_Set_HttpGet_DiagnosticsState"></param>

+        <param name="Interface"          rw="1"    		    get_func="TRF_Get_HttpGet_Interface" 		set_func="TRF_Set_HttpGet_Interface"></param>

+        <param name="URL"          		 rw="1"    		    get_func="TRF_Get_HttpGet_URL" 		  		set_func="TRF_Set_HttpGet_URL"></param>

+        <param name="HttpVersion"        rw="1"    		    get_func="TRF_Get_HttpGet_HttpVersion" 		set_func="TRF_Set_HttpGet_HttpVersion"></param>

+        <param name="NumberOfRepetitions" rw="1"    get_func="TRF_Get_HttpGet_NumberOfRepetitions" set_func="TRF_Set_HttpGet_NumberOfRepetitions"></param>

+        <param name="Timeout"          	  rw="1"    get_func="TRF_Get_HttpGet_Timeout" 		  	set_func="TRF_Set_HttpGet_Timeout"></param>

+        <param name="SuccessCount"        		    get_func="TRF_Get_HttpGet_SuccessCount"></param>

+        <param name="FailureCount"				    get_func="TRF_Get_HttpGet_FailureCount"></param>

+        <param name="MinimumResponseTime"           get_func="TRF_Get_HttpGet_MinimumResponseTime"></param>

+        <param name="MaximumResponseTime"           get_func="TRF_Get_HttpGet_MaximumResponseTime"></param>

+        <param name="AverageResponseTime"           get_func="TRF_Get_HttpGet_AverageResponseTime"></param>

+      </object>

+      <object name="X_CT-COM_DNSQueryDiagnostics">

+        <param name="DiagnosticsState"   rw="1"             get_func="TRF_Get_DNSQuery_DiagnosticsState" 	set_func="TRF_Set_DNSQuery_DiagnosticsState"></param>

+        <param name="Interface"          rw="1"    		    get_func="TRF_Get_DNSQuery_Interface" 			set_func="TRF_Set_DNSQuery_Interface"></param>

+        <param name="DNSServerIP"        rw="1"    		    get_func="TRF_Get_DNSQuery_DNSServerIP" 		  	set_func="TRF_Set_DNSQuery_DNSServerIP"></param>

+        <param name="DomainName"         rw="1"    		    get_func="TRF_Get_DNSQuery_DomainName" 		  	set_func="TRF_Set_DNSQuery_DomainName"></param>

+        <param name="NumberOfRepetitions" rw="1"    get_func="TRF_Get_DNSQuery_NumberOfRepetitions"  set_func="TRF_Set_DNSQuery_NumberOfRepetitions"></param>

+        <param name="Timeout"          	  rw="1"    get_func="TRF_Get_DNSQuery_Timeout" 		  	    set_func="TRF_Set_DNSQuery_Timeout"></param>

+        <param name="SuccessCount"        		    get_func="TRF_Get_DNSQuery_SuccessCount"></param>

+        <param name="FailureCount"				    get_func="TRF_Get_DNSQuery_FailureCount"></param>

+        <param name="MinimumResponseTime"           get_func="TRF_Get_DNSQuery_MinimumResponseTime"></param>

+        <param name="MaximumResponseTime"           get_func="TRF_Get_DNSQuery_MaximumResponseTime"></param>

+        <param name="AverageResponseTime"           get_func="TRF_Get_DNSQuery_AverageResponseTime"></param>

+        <param name="ResponseParaList"						get_func="TRF_Get_DNSQuery_ResponseParaList"></param>

+      </object>

+    </object>

+  </model>

+  

+  

+  

+  

+  <inform>

+    <paramlist>

+      <param name="" />

+      

+    </paramlist>

+  </inform>

+  <rpc>

+    <init name="dev_init"></init>

+    <bootstrap name="dev_bootstrap"></bootstrap>

+    <factoryreset name="dev_factoryreset"></factoryreset>

+    <download name="dev_download"></download>

+    <upload name="dev_upload"></upload>

+    <reboot name="dev_reboot"></reboot>

+    <auth name="dev_get_auth"></auth>

+  

+  </rpc>

+  

+  <devlib name="/usr/lib/libotnms.so" />

+  

+

+  <listenport name="dev_get_listenport"></listenport>

+  

+  <wanparamname name="dev_get_wan_para"></wanparamname>

+  

+  

+ 

+</cwmp>

diff --git a/ap/app/cwmp/netcwmp/tests/src/test_model.c b/ap/app/cwmp/netcwmp/tests/src/test_model.c
new file mode 100755
index 0000000..cd5fbda
--- /dev/null
+++ b/ap/app/cwmp/netcwmp/tests/src/test_model.c
@@ -0,0 +1,88 @@
+#include "testutil.h"

+

+static void print_param(parameter_node_t * param, int level)

+{

+  if(!param) return; 

+ 

+  parameter_node_t * child;

+  char fmt[64];

+  //cwmp_log_debug("name: %s, type: %s, level: %d\n", param->name, cwmp_get_type_string(param->type), level);

+  int i=0;

+  

+  sprintf(fmt, "|%%-%d\s%%s", level*4);

+  

+  cwmp_log_debug_src(fmt, "----", param->name);

+  child = param->child;

+

+  if(!child)

+	return;

+  print_param(child, level+1);

+

+  parameter_node_t * next = child->next_sibling;

+

+  while(next)

+ {

+    print_param(next, level+1);

+    next = next->next_sibling;

+ }

+

+	

+}

+

+static void test_cwmp_model_load (abts_case *tc, void *data)

+{

+    cwmp_t * c = (cwmp_t*)data;

+    FUNCTION_TRACE();

+  

+    

+}

+

+

+

+static void test_cwmp_model_copy_parameter (abts_case *tc, void *data)

+{

+    cwmp_t * c = (cwmp_t*)data;

+    char * param_name = "InternetGatewayDevice.WANDevice.";

+    FUNCTION_TRACE();

+    parameter_node_t * param = cwmp_get_parameter_path_node(c->root, param_name);

+    

+     

+    parameter_node_t * new_param;

+    cwmp_model_copy_parameter(param, &new_param, 1);

+    print_param(c->root,0);

+    

+    param = cwmp_get_parameter_path_node(c->root, "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.");

+    cwmp_model_copy_parameter(param, &new_param, 1);

+    print_param(c->root,0);

+    

+    param = cwmp_get_parameter_path_node(c->root, "InternetGatewayDevice.WANDevice.");

+    cwmp_model_copy_parameter(param, &new_param, 2);

+    print_param(c->root,0);

+    

+    param = cwmp_get_parameter_path_node(c->root, "InternetGatewayDevice.WANDevice.1.");

+    cwmp_model_delete_parameter(param);

+    print_param(c->root,0);

+    

+    

+    param = cwmp_get_parameter_path_node(c->root, "InternetGatewayDevice.WANDevice.");

+    cwmp_model_copy_parameter(param, &new_param, 2);

+    print_param(c->root,0);

+    

+}

+

+

+

+

+extern cwmp_t * gcwmp;

+abts_suite *testsuite_model(abts_suite *suite)

+{

+    suite = ADD_SUITE(suite)

+  

+    abts_run_test(suite, test_cwmp_model_load, gcwmp);

+    abts_run_test(suite, test_cwmp_model_copy_parameter, gcwmp);

+     

+    

+    return suite;

+}

+

+ 

diff --git a/ap/app/cwmp/netcwmp/tests/src/test_pool.c b/ap/app/cwmp/netcwmp/tests/src/test_pool.c
new file mode 100755
index 0000000..6d6551b
--- /dev/null
+++ b/ap/app/cwmp/netcwmp/tests/src/test_pool.c
@@ -0,0 +1,58 @@
+#include <cwmp/pool.h>

+#include "testutil.h"

+

+

+static void test_pool(abts_case *tc, void*data)

+{

+    pool_t * p = pool_create(POOL_DEFAULT_SIZE);

+

+    char * c = pool_palloc(p, 1024);

+

+    pool_clear(p);

+

+

+pool_create(POOL_DEFAULT_SIZE);

+pool_create(POOL_DEFAULT_SIZE);

+pool_create(POOL_DEFAULT_SIZE);

+pool_create(POOL_DEFAULT_SIZE);

+pool_create(POOL_DEFAULT_SIZE);

+pool_create(POOL_DEFAULT_SIZE);

+

+    c = pool_palloc(p,3048);

+    c = pool_palloc(p,3048);

+

+    c = pool_palloc(p,5200);

+

+    pool_clear(p);

+

+    c = pool_palloc(p, 2048);

+    c = pool_palloc(p,6000);

+

+    c = pool_palloc(p, 2048);

+        c = pool_palloc(p, 2048);

+            c = pool_palloc(p, 2048);

+    c = pool_palloc(p, 2048);

+

+    c = pool_palloc(p, 2048);

+

+        c = pool_palloc(p, 2048);

+

+

+

+

+    pool_destroy(p);

+}

+

+

+

+abts_suite *testsuite_pool(abts_suite *suite)

+{

+        suite = ADD_SUITE(suite)

+

+

+        abts_run_test(suite, test_pool, NULL);

+

+    return suite; 

+}

+

+

diff --git a/ap/app/cwmp/netcwmp/tests/src/test_rpc.c b/ap/app/cwmp/netcwmp/tests/src/test_rpc.c
new file mode 100755
index 0000000..2840c59
--- /dev/null
+++ b/ap/app/cwmp/netcwmp/tests/src/test_rpc.c
@@ -0,0 +1,213 @@
+#include "testutil.h"

+

+

+

+

+static void test_cwmp_get_parameter_path_node (abts_case *tc, void *data)

+{

+    cwmp_t * c = (cwmp_t*)data;

+

+    parameter_node_t * param;

+    FUNCTION_TRACE();

+    param = cwmp_get_parameter_path_node(c->root, "InternetGatewayDevice.");

+    ASSERT_NOTNULL(param);

+    param = cwmp_get_parameter_path_node(c->root, "InternetGatewayDevice.WANDevice.{i}.WANConnectionNumberOfEntries");

+    ASSERT_NOTNULL(param);

+    param = cwmp_get_parameter_path_node(c->root, "InternetGatewayDevice.WANDevice.1.WANConnectionNumberOfEntries");

+    ASSERT_NULL(param);

+    

+}

+

+

+

+static void test_getset_parameter_node_value (abts_case *tc, void *data)

+{

+    cwmp_t * c = (cwmp_t*)data;

+

+    parameter_node_t * param;

+    char * name = "InternetGatewayDevice.DeviceInfo.SoftwareVersion";

+    char * retval;

+    char * value ;

+    

+    pool_t * pool = pool_create(POOL_DEFAULT_SIZE);

+    FUNCTION_TRACE();

+    param = cwmp_get_parameter_path_node(c->root, name);

+    ASSERT_NOTNULL(param);

+    

+    value = "V1.3.x";

+

+    cwmp_set_parameter_node_value(c, param, name, value, strlen(value));

+    

+    retval = cwmp_data_get_parameter_value(c, param, name, pool);

+    printf("retval ------------------is %s\n", retval);

+    ASSERT_STR_EQ(value, retval);

+   

+    

+    value = "V1.4.x";

+    cwmp_set_parameter_node_value(c, param, name, value, strlen(value));

+    retval = cwmp_data_get_parameter_value(c, param, name, pool);

+    ASSERT_STR_EQ(value, retval);

+    

+    

+    pool_destroy(pool);

+

+}

+

+static void test_cwmp_session_create_getparameternames(abts_case *tc, void *data)

+{

+    cwmp_t * cwmp = (cwmp_t*)data;

+    pool_t * pool = pool_create(POOL_DEFAULT_SIZE);

+    xmldoc_t *  doc, *newdoc;

+    char * message = "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \

+                       xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:cwmp=\"urn:dslforum-org:cwmp-1-0\" xmlns=\"urn:dslforum-org:cwmp-1-0\"><SOAP-ENV:Header><cwmp:ID>129479899093788892</cwmp:ID><cwmp:NoMoreRequests>0</cwmp:NoMoreRequests></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:GetParameterNames><ParameterPath>InternetGatewayDevice.</ParameterPath><NextLevel>1</NextLevel></cwmp:GetParameterNames></SOAP-ENV:Body></SOAP-ENV:Envelope>"

+    ;

+

+    cwmp_session_t * session = cwmp_session_create(cwmp);

+    cwmp_session_open(session);

+

+

+    cwmp_uint32_t msglength = strlen(message);

+    size_t len;

+

+    char *xmlbuf = pool_palloc(pool, msglength+32);

+

+    len = sprintf(xmlbuf,"<cwmp>");

+    strncpy(xmlbuf + len, message, msglength);

+    strncpy(xmlbuf + len + msglength, "</cwmp>", strlen("</cwmp>"));

+

+    printf("agent analyse xml: \n%s", xmlbuf);

+

+    doc = XmlParseBuffer(pool, xmlbuf);

+    ASSERT_NOTNULL(doc);

+

+    newdoc = cwmp_session_create_getparameternames_response_message(session, doc, pool);

+

+    cwmp_write_doc_to_chunk(newdoc, session->writers,  pool);

+

+    cwmp_chunk_print(session->writers);

+

+    pool_destroy(pool);

+

+}

+

+static void test_cwmp_session_create_addobject(abts_case *tc, void *data)

+{

+    cwmp_t * cwmp = (cwmp_t*)data;

+    pool_t * pool = pool_create(POOL_DEFAULT_SIZE);

+    xmldoc_t *  doc, *newdoc;

+    char * message = "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \

+                       xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:cwmp=\"urn:dslforum-org:cwmp-1-0\" xmlns=\"urn:dslforum-org:cwmp-1-0\"><SOAP-ENV:Header><cwmp:ID soap:mustUnderstand=\"1\">1234</cwmp:ID></SOAP-ENV:Header>  \

+                       <SOAP-ENV:Body><cwmp:AddObject><ObjectName>InternetGatewayDevice.WANDevice.</ObjectName><ParameterKey></ParameterKey></cwmp:AddObject></SOAP-ENV:Body></SOAP-ENV:Envelope>"

+    ;

+   

+

+   printf("create session\n"); 

+    cwmp_session_t * session = cwmp_session_create(cwmp);

+    pool_create(POOL_DEFAULT_SIZE);

+   pool_create(POOL_DEFAULT_SIZE);

+  pool_create(POOL_DEFAULT_SIZE);

+ pool_create(POOL_DEFAULT_SIZE);

+pool_create(POOL_DEFAULT_SIZE);

+pool_create(POOL_DEFAULT_SIZE);

+pool_create(POOL_DEFAULT_SIZE);

+pool_create(POOL_DEFAULT_SIZE);

+ printf("open session \n"); 

+    cwmp_session_open(session);

+  

+   

+

+       

+    cwmp_uint32_t msglength = strlen(message);

+    size_t len;

+

+    char *xmlbuf = pool_palloc(pool, msglength+32);

+

+    len = sprintf(xmlbuf,"<cwmp>");

+    strncpy(xmlbuf + len, message, msglength);

+    strncpy(xmlbuf + len + msglength, "</cwmp>", strlen("</cwmp>"));

+//    strcat(xmlbuf, "</cwmp>");

+ //   xmlbuf[len+msglength+7] = '\0';

+

+    printf("agent analyse xml: \n%s", xmlbuf);

+

+    doc = XmlParseBuffer(pool, xmlbuf);

+    ASSERT_NOTNULL(doc);

+    

+    newdoc = cwmp_session_create_addobject_response_message(session, doc, pool);

+    

+    cwmp_write_doc_to_chunk(newdoc, session->writers,  pool);

+    

+    cwmp_chunk_print(session->writers);

+    

+    pool_destroy(pool);

+

+}

+

+

+

+

+static void test_cwmp_session_create_deleteobject(abts_case *tc, void *data)

+{

+    cwmp_t * cwmp = (cwmp_t*)data;

+    pool_t * pool = pool_create(POOL_DEFAULT_SIZE);

+    xmldoc_t *  doc, *newdoc;

+    char * message = "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \

+                       xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:cwmp=\"urn:dslforum-org:cwmp-1-0\" xmlns=\"urn:dslforum-org:cwmp-1-0\"><SOAP-ENV:Header><cwmp:ID soap:mustUnderstand=\"1\">1234</cwmp:ID></SOAP-ENV:Header>  \

+                       <SOAP-ENV:Body><cwmp:DeleteObject><ObjectName>InternetGatewayDevice.WANDevice.1</ObjectName><ParameterKey></ParameterKey></cwmp:DeleteObject></SOAP-ENV:Body></SOAP-ENV:Envelope>"

+    ;

+    

+    cwmp_session_t * session = cwmp_session_create(cwmp);

+    cwmp_session_open(session);

+   

+       

+    cwmp_uint32_t msglength = strlen(message);

+    size_t len;

+

+    char *xmlbuf = pool_palloc(pool, msglength+32);

+

+    len = sprintf(xmlbuf,"<cwmp>");

+    strncpy(xmlbuf + len, message, msglength);

+    strncat(xmlbuf, "</cwmp>", strlen("</cwmp>"));

+

+    printf("agent analyse xml: \n%s", xmlbuf);

+

+    doc = XmlParseBuffer(pool, xmlbuf);

+    ASSERT_NOTNULL(doc);

+    

+    newdoc = cwmp_session_create_deleteobject_response_message(session, doc, pool);

+    

+    cwmp_write_doc_to_chunk(newdoc, session->writers,  pool);

+    

+    cwmp_chunk_print(session->writers);

+    

+    pool_destroy(pool);

+

+}

+

+

+

+extern cwmp_t * gcwmp;

+abts_suite *testsuite_rpc(abts_suite *suite)

+{

+    suite = ADD_SUITE(suite)

+  

+  

+//    abts_run_test(suite, test_cwmp_get_parameter_path_node, gcwmp);

+    

+//    abts_run_test(suite, test_getset_parameter_node_value, gcwmp);

+       

+//   abts_run_test(suite, test_cwmp_session_create_getparameternames, gcwmp);

+

+ 

+    abts_run_test(suite, test_cwmp_session_create_addobject, gcwmp);

+        

+//    abts_run_test(suite, test_cwmp_session_create_deleteobject, gcwmp);

+    

+    

+    return suite;

+}

+

+ 

+ 

+ 

+ 

diff --git a/ap/app/cwmp/netcwmp/tests/src/testutil.c b/ap/app/cwmp/netcwmp/tests/src/testutil.c
new file mode 100755
index 0000000..6d4057a
--- /dev/null
+++ b/ap/app/cwmp/netcwmp/tests/src/testutil.c
@@ -0,0 +1,86 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more

+ * contributor license agreements.  See the NOTICE file distributed with

+ * this work for additional information regarding copyright ownership.

+ * The ASF licenses this file to You under the Apache License, Version 2.0

+ * (the "License"); you may not use this file except in compliance with

+ * the License.  You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+

+#include <stdio.h>

+#include <stdlib.h>

+

+#include "abts.h"

+#include "testutil.h"

+

+

+cwmp_t * gcwmp;

+pool_t * gpool;

+

+static char *native_strerror(int statcode, char *buf,

+		size_t bufsize)

+{

+	const char *err = strerror(statcode);

+	if (err) {

+		return strncpy(buf, err, bufsize);

+	} else {

+		return strncpy(buf,  "APR does not understand this error code", bufsize);

+	}

+}

+

+void  assert_success(abts_case* tc, const char* context, int rv, 

+		int lineno) 

+{

+	if (rv == 500) {

+		abts_not_impl(tc, context, lineno);

+	} else if (rv != CWMP_OK) {

+		char buf[STRING_MAX], ebuf[128];

+		snprintf(buf, STRING_MAX, "%s (%d): %s\n", context, rv,

+				native_strerror(rv, ebuf, sizeof ebuf));

+		abts_fail(tc, buf, lineno);

+	}

+}

+

+void initialize(void) {

+

+	cwmp_log_init(NULL, CWMP_LOG_DEBUG);

+

+	gpool = (pool_t*)pool_create(POOL_DEFAULT_SIZE);

+	if(NULL == gpool)

+	{

+	    cwmp_log_error("pool create return null, size: POOL_DEFAULT_SIZE");

+		exit(-1);

+	}

+

+	

+	gcwmp = (cwmp_t*)pool_palloc(gpool, sizeof(cwmp_t));

+	if(!gcwmp)

+	{

+		cwmp_log_error("create cwmp_t error!");

+		exit(-1);

+	}

+	cwmp_log_debug("cwmp at %p", gcwmp);

+	if(!gcwmp->pool)

+	{

+		cwmp_log_debug("cwmp pool at %p", gpool);

+		gcwmp->pool = gpool;   

+	}

+

+	cwmp_model_load_xml(gcwmp, "device.xml", NULL, 0);

+

+	char * envstr;

+	char * encstr;

+

+	envstr = "SOAP-ENV"; //cwmp_conf_get("cwmp:soap_env");

+	encstr = "SOAP-ENC"; // cwmp_conf_get("cwmp:soap_enc");

+

+	cwmp_set_envelope_ns(envstr, encstr);

+

+}

diff --git a/ap/app/cwmp/netcwmp/tests/src/testutil.h b/ap/app/cwmp/netcwmp/tests/src/testutil.h
new file mode 100755
index 0000000..8ba3f6d
--- /dev/null
+++ b/ap/app/cwmp/netcwmp/tests/src/testutil.h
@@ -0,0 +1,68 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more

+ * contributor license agreements.  See the NOTICE file distributed with

+ * this work for additional information regarding copyright ownership.

+ * The ASF licenses this file to You under the Apache License, Version 2.0

+ * (the "License"); you may not use this file except in compliance with

+ * the License.  You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+#ifndef TEST_UTIL

+#define TEST_UTIL

+

+

+#include <cwmp/types.h>

+#include <cwmp/pool.h>

+#include <cwmp/cfg.h>

+#include <cwmp/session.h>

+#include <cwmp/log.h>

+#include <cwmp/event.h>

+#include <cwmp/queue.h>

+#include <cwmp/buffer.h>

+#include <cwmp/cwmp.h>

+#include <cwmp/model.h>

+#include "abts.h"

+

+

+

+/* XXX FIXME */

+#ifdef WIN32

+#define EXTENSION ".exe"

+#elif NETWARE

+#define EXTENSION ".nlm"

+#else

+#define EXTENSION

+#endif

+

+

+#define  STRING_MAX    8096

+

+/* Some simple functions to make the test apps easier to write and

+ * a bit more consistent...

+ */

+

+

+

+/* Assert that RV is an APR_SUCCESS value; else fail giving strerror

+ * for RV and CONTEXT message. */

+void assert_success(abts_case* tc, const char *context, 

+                        int rv, int lineno);

+#define  ASSERT_SUCCESS(tc, ctxt, rv) \

+             assert_success(tc, ctxt, rv, __LINE__)

+

+void initialize(void);

+

+

+abts_suite *testsuite_model(abts_suite *suite);

+abts_suite *testsuite_rpc(abts_suite *suite);

+abts_suite *testsuite_pool(abts_suite *suite);

+

+#endif /* APR_TEST_INCLUDES */

+

+