Diff of /libop/tests/mangle_tests.c [261633] .. [a6d955] Maximize Restore

  Switch to unified view

a/libop/tests/mangle_tests.c b/libop/tests/mangle_tests.c
...
...
20
    struct mangle_values values;
20
    struct mangle_values values;
21
    char const * result;
21
    char const * result;
22
};
22
};
23
23
24
static struct test_input const tests[] = {
24
static struct test_input const tests[] = {
25
    { { MANGLE_NONE, "foo", "bar", NULL, "EVENT", 0, 0, 0, 0, 0 },
25
    { { MANGLE_NONE, "foo", "", "bar", NULL, "EVENT", 0, 0, 0, 0, 0 },
26
      "{root}/bar/{dep}/{root}/foo/EVENT.0.0.all.all.all" },
26
      "{root}/bar/{dep}/{root}/foo/EVENT.0.0.all.all.all" },
27
    { { MANGLE_CPU, "foo", "bar", NULL, "EVENT", 0, 0, 0, 0, 2 },
27
    { { MANGLE_CPU, "foo", "", "bar", NULL, "EVENT", 0, 0, 0, 0, 2 },
28
      "{root}/bar/{dep}/{root}/foo/EVENT.0.0.all.all.2" },
28
      "{root}/bar/{dep}/{root}/foo/EVENT.0.0.all.all.2" },
29
    { { MANGLE_TID, "foo", "bar", NULL, "EVENT", 0, 0, 0, 33, 0 },
29
    { { MANGLE_TID, "foo", "", "bar", NULL, "EVENT", 0, 0, 0, 33, 0 },
30
      "{root}/bar/{dep}/{root}/foo/EVENT.0.0.all.33.all" },
30
      "{root}/bar/{dep}/{root}/foo/EVENT.0.0.all.33.all" },
31
    { { MANGLE_TGID, "foo", "bar", NULL, "EVENT", 0, 0, 34, 0, 0 },
31
    { { MANGLE_TGID, "foo", "", "bar", NULL, "EVENT", 0, 0, 34, 0, 0 },
32
      "{root}/bar/{dep}/{root}/foo/EVENT.0.0.34.all.all" },
32
      "{root}/bar/{dep}/{root}/foo/EVENT.0.0.34.all.all" },
33
    { { MANGLE_KERNEL, "foo", "bar", NULL, "EVENT", 0, 0, 0, 0, 0 },
33
    { { MANGLE_KERNEL, "foo", "", "bar", NULL, "EVENT", 0, 0, 0, 0, 0 },
34
      "{kern}/bar/{dep}/{kern}/foo/EVENT.0.0.all.all.all" },
34
      "{kern}/bar/{dep}/{kern}/foo/EVENT.0.0.all.all.all" },
35
    { { MANGLE_CALLGRAPH, "foo-from", "bar-from", "foo-to", "EVENT", 0, 0, 0, 0, 0 },
35
    { { MANGLE_CALLGRAPH, "foo-from", "", "bar-from", "foo-to", "EVENT", 0, 0, 0, 0, 0 },
36
      "{root}/bar-from/{dep}/{root}/foo-from/{cg}/{root}/foo-to/EVENT.0.0.all.all.all" },
36
      "{root}/bar-from/{dep}/{root}/foo-from/{cg}/{root}/foo-to/EVENT.0.0.all.all.all" },
37
    { { MANGLE_CPU|MANGLE_TID|MANGLE_TID|MANGLE_TGID|MANGLE_KERNEL, "foo", "bar", NULL, "EVENT", 1234, 8192, 34, 35, 2 },
37
    { { MANGLE_CPU|MANGLE_TID|MANGLE_TID|MANGLE_TGID|MANGLE_KERNEL, "foo", "", "bar", NULL, "EVENT", 1234, 8192, 34, 35, 2 },
38
      "{kern}/bar/{dep}/{kern}/foo/EVENT.1234.8192.34.35.2" },
38
      "{kern}/bar/{dep}/{kern}/foo/EVENT.1234.8192.34.35.2" },
39
    { { MANGLE_CPU|MANGLE_TID|MANGLE_TID|MANGLE_TGID|MANGLE_KERNEL, "foo1/foo2", "bar1/bar2", NULL, "EVENT", 1234, 8192, 34, 35, 2 },
39
    { { MANGLE_CPU|MANGLE_TID|MANGLE_TID|MANGLE_TGID|MANGLE_KERNEL, "foo1/foo2", "", "bar1/bar2", NULL, "EVENT", 1234, 8192, 34, 35, 2 },
40
      "{root}/bar1/bar2/{dep}/{root}/foo1/foo2/EVENT.1234.8192.34.35.2" },
40
      "{root}/bar1/bar2/{dep}/{root}/foo1/foo2/EVENT.1234.8192.34.35.2" },
41
    { { MANGLE_CALLGRAPH|MANGLE_CPU|MANGLE_TID|MANGLE_TID|MANGLE_TGID|MANGLE_KERNEL, "bar1/bar2", "bar1/bar2", "bar1/bar2-to", "EVENT", 1234, 8192, 34, 35, 2 },
41
    { { MANGLE_CALLGRAPH|MANGLE_CPU|MANGLE_TID|MANGLE_TID|MANGLE_TGID|MANGLE_KERNEL, "bar1/bar2", "", "bar1/bar2", "bar1/bar2-to", "EVENT", 1234, 8192, 34, 35, 2 },
42
      "{root}/bar1/bar2/{dep}/{root}/bar1/bar2/{cg}/{root}/bar1/bar2-to/EVENT.1234.8192.34.35.2" },
42
      "{root}/bar1/bar2/{dep}/{root}/bar1/bar2/{cg}/{root}/bar1/bar2-to/EVENT.1234.8192.34.35.2" },
43
43
44
  { { 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0 }, NULL }
44
  { { 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0 }, NULL }
45
};
45
};
46
46
47
47
48
int main(void)
48
int main(void)
49
{
49
{