summaryrefslogtreecommitdiffstats
path: root/tests/inputfilegen.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-03-11 11:46:32 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-03-11 11:46:32 +0100
commitffa57b17b270be441c64161cd1a3c3123b58ee26 (patch)
treeeaec0a691437ffdb87795f4236a7e972b38ef746 /tests/inputfilegen.c
parentfd26a42bdc04eaf497cafd9ef806a54f3de1a7e9 (diff)
parent9a53ec419e9d9e25a81b26a01ce5b035631e321a (diff)
downloadrsyslog-ffa57b17b270be441c64161cd1a3c3123b58ee26.tar.gz
rsyslog-ffa57b17b270be441c64161cd1a3c3123b58ee26.tar.bz2
rsyslog-ffa57b17b270be441c64161cd1a3c3123b58ee26.zip
Merge branch 'v5-stable' into v5-beta
Conflicts: tests/Makefile.am
Diffstat (limited to 'tests/inputfilegen.c')
-rw-r--r--tests/inputfilegen.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/inputfilegen.c b/tests/inputfilegen.c
new file mode 100644
index 00000000..26fb79af
--- /dev/null
+++ b/tests/inputfilegen.c
@@ -0,0 +1,23 @@
+/* generate an input file suitable for use by the testbench
+ * Copyright (C) 2011 by Rainer Gerhards and Adiscon GmbH.
+ * Part of rsyslog, licensed under GPLv3
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+int main(int argc, char* argv[])
+{
+ int nmsgs;
+ int i;
+
+ if(argc != 2) {
+ fprintf(stderr, "usage: inputfilegen num-messages\n");
+ return 1;
+ }
+
+ nmsgs = atoi(argv[1]);
+ for(i = 0 ; i < nmsgs ; ++i) {
+ printf("msgnum:%8.8d:\n", i);
+ }
+ return 0;
+}