[Openvas-commits] r3457 - in trunk/openvas-manager: . src/tests

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri May 22 11:07:06 CEST 2009


Author: mattm
Date: 2009-05-22 11:07:04 +0200 (Fri, 22 May 2009)
New Revision: 3457

Added:
   trunk/openvas-manager/src/tests/make_report_uuid_0.c
   trunk/openvas-manager/src/tests/report_path_task_uuid_0.c
   trunk/openvas-manager/src/tests/report_path_task_uuid_1.c
   trunk/openvas-manager/src/tests/report_path_task_uuid_2.c
Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/tests/CMakeLists.txt
Log:
	* src/tests/make_report_id_0.c: Rename make_report_uuid_0.c.
	* src/tests/report_path_task_name_0.c: Rename report_path_task_uuid_0.c.
	* src/tests/report_path_task_name_1.c: Rename report_path_task_uuid_1.c.
	* src/tests/report_path_task_name_2.c: Rename report_path_task_uuid_2.c.

	* src/tests/make_report_uuid_0.c, src/tests/report_path_task_uuid_0.c,
	src/tests/report_path_task_uuid_1.c,
	src/tests/report_path_task_uuid_2.c: Update function names in header
	comments.

	* src/tests/CMakeLists.txt: Update file names.  Remove duplicate entries.

Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog	2009-05-22 08:20:17 UTC (rev 3456)
+++ trunk/openvas-manager/ChangeLog	2009-05-22 09:07:04 UTC (rev 3457)
@@ -1,3 +1,17 @@
+2009-05-22  Matthew Mundell <mmundell at intevation.de>
+
+	* src/tests/make_report_id_0.c: Rename make_report_uuid_0.c.
+	* src/tests/report_path_task_name_0.c: Rename report_path_task_uuid_0.c.
+	* src/tests/report_path_task_name_1.c: Rename report_path_task_uuid_1.c.
+	* src/tests/report_path_task_name_2.c: Rename report_path_task_uuid_2.c.
+
+	* src/tests/make_report_uuid_0.c, src/tests/report_path_task_uuid_0.c,
+	src/tests/report_path_task_uuid_1.c,
+	src/tests/report_path_task_uuid_2.c: Update function names in header
+	comments.
+
+	* src/tests/CMakeLists.txt: Update file names.  Remove duplicate entries.
+
 2009-05-20  Matthew Mundell <mmundell at intevation.de>
 
 	* src/manage.c (report_task): Correct variable name.  Move free to after

Modified: trunk/openvas-manager/src/tests/CMakeLists.txt
===================================================================
--- trunk/openvas-manager/src/tests/CMakeLists.txt	2009-05-22 08:20:17 UTC (rev 3456)
+++ trunk/openvas-manager/src/tests/CMakeLists.txt	2009-05-22 09:07:04 UTC (rev 3457)
@@ -54,11 +54,11 @@
 link_directories (${COMMON_BINARY_DIRECTORY}/string)
 link_directories (${COMMON_BINARY_DIRECTORY}/file)
 
-add_executable (make_report_id_0 make_report_id_0.c)
-target_link_libraries (make_report_id_0 manage ovas-mngr-comm string file)
-set_target_properties (make_report_id_0 PROPERTIES COMPILE_FLAGS "-I .. ${GLIB_CFLAGS}")
-set_target_properties (make_report_id_0 PROPERTIES LINK_FLAGS "${OVAS_LDFLAG} ${GLIB_LDFLAGS} -lossp-uuid")
-ADD_TEST (make_report_id_0 make_report_id_0)
+add_executable (make_report_uuid_0 make_report_uuid_0.c)
+target_link_libraries (make_report_uuid_0 manage ovas-mngr-comm string file)
+set_target_properties (make_report_uuid_0 PROPERTIES COMPILE_FLAGS "-I .. ${GLIB_CFLAGS}")
+set_target_properties (make_report_uuid_0 PROPERTIES LINK_FLAGS "${OVAS_LDFLAG} ${GLIB_LDFLAGS} -lossp-uuid")
+ADD_TEST (make_report_uuid_0 make_report_uuid_0)
 
 add_executable (rmdir_recursively_0 rmdir_recursively_0.c)
 target_link_libraries (rmdir_recursively_0 file)
@@ -72,23 +72,23 @@
 set_target_properties (rmdir_recursively_1 PROPERTIES LINK_FLAGS "${GLIB_LDFLAGS}")
 ADD_TEST (rmdir_recursively_1 rmdir_recursively_1)
 
-add_executable (report_path_task_name_0 report_path_task_name_0.c)
-target_link_libraries (report_path_task_name_0 manage ovas-mngr-comm string file)
-set_target_properties (report_path_task_name_0 PROPERTIES COMPILE_FLAGS "-I .. ${GLIB_CFLAGS}")
-set_target_properties (report_path_task_name_0 PROPERTIES LINK_FLAGS "${OVAS_LDFLAG} ${GLIB_LDFLAGS} -lossp-uuid")
-ADD_TEST (report_path_task_name_0 report_path_task_name_0)
+add_executable (report_path_task_uuid_0 report_path_task_uuid_0.c)
+target_link_libraries (report_path_task_uuid_0 manage ovas-mngr-comm string file)
+set_target_properties (report_path_task_uuid_0 PROPERTIES COMPILE_FLAGS "-I .. ${GLIB_CFLAGS}")
+set_target_properties (report_path_task_uuid_0 PROPERTIES LINK_FLAGS "${OVAS_LDFLAG} ${GLIB_LDFLAGS} -lossp-uuid")
+ADD_TEST (report_path_task_uuid_0 report_path_task_uuid_0)
 
-add_executable (report_path_task_name_1 report_path_task_name_1.c)
-target_link_libraries (report_path_task_name_1 manage ovas-mngr-comm string file)
-set_target_properties (report_path_task_name_1 PROPERTIES COMPILE_FLAGS "-I .. ${GLIB_CFLAGS}")
-set_target_properties (report_path_task_name_1 PROPERTIES LINK_FLAGS "${OVAS_LDFLAG} ${GLIB_LDFLAGS} -lossp-uuid")
-ADD_TEST (report_path_task_name_1 report_path_task_name_1)
+add_executable (report_path_task_uuid_1 report_path_task_uuid_1.c)
+target_link_libraries (report_path_task_uuid_1 manage ovas-mngr-comm string file)
+set_target_properties (report_path_task_uuid_1 PROPERTIES COMPILE_FLAGS "-I .. ${GLIB_CFLAGS}")
+set_target_properties (report_path_task_uuid_1 PROPERTIES LINK_FLAGS "${OVAS_LDFLAG} ${GLIB_LDFLAGS} -lossp-uuid")
+ADD_TEST (report_path_task_uuid_1 report_path_task_uuid_1)
 
-add_executable (report_path_task_name_2 report_path_task_name_2.c)
-target_link_libraries (report_path_task_name_2 manage ovas-mngr-comm string file)
-set_target_properties (report_path_task_name_2 PROPERTIES COMPILE_FLAGS "-I .. ${GLIB_CFLAGS}")
-set_target_properties (report_path_task_name_2 PROPERTIES LINK_FLAGS "${OVAS_LDFLAG} ${GLIB_LDFLAGS} -lossp-uuid")
-ADD_TEST (report_path_task_name_2 report_path_task_name_2)
+add_executable (report_path_task_uuid_2 report_path_task_uuid_2.c)
+target_link_libraries (report_path_task_uuid_2 manage ovas-mngr-comm string file)
+set_target_properties (report_path_task_uuid_2 PROPERTIES COMPILE_FLAGS "-I .. ${GLIB_CFLAGS}")
+set_target_properties (report_path_task_uuid_2 PROPERTIES LINK_FLAGS "${OVAS_LDFLAG} ${GLIB_LDFLAGS} -lossp-uuid")
+ADD_TEST (report_path_task_uuid_2 report_path_task_uuid_2)
 
 add_executable (strip_space_0 strip_space_0.c)
 target_link_libraries (strip_space_0 string)
@@ -347,22 +347,4 @@
 target_link_libraries (omp_version_0 common)
 ADD_TEST (omp_version_0 omp_version_0)
 
-add_executable (report_path_task_name_0 report_path_task_name_0.c)
-target_link_libraries (report_path_task_name_0 manage ovas-mngr-comm string file)
-set_target_properties (report_path_task_name_0 PROPERTIES COMPILE_FLAGS "-I .. ${GLIB_CFLAGS}")
-set_target_properties (report_path_task_name_0 PROPERTIES LINK_FLAGS "${OVAS_LDFLAG} ${GLIB_LDFLAGS} -lossp-uuid")
-ADD_TEST (report_path_task_name_0 report_path_task_name_0)
-
-add_executable (report_path_task_name_1 report_path_task_name_1.c)
-target_link_libraries (report_path_task_name_1 manage ovas-mngr-comm string file)
-set_target_properties (report_path_task_name_1 PROPERTIES COMPILE_FLAGS "-I .. ${GLIB_CFLAGS}")
-set_target_properties (report_path_task_name_1 PROPERTIES LINK_FLAGS "${OVAS_LDFLAG} ${GLIB_LDFLAGS} -lossp-uuid")
-ADD_TEST (report_path_task_name_1 report_path_task_name_1)
-
-add_executable (report_path_task_name_2 report_path_task_name_2.c)
-target_link_libraries (report_path_task_name_2 manage ovas-mngr-comm string file)
-set_target_properties (report_path_task_name_2 PROPERTIES COMPILE_FLAGS "-I .. ${GLIB_CFLAGS}")
-set_target_properties (report_path_task_name_2 PROPERTIES LINK_FLAGS "${OVAS_LDFLAG} ${GLIB_LDFLAGS} -lossp-uuid")
-ADD_TEST (report_path_task_name_2 report_path_task_name_2)
-
 ## End

Copied: trunk/openvas-manager/src/tests/make_report_uuid_0.c (from rev 3442, trunk/openvas-manager/src/tests/make_report_id_0.c)
===================================================================
--- trunk/openvas-manager/src/tests/make_report_id_0.c	2009-05-20 12:55:30 UTC (rev 3442)
+++ trunk/openvas-manager/src/tests/make_report_uuid_0.c	2009-05-22 09:07:04 UTC (rev 3457)
@@ -0,0 +1,42 @@
+/* Test 0 of make_report_uuid.
+ * $Id$
+ * Description: Test make_report_uuid.
+ *
+ * Authors:
+ * Matthew Mundell <matt at mundell.ukfsn.org>
+ *
+ * Copyright:
+ * Copyright (C) 2009 Greenbone Networks GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2,
+ * or, at your option, any later version as published by the Free
+ * Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../manage.h"
+
+int
+main ()
+{
+  char* id1 = make_report_uuid ();
+  char* id2 = make_report_uuid ();
+  int ret = strcmp (id1, id2);
+  free (id1);
+  free (id2);
+  if (ret) return EXIT_SUCCESS;
+  return EXIT_FAILURE;
+}

Copied: trunk/openvas-manager/src/tests/report_path_task_uuid_0.c (from rev 3442, trunk/openvas-manager/src/tests/report_path_task_name_0.c)
===================================================================
--- trunk/openvas-manager/src/tests/report_path_task_name_0.c	2009-05-20 12:55:30 UTC (rev 3442)
+++ trunk/openvas-manager/src/tests/report_path_task_uuid_0.c	2009-05-22 09:07:04 UTC (rev 3457)
@@ -0,0 +1,40 @@
+/* Test 0 of report_path_task_uuid.
+ * $Id$
+ * Description: Test report_path_task_uuid.
+ *
+ * Authors:
+ * Matthew Mundell <matt at mundell.ukfsn.org>
+ *
+ * Copyright:
+ * Copyright (C) 2009 Greenbone Networks GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2,
+ * or, at your option, any later version as published by the Free
+ * Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../manage.h"
+
+int
+main ()
+{
+  gchar* name = report_path_task_uuid ("/var/lib/openvas/mgr/users/user/tasks/01-abc-02001020/reports/report-id");
+  int ret = strcmp (name, "01-abc-02001020");
+  g_free (name);
+  if (ret) return EXIT_FAILURE;
+  return EXIT_SUCCESS;
+}

Copied: trunk/openvas-manager/src/tests/report_path_task_uuid_1.c (from rev 3442, trunk/openvas-manager/src/tests/report_path_task_name_1.c)
===================================================================
--- trunk/openvas-manager/src/tests/report_path_task_name_1.c	2009-05-20 12:55:30 UTC (rev 3442)
+++ trunk/openvas-manager/src/tests/report_path_task_uuid_1.c	2009-05-22 09:07:04 UTC (rev 3457)
@@ -0,0 +1,40 @@
+/* Test 1 of report_path_task_uuid.
+ * $Id$
+ * Description: Test report_path_task_uuid with a trailing slash.
+ *
+ * Authors:
+ * Matthew Mundell <matt at mundell.ukfsn.org>
+ *
+ * Copyright:
+ * Copyright (C) 2009 Greenbone Networks GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2,
+ * or, at your option, any later version as published by the Free
+ * Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../manage.h"
+
+int
+main ()
+{
+  gchar* name = report_path_task_uuid ("/var/lib/openvas/mgr/users/user/tasks/01-abc-02001020/reports/report-id/");
+  int ret = strcmp (name, "01-abc-02001020");
+  g_free (name);
+  if (ret) return EXIT_FAILURE;
+  return EXIT_SUCCESS;
+}

Copied: trunk/openvas-manager/src/tests/report_path_task_uuid_2.c (from rev 3442, trunk/openvas-manager/src/tests/report_path_task_name_2.c)
===================================================================
--- trunk/openvas-manager/src/tests/report_path_task_name_2.c	2009-05-20 12:55:30 UTC (rev 3442)
+++ trunk/openvas-manager/src/tests/report_path_task_uuid_2.c	2009-05-22 09:07:04 UTC (rev 3457)
@@ -0,0 +1,40 @@
+/* Test 2 of report_path_task_uuid.
+ * $Id$
+ * Description: Test report_path_task_uuid with a relative path.
+ *
+ * Authors:
+ * Matthew Mundell <matt at mundell.ukfsn.org>
+ *
+ * Copyright:
+ * Copyright (C) 2009 Greenbone Networks GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2,
+ * or, at your option, any later version as published by the Free
+ * Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../manage.h"
+
+int
+main ()
+{
+  gchar* name = report_path_task_uuid ("01-abc-02001020/reports/report-id/");
+  int ret = strcmp (name, "01-abc-02001020");
+  g_free (name);
+  if (ret) return EXIT_FAILURE;
+  return EXIT_SUCCESS;
+}



More information about the Openvas-commits mailing list