mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-09-01 02:34:43 +00:00
Remove logic for flag not in use
The logic is testing a flag that mixer does not set and would like to change the purpose of in a new version. Remove the test (needs a format bump before mixer can use the flag) for the flag. Signed-off-by: William Douglas <william.douglas@intel.com>
This commit is contained in:
committed by
William Douglas
parent
6896d8f155
commit
a011f9429a
@@ -193,14 +193,6 @@ struct manifest *manifest_parse(const char *component, const char *filename, boo
|
||||
file->is_experimental = 1;
|
||||
}
|
||||
|
||||
if (line[2] == 'C') {
|
||||
file->is_config = 1;
|
||||
} else if (line[2] == 's') {
|
||||
file->is_state = 1;
|
||||
} else if (line[2] == 'b') {
|
||||
file->is_boot = 1;
|
||||
}
|
||||
|
||||
if (line[3] == 'r') {
|
||||
/* rename flag is ignored */
|
||||
} else if (line[3] == 'x') {
|
||||
|
||||
+3
-6
@@ -16,9 +16,6 @@ X... 0000000000000000000000000000000000000000000000000000000000000004 30 f4
|
||||
.d.. 0000000000000000000000000000000000000000000000000000000000000005 30 f5
|
||||
.g.. 0000000000000000000000000000000000000000000000000000000000000006 30 f6
|
||||
.e.. 0000000000000000000000000000000000000000000000000000000000000007 30 f7
|
||||
..C. 0000000000000000000000000000000000000000000000000000000000000008 30 f8
|
||||
..s. 0000000000000000000000000000000000000000000000000000000000000009 30 f9
|
||||
..b. 0000000000000000000000000000000000000000000000000000000000000010 30 f10
|
||||
..X. 0000000000000000000000000000000000000000000000000000000000000011 30 f11
|
||||
...r 0000000000000000000000000000000000000000000000000000000000000012 30 f12
|
||||
...X 0000000000000000000000000000000000000000000000000000000000000013 30 f13
|
||||
..X. 0000000000000000000000000000000000000000000000000000000000000008 30 f8
|
||||
...r 0000000000000000000000000000000000000000000000000000000000000009 30 f9
|
||||
...X 0000000000000000000000000000000000000000000000000000000000000010 30 f10
|
||||
|
||||
+13
-19
@@ -23,7 +23,7 @@
|
||||
#include "swupd.h"
|
||||
#include "test_helper.h"
|
||||
|
||||
static void validate_file(struct list *files, const char *filename, int version, int hash, int is_dir, int is_file, int is_link, int is_deleted, int is_ghosted, int is_manifest, int is_config, int is_state, int is_boot, int is_experimental)
|
||||
static void validate_file(struct list *files, const char *filename, int version, int hash, int is_dir, int is_file, int is_link, int is_deleted, int is_ghosted, int is_manifest, int is_experimental)
|
||||
{
|
||||
struct list *list;
|
||||
char hash_str[SWUPD_HASH_LEN];
|
||||
@@ -39,9 +39,6 @@ static void validate_file(struct list *files, const char *filename, int version,
|
||||
check(file->is_deleted == is_deleted);
|
||||
check(file->is_ghosted == is_ghosted);
|
||||
check(file->is_manifest == is_manifest);
|
||||
check(file->is_config == is_config);
|
||||
check(file->is_state == is_state);
|
||||
check(file->is_boot == is_boot);
|
||||
check(file->is_experimental == is_experimental);
|
||||
|
||||
check(file->last_change == version);
|
||||
@@ -92,24 +89,21 @@ static void test_manifest_parse()
|
||||
// Check if parser can parse all different flags supported for the file list
|
||||
manifest = manifest_parse_test("test", dir, "data/mom2", false);
|
||||
check(manifest != NULL);
|
||||
check(list_len(manifest->files) == 13);
|
||||
check(list_len(manifest->files) == 10);
|
||||
check(list_len(manifest->manifests) == 1);
|
||||
|
||||
validate_file(manifest->manifests, "m1", 10, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0);
|
||||
validate_file(manifest->manifests, "m1", 10, 1, 0, 0, 0, 0, 0, 1, 0);
|
||||
|
||||
validate_file(manifest->files, "f1", 20, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
validate_file(manifest->files, "f2", 30, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
validate_file(manifest->files, "f3", 30, 3, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0);
|
||||
validate_file(manifest->files, "f4", 30, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
validate_file(manifest->files, "f5", 30, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0);
|
||||
validate_file(manifest->files, "f6", 30, 6, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0);
|
||||
validate_file(manifest->files, "f7", 30, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
|
||||
validate_file(manifest->files, "f8", 30, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0);
|
||||
validate_file(manifest->files, "f9", 30, 9, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0);
|
||||
validate_file(manifest->files, "f10", 30, 10, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);
|
||||
validate_file(manifest->files, "f11", 30, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
validate_file(manifest->files, "f12", 30, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
validate_file(manifest->files, "f13", 30, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
validate_file(manifest->files, "f1", 20, 1, 0, 1, 0, 0, 0, 0, 0);
|
||||
validate_file(manifest->files, "f2", 30, 2, 1, 0, 0, 0, 0, 0, 0);
|
||||
validate_file(manifest->files, "f3", 30, 3, 0, 0, 1, 0, 0, 0, 0);
|
||||
validate_file(manifest->files, "f4", 30, 4, 0, 0, 0, 0, 0, 0, 0);
|
||||
validate_file(manifest->files, "f5", 30, 5, 0, 0, 0, 1, 0, 0, 0);
|
||||
validate_file(manifest->files, "f6", 30, 6, 0, 0, 0, 1, 1, 0, 0);
|
||||
validate_file(manifest->files, "f7", 30, 7, 0, 0, 0, 0, 0, 0, 1);
|
||||
validate_file(manifest->files, "f8", 30, 8, 0, 0, 0, 0, 0, 0, 0);
|
||||
validate_file(manifest->files, "f9", 30, 9, 0, 0, 0, 0, 0, 0, 0);
|
||||
validate_file(manifest->files, "f10", 30, 10, 0, 0, 0, 0, 0, 0, 0);
|
||||
|
||||
manifest_free(manifest);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user