@@ -30,17 +30,17 @@ static void
3030buildopts_test_construct (void )
3131{
3232 g_autoptr (ModulemdBuildopts ) b = NULL ;
33- g_auto (GStrv ) whitelist = NULL ;
33+ g_auto (GStrv ) allowed_build_names = NULL ;
3434 g_auto (GStrv ) arches = NULL ;
3535
3636 /* Test that the new() function works */
3737 b = modulemd_buildopts_new ();
3838 g_assert_nonnull (b );
3939 g_assert_true (MODULEMD_IS_BUILDOPTS (b ));
4040 g_assert_null (modulemd_buildopts_get_rpm_macros (b ));
41- whitelist = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
42- g_assert_nonnull (whitelist );
43- g_assert_cmpint (g_strv_length (whitelist ), = = , 0 );
41+ allowed_build_names = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
42+ g_assert_nonnull (allowed_build_names );
43+ g_assert_cmpint (g_strv_length (allowed_build_names ), = = , 0 );
4444 arches = modulemd_buildopts_get_arches_as_strv (b );
4545 g_assert_nonnull (arches );
4646 g_assert_cmpint (g_strv_length (arches ), = = , 0 );
@@ -230,17 +230,17 @@ buildopts_test_copy (void)
230230{
231231 g_autoptr (ModulemdBuildopts ) b = NULL ;
232232 g_autoptr (ModulemdBuildopts ) b_copy = NULL ;
233- g_auto (GStrv ) whitelist = NULL ;
233+ g_auto (GStrv ) allowed_build_names = NULL ;
234234 g_auto (GStrv ) arches = NULL ;
235235
236236 b = modulemd_buildopts_new ();
237237 g_assert_nonnull (b );
238238 g_assert_true (MODULEMD_IS_BUILDOPTS (b ));
239239 g_assert_null (modulemd_buildopts_get_rpm_macros (b ));
240- whitelist = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
241- g_assert_nonnull (whitelist );
242- g_assert_cmpint (g_strv_length (whitelist ), = = , 0 );
243- g_clear_pointer (& whitelist , g_strfreev );
240+ allowed_build_names = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
241+ g_assert_nonnull (allowed_build_names );
242+ g_assert_cmpint (g_strv_length (allowed_build_names ), = = , 0 );
243+ g_clear_pointer (& allowed_build_names , g_strfreev );
244244 arches = modulemd_buildopts_get_arches_as_strv (b );
245245 g_assert_nonnull (arches );
246246 g_assert_cmpint (g_strv_length (arches ), = = , 0 );
@@ -250,10 +250,10 @@ buildopts_test_copy (void)
250250 g_assert_nonnull (b_copy );
251251 g_assert_true (MODULEMD_IS_BUILDOPTS (b_copy ));
252252 g_assert_null (modulemd_buildopts_get_rpm_macros (b_copy ));
253- whitelist = modulemd_buildopts_get_rpm_whitelist_as_strv (b_copy );
254- g_assert_nonnull (whitelist );
255- g_assert_cmpint (g_strv_length (whitelist ), = = , 0 );
256- g_clear_pointer (& whitelist , g_strfreev );
253+ allowed_build_names = modulemd_buildopts_get_rpm_whitelist_as_strv (b_copy );
254+ g_assert_nonnull (allowed_build_names );
255+ g_assert_cmpint (g_strv_length (allowed_build_names ), = = , 0 );
256+ g_clear_pointer (& allowed_build_names , g_strfreev );
257257 arches = modulemd_buildopts_get_arches_as_strv (b_copy );
258258 g_assert_nonnull (arches );
259259 g_assert_cmpint (g_strv_length (arches ), = = , 0 );
@@ -267,10 +267,10 @@ buildopts_test_copy (void)
267267 g_assert_nonnull (b );
268268 g_assert_true (MODULEMD_IS_BUILDOPTS (b ));
269269 g_assert_cmpstr (modulemd_buildopts_get_rpm_macros (b ), = = , "a test" );
270- whitelist = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
271- g_assert_nonnull (whitelist );
272- g_assert_cmpint (g_strv_length (whitelist ), = = , 0 );
273- g_clear_pointer (& whitelist , g_strfreev );
270+ allowed_build_names = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
271+ g_assert_nonnull (allowed_build_names );
272+ g_assert_cmpint (g_strv_length (allowed_build_names ), = = , 0 );
273+ g_clear_pointer (& allowed_build_names , g_strfreev );
274274 arches = modulemd_buildopts_get_arches_as_strv (b );
275275 g_assert_nonnull (arches );
276276 g_assert_cmpint (g_strv_length (arches ), = = , 0 );
@@ -280,10 +280,10 @@ buildopts_test_copy (void)
280280 g_assert_nonnull (b_copy );
281281 g_assert_true (MODULEMD_IS_BUILDOPTS (b_copy ));
282282 g_assert_cmpstr (modulemd_buildopts_get_rpm_macros (b_copy ), = = , "a test" );
283- whitelist = modulemd_buildopts_get_rpm_whitelist_as_strv (b_copy );
284- g_assert_nonnull (whitelist );
285- g_assert_cmpint (g_strv_length (whitelist ), = = , 0 );
286- g_clear_pointer (& whitelist , g_strfreev );
283+ allowed_build_names = modulemd_buildopts_get_rpm_whitelist_as_strv (b_copy );
284+ g_assert_nonnull (allowed_build_names );
285+ g_assert_cmpint (g_strv_length (allowed_build_names ), = = , 0 );
286+ g_clear_pointer (& allowed_build_names , g_strfreev );
287287 arches = modulemd_buildopts_get_arches_as_strv (b_copy );
288288 g_assert_nonnull (arches );
289289 g_assert_cmpint (g_strv_length (arches ), = = , 0 );
@@ -297,11 +297,11 @@ buildopts_test_copy (void)
297297 g_assert_nonnull (b );
298298 g_assert_true (MODULEMD_IS_BUILDOPTS (b ));
299299 g_assert_null (modulemd_buildopts_get_rpm_macros (b ));
300- whitelist = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
301- g_assert_nonnull (whitelist );
302- g_assert_cmpint (g_strv_length (whitelist ), = = , 1 );
303- g_assert_cmpstr (whitelist [0 ], = = , "testrpm" );
304- g_clear_pointer (& whitelist , g_strfreev );
300+ allowed_build_names = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
301+ g_assert_nonnull (allowed_build_names );
302+ g_assert_cmpint (g_strv_length (allowed_build_names ), = = , 1 );
303+ g_assert_cmpstr (allowed_build_names [0 ], = = , "testrpm" );
304+ g_clear_pointer (& allowed_build_names , g_strfreev );
305305 arches = modulemd_buildopts_get_arches_as_strv (b );
306306 g_assert_nonnull (arches );
307307 g_assert_cmpint (g_strv_length (arches ), = = , 0 );
@@ -311,11 +311,11 @@ buildopts_test_copy (void)
311311 g_assert_nonnull (b_copy );
312312 g_assert_true (MODULEMD_IS_BUILDOPTS (b_copy ));
313313 g_assert_null (modulemd_buildopts_get_rpm_macros (b_copy ));
314- whitelist = modulemd_buildopts_get_rpm_whitelist_as_strv (b_copy );
315- g_assert_nonnull (whitelist );
316- g_assert_cmpint (g_strv_length (whitelist ), = = , 1 );
317- g_assert_cmpstr (whitelist [0 ], = = , "testrpm" );
318- g_clear_pointer (& whitelist , g_strfreev );
314+ allowed_build_names = modulemd_buildopts_get_rpm_whitelist_as_strv (b_copy );
315+ g_assert_nonnull (allowed_build_names );
316+ g_assert_cmpint (g_strv_length (allowed_build_names ), = = , 1 );
317+ g_assert_cmpstr (allowed_build_names [0 ], = = , "testrpm" );
318+ g_clear_pointer (& allowed_build_names , g_strfreev );
319319 arches = modulemd_buildopts_get_arches_as_strv (b_copy );
320320 g_assert_nonnull (arches );
321321 g_assert_cmpint (g_strv_length (arches ), = = , 0 );
@@ -329,10 +329,10 @@ buildopts_test_copy (void)
329329 g_assert_nonnull (b );
330330 g_assert_true (MODULEMD_IS_BUILDOPTS (b ));
331331 g_assert_null (modulemd_buildopts_get_rpm_macros (b ));
332- whitelist = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
333- g_assert_nonnull (whitelist );
334- g_assert_cmpint (g_strv_length (whitelist ), = = , 0 );
335- g_clear_pointer (& whitelist , g_strfreev );
332+ allowed_build_names = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
333+ g_assert_nonnull (allowed_build_names );
334+ g_assert_cmpint (g_strv_length (allowed_build_names ), = = , 0 );
335+ g_clear_pointer (& allowed_build_names , g_strfreev );
336336 arches = modulemd_buildopts_get_arches_as_strv (b );
337337 g_assert_nonnull (arches );
338338 g_assert_cmpint (g_strv_length (arches ), = = , 1 );
@@ -343,10 +343,10 @@ buildopts_test_copy (void)
343343 g_assert_nonnull (b_copy );
344344 g_assert_true (MODULEMD_IS_BUILDOPTS (b_copy ));
345345 g_assert_null (modulemd_buildopts_get_rpm_macros (b_copy ));
346- whitelist = modulemd_buildopts_get_rpm_whitelist_as_strv (b_copy );
347- g_assert_nonnull (whitelist );
348- g_assert_cmpint (g_strv_length (whitelist ), = = , 0 );
349- g_clear_pointer (& whitelist , g_strfreev );
346+ allowed_build_names = modulemd_buildopts_get_rpm_whitelist_as_strv (b_copy );
347+ g_assert_nonnull (allowed_build_names );
348+ g_assert_cmpint (g_strv_length (allowed_build_names ), = = , 0 );
349+ g_clear_pointer (& allowed_build_names , g_strfreev );
350350 arches = modulemd_buildopts_get_arches_as_strv (b_copy );
351351 g_assert_nonnull (arches );
352352 g_assert_cmpint (g_strv_length (arches ), = = , 1 );
@@ -390,37 +390,37 @@ static void
390390buildopts_test_whitelist (void )
391391{
392392 g_autoptr (ModulemdBuildopts ) b = NULL ;
393- g_auto (GStrv ) whitelist = NULL ;
393+ g_auto (GStrv ) allowed_build_names = NULL ;
394394
395395 b = modulemd_buildopts_new ();
396396 g_assert_nonnull (b );
397397 g_assert_true (MODULEMD_IS_BUILDOPTS (b ));
398398
399399 /* Assert we start with 0 rpms */
400- whitelist = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
401- g_assert_cmpint (g_strv_length (whitelist ), = = , 0 );
402- g_clear_pointer (& whitelist , g_strfreev );
400+ allowed_build_names = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
401+ g_assert_cmpint (g_strv_length (allowed_build_names ), = = , 0 );
402+ g_clear_pointer (& allowed_build_names , g_strfreev );
403403
404- /* Whitelist some rpms */
404+ /* Allow some rpms */
405405 modulemd_buildopts_add_rpm_to_whitelist (b , "test2" );
406406 modulemd_buildopts_add_rpm_to_whitelist (b , "test3" );
407407 modulemd_buildopts_add_rpm_to_whitelist (b , "test1" );
408- whitelist = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
409- g_assert_cmpint (g_strv_length (whitelist ), = = , 3 );
408+ allowed_build_names = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
409+ g_assert_cmpint (g_strv_length (allowed_build_names ), = = , 3 );
410410 // They should be sorted
411- g_assert_cmpstr (whitelist [0 ], = = , "test1" );
412- g_assert_cmpstr (whitelist [1 ], = = , "test2" );
413- g_assert_cmpstr (whitelist [2 ], = = , "test3" );
414- g_clear_pointer (& whitelist , g_strfreev );
411+ g_assert_cmpstr (allowed_build_names [0 ], = = , "test1" );
412+ g_assert_cmpstr (allowed_build_names [1 ], = = , "test2" );
413+ g_assert_cmpstr (allowed_build_names [2 ], = = , "test3" );
414+ g_clear_pointer (& allowed_build_names , g_strfreev );
415415
416416 /* Remove some rpms */
417417 modulemd_buildopts_remove_rpm_from_whitelist (b , "test2" );
418- whitelist = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
419- g_assert_cmpint (g_strv_length (whitelist ), = = , 2 );
418+ allowed_build_names = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
419+ g_assert_cmpint (g_strv_length (allowed_build_names ), = = , 2 );
420420 // They should be sorted
421- g_assert_cmpstr (whitelist [0 ], = = , "test1" );
422- g_assert_cmpstr (whitelist [1 ], = = , "test3" );
423- g_clear_pointer (& whitelist , g_strfreev );
421+ g_assert_cmpstr (allowed_build_names [0 ], = = , "test1" );
422+ g_assert_cmpstr (allowed_build_names [1 ], = = , "test3" );
423+ g_clear_pointer (& allowed_build_names , g_strfreev );
424424}
425425
426426static void
@@ -468,7 +468,7 @@ buildopts_test_parse_yaml (void)
468468 g_autoptr (GError ) error = NULL ;
469469 MMD_INIT_YAML_PARSER (parser );
470470 g_autofree gchar * yaml_path = NULL ;
471- g_auto (GStrv ) whitelist = NULL ;
471+ g_auto (GStrv ) allowed_build_names = NULL ;
472472 g_auto (GStrv ) arches = NULL ;
473473 g_autoptr (FILE ) yaml_stream = NULL ;
474474 yaml_path = g_strdup_printf ("%s/b.yaml" , g_getenv ("TEST_DATA_PATH" ));
@@ -488,12 +488,12 @@ buildopts_test_parse_yaml (void)
488488 = = ,
489489 "%demomacro 1\n"
490490 "%demomacro2 %{demomacro}23\n" );
491- whitelist = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
492- g_assert_cmpint (g_strv_length (whitelist ), = = , 4 );
493- g_assert_cmpstr (whitelist [0 ], = = , "fooscl-1-bar" );
494- g_assert_cmpstr (whitelist [1 ], = = , "fooscl-1-baz" );
495- g_assert_cmpstr (whitelist [2 ], = = , "xxx" );
496- g_assert_cmpstr (whitelist [3 ], = = , "xyz" );
491+ allowed_build_names = modulemd_buildopts_get_rpm_whitelist_as_strv (b );
492+ g_assert_cmpint (g_strv_length (allowed_build_names ), = = , 4 );
493+ g_assert_cmpstr (allowed_build_names [0 ], = = , "fooscl-1-bar" );
494+ g_assert_cmpstr (allowed_build_names [1 ], = = , "fooscl-1-baz" );
495+ g_assert_cmpstr (allowed_build_names [2 ], = = , "xxx" );
496+ g_assert_cmpstr (allowed_build_names [3 ], = = , "xyz" );
497497 arches = modulemd_buildopts_get_arches_as_strv (b );
498498 g_assert_cmpint (g_strv_length (arches ), = = , 2 );
499499 g_assert_cmpstr (arches [0 ], = = , "ppc64le" );
0 commit comments