From d274f3aede3650ab1ce03f25939072a40d59bce4 Mon Sep 17 00:00:00 2001 From: Matthew Johnson Date: Thu, 17 Aug 2017 09:04:14 -0700 Subject: [PATCH] Add "Applying update" print as a progress header Since this step can take a while print a header to give an indication of what the progress percentage is tracking. Update functional tests to include new output. Signed-off-by: Matthew Johnson --- src/update.c | 1 + test/functional/update/apply-full-file-delta/lines-checked | 1 + test/functional/update/boot-file/lines-checked | 1 + .../update/include-old-bundle-with-tracked-file/lines-checked | 1 + test/functional/update/include-old-bundle/lines-checked | 1 + test/functional/update/include/lines-checked | 1 + test/functional/update/missing-os-core/lines-checked | 1 + test/functional/update/newest-deleted/lines-checked | 1 + test/functional/update/re-update-bad-os-release/lines-checked | 1 + test/functional/update/re-update-required/lines-checked | 2 ++ test/functional/update/skip-verified-fullfiles/lines-checked | 1 + test/functional/update/use-full-file/lines-checked | 1 + test/functional/update/use-pack/lines-checked | 1 + .../update/verify-fix-path-hash-mismatch/lines-checked | 1 + .../functional/update/verify-fix-path-missing-dir/lines-checked | 1 + 15 files changed, 16 insertions(+) diff --git a/src/update.c b/src/update.c index a9051e07..6ba032a5 100644 --- a/src/update.c +++ b/src/update.c @@ -177,6 +177,7 @@ TRY_DOWNLOAD: sync(); /* rename to apply update */ + printf("Applying update\n"); ret = rename_all_files_to_final(updates); if (ret != 0) { return ret; diff --git a/test/functional/update/apply-full-file-delta/lines-checked b/test/functional/update/apply-full-file-delta/lines-checked index 7b74fd7d..f311b2f9 100644 --- a/test/functional/update/apply-full-file-delta/lines-checked +++ b/test/functional/update/apply-full-file-delta/lines-checked @@ -12,5 +12,6 @@ Statistics for going from version 10 to version 100: Starting download of remaining update content. This may take a while... Finishing download of update content... Staging file content +Applying update Update was applied. Update successful. System updated from version 10 to version 100 diff --git a/test/functional/update/boot-file/lines-checked b/test/functional/update/boot-file/lines-checked index b4db15fb..f8d8ba43 100644 --- a/test/functional/update/boot-file/lines-checked +++ b/test/functional/update/boot-file/lines-checked @@ -12,6 +12,7 @@ Starting download of remaining update content. This may take a while... File /usr/lib/kernel/testfile was not in a pack Finishing download of update content... Staging file content +Applying update Update was applied. Update successful. System updated from version 10 to version 100 1 files were not in a pack diff --git a/test/functional/update/include-old-bundle-with-tracked-file/lines-checked b/test/functional/update/include-old-bundle-with-tracked-file/lines-checked index eace10b7..1c8d12a3 100644 --- a/test/functional/update/include-old-bundle-with-tracked-file/lines-checked +++ b/test/functional/update/include-old-bundle-with-tracked-file/lines-checked @@ -12,6 +12,7 @@ Starting download of remaining update content. This may take a while... File /os-core was not in a pack Finishing download of update content... Staging file content +Applying update Update was applied. Update successful. System updated from version 20 to version 30 2 files were not in a pack diff --git a/test/functional/update/include-old-bundle/lines-checked b/test/functional/update/include-old-bundle/lines-checked index 30a77c5e..1fcaa36f 100644 --- a/test/functional/update/include-old-bundle/lines-checked +++ b/test/functional/update/include-old-bundle/lines-checked @@ -12,6 +12,7 @@ Starting download of remaining update content. This may take a while... File /os-core was not in a pack Finishing download of update content... Staging file content +Applying update Update was applied. Update successful. System updated from version 10 to version 100 3 files were not in a pack diff --git a/test/functional/update/include/lines-checked b/test/functional/update/include/lines-checked index 6f7c6daf..3152dbc1 100644 --- a/test/functional/update/include/lines-checked +++ b/test/functional/update/include/lines-checked @@ -12,6 +12,7 @@ Starting download of remaining update content. This may take a while... File /usr/bin was not in a pack Finishing download of update content... Staging file content +Applying update Update was applied. Update successful. System updated from version 10 to version 100 8 files were not in a pack diff --git a/test/functional/update/missing-os-core/lines-checked b/test/functional/update/missing-os-core/lines-checked index 6ce6cf53..3d6e988c 100644 --- a/test/functional/update/missing-os-core/lines-checked +++ b/test/functional/update/missing-os-core/lines-checked @@ -12,6 +12,7 @@ Starting download of remaining update content. This may take a while... File /os-core was not in a pack Finishing download of update content... Staging file content +Applying update Update was applied. Update successful. System updated from version 10 to version 100 1 files were not in a pack diff --git a/test/functional/update/newest-deleted/lines-checked b/test/functional/update/newest-deleted/lines-checked index d3d0796e..46b9a81c 100644 --- a/test/functional/update/newest-deleted/lines-checked +++ b/test/functional/update/newest-deleted/lines-checked @@ -12,5 +12,6 @@ Statistics for going from version 20 to version 30: Starting download of remaining update content. This may take a while... Finishing download of update content... Staging file content +Applying update Update was applied. Update successful. System updated from version 20 to version 30 diff --git a/test/functional/update/re-update-bad-os-release/lines-checked b/test/functional/update/re-update-bad-os-release/lines-checked index ee742c0f..109cdb35 100644 --- a/test/functional/update/re-update-bad-os-release/lines-checked +++ b/test/functional/update/re-update-bad-os-release/lines-checked @@ -12,6 +12,7 @@ Starting download of remaining update content. This may take a while... File /usr/bin was not in a pack Finishing download of update content... Staging file content +Applying update Update was applied. Update successful. System updated from version 10 to version 20 2 files were not in a pack diff --git a/test/functional/update/re-update-required/lines-checked b/test/functional/update/re-update-required/lines-checked index 4d12cf6f..1add426d 100644 --- a/test/functional/update/re-update-required/lines-checked +++ b/test/functional/update/re-update-required/lines-checked @@ -12,6 +12,7 @@ Starting download of remaining update content. This may take a while... File /usr/bin was not in a pack Finishing download of update content... Staging file content +Applying update Update was applied. Update successful. System updated from version 10 to version 20 3 files were not in a pack @@ -29,6 +30,7 @@ Starting download of remaining update content. This may take a while... File /usr/lib/os-release was not in a pack Finishing download of update content... Staging file content +Applying update Update was applied. Update successful. System updated from version 100 to version 110 1 files were not in a pack diff --git a/test/functional/update/skip-verified-fullfiles/lines-checked b/test/functional/update/skip-verified-fullfiles/lines-checked index baeaa6d1..d2a2eeb7 100644 --- a/test/functional/update/skip-verified-fullfiles/lines-checked +++ b/test/functional/update/skip-verified-fullfiles/lines-checked @@ -11,5 +11,6 @@ Statistics for going from version 10 to version 100: Starting download of remaining update content. This may take a while... Finishing download of update content... Staging file content +Applying update Update was applied. Update successful. System updated from version 10 to version 100 diff --git a/test/functional/update/use-full-file/lines-checked b/test/functional/update/use-full-file/lines-checked index 0c8deb9e..3cafbc3e 100644 --- a/test/functional/update/use-full-file/lines-checked +++ b/test/functional/update/use-full-file/lines-checked @@ -12,6 +12,7 @@ Starting download of remaining update content. This may take a while... File /usr/bin was not in a pack Finishing download of update content... Staging file content +Applying update Update was applied. Update successful. System updated from version 10 to version 100 1 files were not in a pack diff --git a/test/functional/update/use-pack/lines-checked b/test/functional/update/use-pack/lines-checked index 7b74fd7d..f311b2f9 100644 --- a/test/functional/update/use-pack/lines-checked +++ b/test/functional/update/use-pack/lines-checked @@ -12,5 +12,6 @@ Statistics for going from version 10 to version 100: Starting download of remaining update content. This may take a while... Finishing download of update content... Staging file content +Applying update Update was applied. Update successful. System updated from version 10 to version 100 diff --git a/test/functional/update/verify-fix-path-hash-mismatch/lines-checked b/test/functional/update/verify-fix-path-hash-mismatch/lines-checked index eb347097..a66f97fd 100644 --- a/test/functional/update/verify-fix-path-hash-mismatch/lines-checked +++ b/test/functional/update/verify-fix-path-hash-mismatch/lines-checked @@ -15,6 +15,7 @@ Staging file content REGEXP:^Update target directory does not exist: .*/target-dir/usr/bin. Trying to fix it$ Hash did not match for path : /usr Path /usr/bin is missing on the file system +Applying update Update was applied. Update successful. System updated from version 10 to version 100 1 files were not in a pack diff --git a/test/functional/update/verify-fix-path-missing-dir/lines-checked b/test/functional/update/verify-fix-path-missing-dir/lines-checked index 89646d3d..3b0d2e76 100644 --- a/test/functional/update/verify-fix-path-missing-dir/lines-checked +++ b/test/functional/update/verify-fix-path-missing-dir/lines-checked @@ -14,6 +14,7 @@ Finishing download of update content... Staging file content REGEXP:^Update target directory does not exist: .*/target-dir/usr/bin. Trying to fix it$ Path /usr/bin is missing on the file system +Applying update Update was applied. Update successful. System updated from version 10 to version 100 1 files were not in a pack