summaryrefslogtreecommitdiff
path: root/qa/src/obs.c
blob: ea7c63c19aa2be234042bfb58316441c111a8698 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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);
}