Skip to content

Commit

Permalink
tests: drop trailing white spaces
Browse files Browse the repository at this point in the history
Commit 6ff3d00 ("Add check for fcontext lines containing only spaces")
added support for trailing white spaces in file context files together
with some unit tests.  These unit tests contain such trailing white
spaces, which break the current CI due to the white space check via
`git diff-tree --check`.

Drop the trailing spaces (together with the corresponding test code) to
please the CI, hoping regressions will not happen.
  • Loading branch information
cgzones committed Apr 26, 2024
1 parent 6ff3d00 commit 929e861
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
10 changes: 0 additions & 10 deletions tests/check_parse_fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,21 +164,11 @@ START_TEST (test_parse_basic_fc_file) {

cur = cur->next;

ck_assert_int_eq(cur->flavor, NODE_EMPTY);
ck_assert_ptr_nonnull(cur->next);

cur = cur->next;

ck_assert_int_eq(cur->flavor, NODE_ERROR);
ck_assert_ptr_nonnull(cur->next);

cur = cur->next;

ck_assert_int_eq(cur->flavor, NODE_EMPTY);
ck_assert_ptr_nonnull(cur->next);

cur = cur->next;

ck_assert_int_eq(cur->flavor, NODE_FC_ENTRY);
ck_assert_ptr_nonnull(cur->next);

Expand Down
4 changes: 2 additions & 2 deletions tests/sample_policy_files/basic.fc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/usr/bin/basic -- gen_context(system_u:object_r:basic_t, s0)
/etc/basic(/.*)? gen_context(system_u:object_r:basic_conf_t, s0)

/var/www/basic gen_this_is_an_error(system_u:obect_r:basic_conf_t, s0)

/var/log/basic.log -- system_u:object_r:basic_log_t:s0

/var/www/basic/basic.conf -- gen_context(system_u:object_r:basic_conf_t, s0, c1)
2 changes: 1 addition & 1 deletion tests/sample_policy_files/none_context.fc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/path/path <<none>>
/path/path2 <<none>>
/path/path2 <<none>>

0 comments on commit 929e861

Please sign in to comment.