2 This file is part of GNUnet.
3 (C) 2011 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
21 * @file mesh/test_mesh_small.c
23 * @brief Test for the mesh service: retransmission of traffic.
26 #include "gnunet_testing_lib.h"
27 #include "gnunet_mesh_service_new.h"
29 #define VERBOSE GNUNET_YES
30 #define REMOVE_DIR GNUNET_YES
34 struct MeshPeer *prev;
36 struct MeshPeer *next;
38 struct GNUNET_TESTING_Daemon *daemon;
40 struct GNUNET_MESH_Handle *mesh_handle;
46 unsigned long long total_mesh_bytes;
51 * How long until we give up on connecting the peers?
53 #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1500)
56 * Time to wait for stuff that should be rather fast
58 #define SHORT_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
61 * DIFFERENT TESTS TO RUN
68 * Which test are we running?
73 * How many events have happened
77 static int peers_in_tunnel;
79 static int peers_responded;
87 * Total number of peers in the test.
89 static unsigned long long num_peers;
92 * Global configuration file
94 static struct GNUNET_CONFIGURATION_Handle *testing_cfg;
97 * Total number of currently running peers.
99 static unsigned long long peers_running;
102 * Total number of connections in the whole network.
104 static unsigned int total_connections;
107 * The currently running peer group.
109 static struct GNUNET_TESTING_PeerGroup *pg;
112 * File to report results to.
114 static struct GNUNET_DISK_FileHandle *output_file;
117 * File to log connection info, statistics to.
119 static struct GNUNET_DISK_FileHandle *data_file;
122 * How many data points to capture before triggering next round?
124 static struct GNUNET_TIME_Relative wait_time;
127 * Task called to disconnect peers.
129 static GNUNET_SCHEDULER_TaskIdentifier disconnect_task;
132 * Task To perform tests
134 static GNUNET_SCHEDULER_TaskIdentifier test_task;
137 * Task called to shutdown test.
139 static GNUNET_SCHEDULER_TaskIdentifier shutdown_handle;
141 static char *topology_file;
143 static struct GNUNET_TESTING_Daemon *d1;
145 static GNUNET_PEER_Id pid1;
147 static struct GNUNET_TESTING_Daemon *d2;
149 static struct GNUNET_TESTING_Daemon *d3;
151 static struct GNUNET_MESH_Handle *h1;
153 static struct GNUNET_MESH_Handle *h2;
155 static struct GNUNET_MESH_Handle *h3;
157 static struct GNUNET_MESH_Tunnel *t;
159 static struct GNUNET_MESH_Tunnel *incoming_t;
161 static struct GNUNET_MESH_Tunnel *incoming_t2;
163 static uint16_t *mesh_peers;
166 * Check whether peers successfully shut down.
169 shutdown_callback (void *cls, const char *emsg)
174 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "***************** test: Shutdown of peers failed!\n");
181 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "***************** test: All peers successfully shut down!\n");
188 shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
191 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "***************** test: Ending test.\n");
194 if (disconnect_task != GNUNET_SCHEDULER_NO_TASK)
196 GNUNET_SCHEDULER_cancel (disconnect_task);
197 disconnect_task = GNUNET_SCHEDULER_NO_TASK;
200 if (data_file != NULL)
201 GNUNET_DISK_file_close (data_file);
202 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
203 GNUNET_CONFIGURATION_destroy (testing_cfg);
208 disconnect_mesh_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
210 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
211 "***************** test: disconnecting mesh service of peers\n");
212 disconnect_task = GNUNET_SCHEDULER_NO_TASK;
213 GNUNET_MESH_disconnect(h1);
214 GNUNET_MESH_disconnect(h2);
215 if (test == MULTICAST)
216 GNUNET_MESH_disconnect(h3);
217 if (GNUNET_SCHEDULER_NO_TASK != shutdown_handle)
219 GNUNET_SCHEDULER_cancel (shutdown_handle);
220 shutdown_handle = GNUNET_SCHEDULER_add_now(&shutdown_task, NULL);
226 * Transmit ready callback
229 tmt_rdy (void *cls, size_t size, void *buf)
231 struct GNUNET_MessageHeader *msg = buf;
233 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "***************** test: tmt_rdy called\n");
234 if (size < sizeof(struct GNUNET_MessageHeader) || NULL == buf)
236 msg->size = htons (sizeof(struct GNUNET_MessageHeader));
237 msg->type = htons ((long) cls);
238 return sizeof(struct GNUNET_MessageHeader);
243 * Function is called whenever a message is received.
245 * @param cls closure (set from GNUNET_MESH_connect)
246 * @param tunnel connection to the other end
247 * @param tunnel_ctx place to store local state associated with the tunnel
248 * @param sender who sent the message
249 * @param message the actual message
250 * @param atsi performance data for the connection
251 * @return GNUNET_OK to keep the connection open,
252 * GNUNET_SYSERR to close it (signal serious error)
255 data_callback (void *cls,
256 struct GNUNET_MESH_Tunnel * tunnel,
258 const struct GNUNET_PeerIdentity *sender,
259 const struct GNUNET_MessageHeader *message,
260 const struct GNUNET_ATS_Information *atsi)
262 long client = (long) cls;
267 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
268 "***************** test: Origin client got a response!\n");
271 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
273 GNUNET_SCHEDULER_cancel (disconnect_task);
274 disconnect_task = GNUNET_SCHEDULER_add_delayed(SHORT_TIME,
275 &disconnect_mesh_peers,
278 if (test == MULTICAST && peers_responded < 2)
280 GNUNET_MESH_tunnel_destroy (tunnel);
284 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
285 "***************** test: Destination client %u got a message.\n",
288 GNUNET_MESH_notify_transmit_ready(tunnel,
291 GNUNET_TIME_UNIT_FOREVER_REL,
293 sizeof(struct GNUNET_MessageHeader),
296 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
298 GNUNET_SCHEDULER_cancel (disconnect_task);
299 disconnect_task = GNUNET_SCHEDULER_add_delayed(SHORT_TIME,
300 &disconnect_mesh_peers,
312 * Handlers, for diverse services
314 static struct GNUNET_MESH_MessageHandler handlers[] = {
315 {&data_callback, 1, sizeof(struct GNUNET_MessageHeader)},
321 * Method called whenever another peer has added us to a tunnel
322 * the other peer initiated.
325 * @param tunnel new handle to the tunnel
326 * @param initiator peer that started the tunnel
327 * @param atsi performance information for the tunnel
328 * @return initial tunnel context for the tunnel
329 * (can be NULL -- that's not an error)
332 incoming_tunnel (void *cls,
333 struct GNUNET_MESH_Tunnel * tunnel,
334 const struct GNUNET_PeerIdentity * initiator,
335 const struct GNUNET_ATS_Information * atsi)
337 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
338 "***************** test: Incoming tunnel from %s to peer %d\n",
339 GNUNET_i2s(initiator),
342 if ((long) cls == 1L)
345 incoming_t2 = tunnel;
346 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
348 GNUNET_SCHEDULER_cancel (disconnect_task);
349 disconnect_task = GNUNET_SCHEDULER_add_delayed(SHORT_TIME,
350 &disconnect_mesh_peers,
357 * Function called whenever an inbound tunnel is destroyed. Should clean up
358 * any associated state.
360 * @param cls closure (set from GNUNET_MESH_connect)
361 * @param tunnel connection to the other end (henceforth invalid)
362 * @param tunnel_ctx place where local state associated
363 * with the tunnel is stored
366 tunnel_cleaner (void *cls, const struct GNUNET_MESH_Tunnel *tunnel,
371 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
372 "***************** test: Incoming tunnel disconnected at peer %d\n",
379 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
380 "***************** test: Unknown peer! %d\n",
383 if (peers_in_tunnel > 0)
386 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
388 GNUNET_SCHEDULER_cancel (disconnect_task);
389 disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_mesh_peers, NULL);
397 * Method called whenever a tunnel falls apart.
400 * @param peer peer identity the tunnel stopped working with
403 dh (void *cls, const struct GNUNET_PeerIdentity *peer)
405 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
406 "***************** test: peer %s disconnected\n",
413 * Method called whenever a peer connects to a tunnel.
416 * @param peer peer identity the tunnel was created to, NULL on timeout
417 * @param atsi performance data for the connection
420 ch (void *cls, const struct GNUNET_PeerIdentity *peer,
421 const struct GNUNET_ATS_Information *atsi)
423 struct GNUNET_PeerIdentity *dest;
425 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
426 "***************** test: peer %s connected\n",
429 if (0 == memcmp(&d2->id, peer, sizeof(d2->id)) && (long) cls == 1L)
431 if (test == MULTICAST &&
432 0 == memcmp(&d3->id, peer, sizeof(d3->id)) &&
442 if (peers_in_tunnel < 2)
449 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
451 GNUNET_SCHEDULER_cancel (disconnect_task);
452 disconnect_task = GNUNET_SCHEDULER_add_delayed(SHORT_TIME,
453 &disconnect_mesh_peers,
455 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
456 "***************** test: Sending data...\n");
458 GNUNET_MESH_notify_transmit_ready(t,
461 GNUNET_TIME_UNIT_FOREVER_REL,
463 sizeof(struct GNUNET_MessageHeader),
469 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "***************** test: Disconnect already run?\n");
470 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "***************** test: Aborting...\n");
477 do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
479 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "***************** test: test_task\n");
480 if (test == MULTICAST)
482 GNUNET_MESH_peer_request_connect_add(t, &d3->id);
484 GNUNET_MESH_peer_request_connect_add(t, &d2->id);
485 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
487 GNUNET_SCHEDULER_cancel (disconnect_task);
488 disconnect_task = GNUNET_SCHEDULER_add_delayed(
489 GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 30),
490 &disconnect_mesh_peers,
497 * Prototype of a callback function indicating that two peers
498 * are currently connected.
501 * @param first peer id for first daemon
502 * @param second peer id for the second daemon
503 * @param distance distance between the connected peers
504 * @param emsg error message (NULL on success)
508 const struct GNUNET_PeerIdentity* first,
509 const struct GNUNET_PeerIdentity* second,
514 struct GNUNET_PeerIdentity id;
516 GNUNET_PEER_resolve(1, &id);
517 p1 = GNUNET_PEER_search(first);
520 p2 = GNUNET_PEER_search(second);
521 if (p2 == 0 || p2 > num_peers)
523 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
524 "***************** test: %s is UNKNOWN!? (%u)\n",
530 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
531 "***************** test: %s IS a neighbor\n",
535 p1 = GNUNET_PEER_search(second);
538 p2 = GNUNET_PEER_search(first);
539 if (p2 == 0 || p2 > num_peers)
541 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
542 "***************** test: %s is UNKNOWN!? (%u)\n",
548 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
549 "***************** test: %s IS a neighbor\n",
556 * connect_mesh_service: connect to the mesh service of one of the peers
560 connect_mesh_service (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
562 GNUNET_MESH_ApplicationType app;
564 struct GNUNET_PeerIdentity id;
566 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "***************** test: connect_mesh_service\n");
568 for (i = 1; i <= num_peers; i++)
570 GNUNET_PEER_resolve(i, &id);
571 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
572 "***************** test: peer %s has %u conns to d1\n",
575 if (mesh_peers[i] == 0)
578 GNUNET_assert (i < num_peers);
579 d2 = GNUNET_TESTING_daemon_get_by_id (pg, &id);
580 if (test == MULTICAST)
582 for (i++; i <= num_peers; i++)
584 GNUNET_PEER_resolve(i, &id);
585 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
586 "***************** test: peer %s has %u conns to d1\n",
589 if (mesh_peers[i] == 0)
592 GNUNET_assert (i < num_peers);
593 d3 = GNUNET_TESTING_daemon_get_by_id (pg, &id);
595 app = (GNUNET_MESH_ApplicationType) 0;
598 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
599 "***************** test: connecting to mesh service of peer %s (%u)\n",
600 GNUNET_i2s (&d1->id),
602 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
603 "***************** test: connecting to mesh service of peer %s (%u)\n",
604 GNUNET_i2s (&d2->id),
606 if (test == MULTICAST)
608 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
609 "***************** test: connecting to mesh service of peer %s (%u)\n",
610 GNUNET_i2s (&d3->id),
614 h1 = GNUNET_MESH_connect (d1->cfg,
621 h2 = GNUNET_MESH_connect (d2->cfg,
628 if (test == MULTICAST)
630 h3 = GNUNET_MESH_connect (d3->cfg,
638 t = GNUNET_MESH_tunnel_create (h1, NULL, &ch, &dh, (void *) 1L);
641 GNUNET_SCHEDULER_add_delayed(
642 GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 6),
649 * peergroup_ready: start test when all peers are connected
651 * @param emsg error message
654 peergroup_ready (void *cls, const char *emsg)
662 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
663 "***************** test: Peergroup callback called with error, aborting test!\n");
664 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
665 "***************** test: Error from testing: `%s'\n", emsg);
667 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
671 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
672 "************************************************************\n");
673 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
674 "***************** test: Peer Group started successfully!\n");
675 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
676 "***************** test: Have %u connections\n",
680 if (data_file != NULL)
683 buf_len = GNUNET_asprintf (&buf, "CONNECTIONS_0: %u\n", total_connections);
685 GNUNET_DISK_file_write (data_file, buf, buf_len);
688 peers_running = GNUNET_TESTING_daemons_running (pg);
689 for (i = 0; i < num_peers; i++)
691 GNUNET_PEER_Id peer_id;
693 d1 = GNUNET_TESTING_daemon_get (pg, i);
694 peer_id = GNUNET_PEER_intern(&d1->id);
695 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
696 "***************** test: %u: %s\n",
698 GNUNET_i2s (&d1->id));
700 d1 = GNUNET_TESTING_daemon_get (pg, 0);
701 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
702 "***************** test: Peer looking: %s\n",
703 GNUNET_i2s (&d1->id));
704 pid1 = GNUNET_PEER_intern(&d1->id);
705 mesh_peers[pid1] = 100;
706 GNUNET_TESTING_get_topology(pg, &topo_cb, NULL);
708 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply(
709 GNUNET_TIME_UNIT_SECONDS,
711 &connect_mesh_service,
714 GNUNET_SCHEDULER_add_delayed (wait_time, &disconnect_mesh_peers, NULL);
720 * Function that will be called whenever two daemons are connected by
721 * the testing library.
724 * @param first peer id for first daemon
725 * @param second peer id for the second daemon
726 * @param distance distance between the connected peers
727 * @param first_cfg config for the first daemon
728 * @param second_cfg config for the second daemon
729 * @param first_daemon handle for the first daemon
730 * @param second_daemon handle for the second daemon
731 * @param emsg error message (NULL on success)
734 connect_cb (void *cls, const struct GNUNET_PeerIdentity *first,
735 const struct GNUNET_PeerIdentity *second, uint32_t distance,
736 const struct GNUNET_CONFIGURATION_Handle *first_cfg,
737 const struct GNUNET_CONFIGURATION_Handle *second_cfg,
738 struct GNUNET_TESTING_Daemon *first_daemon,
739 struct GNUNET_TESTING_Daemon *second_daemon, const char *emsg)
747 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
748 "***************** test: Problem with new connection (%s)\n",
756 * run: load configuration options and schedule test to run (start peergroup)
759 * @param cfgfile configuration file name (can be NULL)
760 * @param cfg configuration handle
763 run (void *cls, char *const *args, const char *cfgfile,
764 const struct GNUNET_CONFIGURATION_Handle *cfg)
767 unsigned long long temp_wait;
768 struct GNUNET_TESTING_Host *hosts;
772 testing_cfg = GNUNET_CONFIGURATION_dup (cfg);
774 GNUNET_log_setup ("test_mesh_small",
783 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "***************** test: Starting daemons.\n");
784 GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing",
785 "use_progressbars", "YES");
789 GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing",
790 "num_peers", &num_peers))
792 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
793 "Option TESTING:NUM_PEERS is required!\n");
797 mesh_peers = GNUNET_malloc (sizeof(uint16_t) * (num_peers + 1));
800 GNUNET_CONFIGURATION_get_value_number (testing_cfg, "test_mesh_small",
801 "wait_time", &temp_wait))
803 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
804 "Option test_mesh_small:wait_time is required!\n");
809 GNUNET_CONFIGURATION_get_value_string (testing_cfg, "testing",
810 "topology_output_file",
813 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
814 "Option test_mesh_small:topology_output_file is required!\n");
819 GNUNET_CONFIGURATION_get_value_string (testing_cfg, "test_mesh_small",
824 GNUNET_DISK_file_open (data_filename,
825 GNUNET_DISK_OPEN_READWRITE |
826 GNUNET_DISK_OPEN_CREATE,
827 GNUNET_DISK_PERM_USER_READ |
828 GNUNET_DISK_PERM_USER_WRITE);
829 if (data_file == NULL)
831 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to open %s for output!\n",
833 GNUNET_free (data_filename);
838 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_wait);
841 GNUNET_CONFIGURATION_get_value_string (cfg, "test_mesh_small",
842 "output_file", &temp_str))
845 GNUNET_DISK_file_open (temp_str,
846 GNUNET_DISK_OPEN_READWRITE |
847 GNUNET_DISK_OPEN_CREATE,
848 GNUNET_DISK_PERM_USER_READ |
849 GNUNET_DISK_PERM_USER_WRITE);
850 if (output_file == NULL)
851 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to open %s for output!\n",
854 GNUNET_free_non_null (temp_str);
856 hosts = GNUNET_TESTING_hosts_load (testing_cfg);
858 pg = GNUNET_TESTING_peergroup_start (testing_cfg, num_peers, TIMEOUT,
859 &connect_cb, &peergroup_ready, NULL,
861 GNUNET_assert (pg != NULL);
863 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_get_forever (),
864 &shutdown_task, NULL);
870 * test_mesh_small command line options
872 static struct GNUNET_GETOPT_CommandLineOption options[] = {
873 {'V', "verbose", NULL,
874 gettext_noop ("be verbose (print progress information)"),
875 0, &GNUNET_GETOPT_set_one, &verbose},
876 GNUNET_GETOPT_OPTION_END
884 main (int argc, char *argv[])
886 char *const argv2[] = {
889 "test_mesh_small.conf",
897 /* Each peer is supposed to generate the following callbacks:
898 * 1 incoming tunnel (@dest)
899 * 1 connected peer (@orig)
900 * 1 received data packet (@dest)
901 * 1 received data packet (@orig)
902 * 1 received tunnel destroy (@dest)
903 * _________________________________
904 * 5 x ok expected per peer
908 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "***************** test: Start\n");
909 if (strstr (argv[0], "test_mesh_small_unicast") != NULL)
911 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "***************** test: UNICAST\n");
915 else if (strstr (argv[0], "test_mesh_small_multicast") != NULL)
917 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "***************** test: MULTICAST\n");
923 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "***************** test: UNKNOWN\n");
928 GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2,
930 gettext_noop ("Test mesh in a small network."),
931 options, &run, NULL);
933 GNUNET_DISK_directory_remove ("/tmp/test_mesh_small");
937 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
938 "***************** test: FAILED! (%d/%d)\n", ok, ok_goal);
941 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
942 "***************** test: success\n");
946 /* end of test_mesh_small.c */