[sysprof] tests: request counter range
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] tests: request counter range
- Date: Mon, 21 May 2018 19:56:44 +0000 (UTC)
commit 5cc838fd47b3a3df3954894fbfeddb075da77b2c
Author: Christian Hergert <chergert redhat com>
Date: Mon May 21 12:56:25 2018 -0700
tests: request counter range
We are required to request the counter range before blindly associating
values for the counter id.
tests/test-capture.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/tests/test-capture.c b/tests/test-capture.c
index 4e348c1..87b2530 100644
--- a/tests/test-capture.c
+++ b/tests/test-capture.c
@@ -190,6 +190,7 @@ test_reader_basic (void)
{
SpCaptureCounter counters[10];
+ guint base = sp_capture_writer_request_counter (writer, G_N_ELEMENTS (counters));
t = SP_CAPTURE_CURRENT_TIME;
@@ -198,7 +199,7 @@ test_reader_basic (void)
g_snprintf (counters[i].category, sizeof counters[i].category, "cat%d", i);
g_snprintf (counters[i].name, sizeof counters[i].name, "name%d", i);
g_snprintf (counters[i].description, sizeof counters[i].description, "desc%d", i);
- counters[i].id = i + 1;
+ counters[i].id = base + i;
counters[i].type = 0;
counters[i].value.v64 = i * G_GINT64_CONSTANT (100000000000);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]