diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
commit | 47e6e7c84f008a53061e661f31ae96629bc694ef (patch) | |
tree | 648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /qa/src/obs.c | |
download | pcp-47e6e7c84f008a53061e661f31ae96629bc694ef.tar.gz |
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/src/obs.c')
-rw-r--r-- | qa/src/obs.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/qa/src/obs.c b/qa/src/obs.c new file mode 100644 index 0000000..ea7c63c --- /dev/null +++ b/qa/src/obs.c @@ -0,0 +1,33 @@ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <pcp/trace.h> + + +int +main(int argc, char **argv) +{ + int sts; + char *prog; + + prog = argv[0]; + + if ((sts = pmtraceobs("simple", 6.09)) < 0) { + fprintf(stderr, "%s: (1) pmtraceobs error: %s\n", + prog, pmtraceerrstr(sts)); + exit(1); + } + if ((sts = pmtraceobs("test", 888888.8888)) < 0) { + fprintf(stderr, "%s: (2) pmtraceobs error: %s\n", + prog, pmtraceerrstr(sts)); + exit(1); + } + + if ((sts = pmtraceobs("simple", 76)) < 0) { + fprintf(stderr, "%s: (3) pmtraceobs error: %s\n", + prog, pmtraceerrstr(sts)); + exit(1); + } + + exit(0); +} |