Skip to content

Commit 262cbc5

Browse files
committed
lib: fix CLOS rename style
Signed-off-by: Raghavan Kanagaraj <raghavan.kanagaraj@intel.com>
1 parent 549a427 commit 262cbc5

4 files changed

Lines changed: 22 additions & 31 deletions

File tree

examples/c/PSEUDO_LOCK/pseudo_lock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ init_memory(const size_t sz)
9696
*
9797
* This is required as rand() is not thread safe. This dummy implementation
9898
* computes large number of random numbers, stores them in a table and
99-
* re-uses them all over again. This is good enough for the purpose of this
99+
* reuses them all over again. This is good enough for the purpose of this
100100
* application.
101101
*
102102
* @return Random number value

lib/resctrl_monitoring.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@ resctrl_mon_group_path(const unsigned class_id,
305305
if (resctrl_group == NULL && class_id == 0)
306306
len = snprintf(buf, buf_size, RESCTRL_PATH "%s", suffix);
307307
else if (resctrl_group == NULL)
308-
len = snprintf(buf, buf_size, RESCTRL_PATH "/COS%u%s",
309-
class_id, suffix);
308+
len = snprintf(buf, buf_size, RESCTRL_PATH "/COS%u%s", class_id,
309+
suffix);
310310

311311
/* mon group for CLOS 0 */
312312
else if (class_id == 0)

unit-test/lib/test_resctrl_mon.c

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,14 @@ test_resctrl_mon_mkdir(void **state __attribute__((unused)))
6969
ret = resctrl_mon_mkdir(0, "test");
7070
assert_int_equal(ret, PQOS_RETVAL_OK);
7171

72-
expect_string(__wrap_mkdir, path,
73-
RESCTRL_PATH "/COS1/mon_groups/test");
72+
expect_string(__wrap_mkdir, path, RESCTRL_PATH "/COS1/mon_groups/test");
7473
expect_value(__wrap_mkdir, mode, 0755);
7574
will_return(__wrap_mkdir, 1);
7675

7776
ret = resctrl_mon_mkdir(1, "test");
7877
assert_int_equal(ret, PQOS_RETVAL_OK);
7978

80-
expect_string(__wrap_mkdir, path,
81-
RESCTRL_PATH "/COS2/mon_groups/test");
79+
expect_string(__wrap_mkdir, path, RESCTRL_PATH "/COS2/mon_groups/test");
8280
expect_value(__wrap_mkdir, mode, 0755);
8381
will_return(__wrap_mkdir, -1);
8482
errno = ENOSPC;
@@ -100,8 +98,7 @@ test_resctrl_mon_rmdir(void **state __attribute__((unused)))
10098
ret = resctrl_mon_rmdir(0, "test");
10199
assert_int_equal(ret, PQOS_RETVAL_OK);
102100

103-
expect_string(__wrap_rmdir, path,
104-
RESCTRL_PATH "/COS1/mon_groups/test");
101+
expect_string(__wrap_rmdir, path, RESCTRL_PATH "/COS1/mon_groups/test");
105102
will_return(__wrap_rmdir, 1);
106103

107104
ret = resctrl_mon_rmdir(1, "test");
@@ -117,10 +114,9 @@ test_resctrl_mon_read_counter(void **state __attribute__((unused)))
117114
uint64_t value;
118115

119116
/* llc */
120-
expect_string(
121-
__wrap_pqos_fopen, name,
122-
"/sys/fs/resctrl/COS1/mon_groups/test/mon_data/mon_L3_00/"
123-
"llc_occupancy");
117+
expect_string(__wrap_pqos_fopen, name,
118+
"/sys/fs/resctrl/COS1/mon_groups/test/mon_data/mon_L3_00/"
119+
"llc_occupancy");
124120
expect_string(__wrap_pqos_fopen, mode, "r");
125121
will_return(__wrap_pqos_fopen, "1");
126122

@@ -130,10 +126,9 @@ test_resctrl_mon_read_counter(void **state __attribute__((unused)))
130126
assert_int_equal(value, 1);
131127

132128
/* lmem */
133-
expect_string(
134-
__wrap_pqos_fopen, name,
135-
"/sys/fs/resctrl/COS1/mon_groups/test/mon_data/mon_L3_00/"
136-
"mbm_local_bytes");
129+
expect_string(__wrap_pqos_fopen, name,
130+
"/sys/fs/resctrl/COS1/mon_groups/test/mon_data/mon_L3_00/"
131+
"mbm_local_bytes");
137132
expect_string(__wrap_pqos_fopen, mode, "r");
138133
will_return(__wrap_pqos_fopen, "2");
139134

@@ -143,10 +138,9 @@ test_resctrl_mon_read_counter(void **state __attribute__((unused)))
143138
assert_int_equal(value, 2);
144139

145140
/* tmem */
146-
expect_string(
147-
__wrap_pqos_fopen, name,
148-
"/sys/fs/resctrl/COS1/mon_groups/test/mon_data/mon_L3_00/"
149-
"mbm_total_bytes");
141+
expect_string(__wrap_pqos_fopen, name,
142+
"/sys/fs/resctrl/COS1/mon_groups/test/mon_data/mon_L3_00/"
143+
"mbm_total_bytes");
150144
expect_string(__wrap_pqos_fopen, mode, "r");
151145
will_return(__wrap_pqos_fopen, "3");
152146

@@ -163,10 +157,9 @@ test_resctrl_mon_read_counter_error(void **state __attribute__((unused)))
163157
uint64_t value = 0;
164158

165159
/* file doesn't exists*/
166-
expect_string(
167-
__wrap_pqos_fopen, name,
168-
"/sys/fs/resctrl/COS1/mon_groups/test/mon_data/mon_L3_00/"
169-
"llc_occupancy");
160+
expect_string(__wrap_pqos_fopen, name,
161+
"/sys/fs/resctrl/COS1/mon_groups/test/mon_data/mon_L3_00/"
162+
"llc_occupancy");
170163
expect_string(__wrap_pqos_fopen, mode, "r");
171164
will_return(__wrap_pqos_fopen, NULL);
172165

@@ -175,10 +168,9 @@ test_resctrl_mon_read_counter_error(void **state __attribute__((unused)))
175168
assert_int_equal(ret, PQOS_RETVAL_ERROR);
176169

177170
/* invalid value */
178-
expect_string(
179-
__wrap_pqos_fopen, name,
180-
"/sys/fs/resctrl/COS1/mon_groups/test/mon_data/mon_L3_00/"
181-
"llc_occupancy");
171+
expect_string(__wrap_pqos_fopen, name,
172+
"/sys/fs/resctrl/COS1/mon_groups/test/mon_data/mon_L3_00/"
173+
"llc_occupancy");
182174
expect_string(__wrap_pqos_fopen, mode, "r");
183175
will_return(__wrap_pqos_fopen, ";invalid");
184176

unit-test/lib/test_resctrl_mon_assoc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,7 @@ test_resctrl_mon_assoc_get_alloc_nondefault(void **state
231231
will_return(__wrap_resctrl_alloc_assoc_get, PQOS_RETVAL_OK);
232232
will_return(__wrap_resctrl_alloc_assoc_get, class_id);
233233

234-
expect_string(__wrap_scandir, dirp,
235-
"/sys/fs/resctrl/COS1/mon_groups/");
234+
expect_string(__wrap_scandir, dirp, "/sys/fs/resctrl/COS1/mon_groups/");
236235
will_return(__wrap_scandir, 1);
237236

238237
expect_value(__wrap_resctrl_mon_cpumask_read, class_id, class_id);

0 commit comments

Comments
 (0)