diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-11 10:58:07 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-11 10:58:07 +0100 |
commit | 4195f9cb08cddaeae37dc88c5e879d84391b4359 (patch) | |
tree | 5f24c7d497e68b7f348d43d40546d1e2d7234a5d /tests/inputfilegen.c | |
parent | 765317d54ec5658dd0c598170d0fc0824f751265 (diff) | |
download | rsyslog-4195f9cb08cddaeae37dc88c5e879d84391b4359.tar.gz rsyslog-4195f9cb08cddaeae37dc88c5e879d84391b4359.tar.xz rsyslog-4195f9cb08cddaeae37dc88c5e879d84391b4359.zip |
added new test for imfile to testbench
Diffstat (limited to 'tests/inputfilegen.c')
-rw-r--r-- | tests/inputfilegen.c | 23 |
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; +} |