public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH v4 pxar 1/3] tests: adapt tests to decoder interface changes
Date: Wed, 12 Jun 2024 15:17:11 +0200	[thread overview]
Message-ID: <20240612131713.133353-2-c.ebner@proxmox.com> (raw)
In-Reply-To: <20240612131713.133353-1-c.ebner@proxmox.com>

The `Decoder`s `contents` method call can fail because of an added
consistency check when using split variant inputs.

Therefore, the additional error has to be handled by the callers.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
changes since version 3:
- not present

 tests/compat.rs    | 1 +
 tests/simple/fs.rs | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/compat.rs b/tests/compat.rs
index 8f1b778..c9e681a 100644
--- a/tests/compat.rs
+++ b/tests/compat.rs
@@ -125,6 +125,7 @@ fn test_archive() {
     let mut content = Vec::new();
     decoder
         .contents()
+        .expect("failed to get contents from decoder")
         .expect("failed to get contents for file entry")
         .read_to_end(&mut content)
         .expect("failed to read test file contents");
diff --git a/tests/simple/fs.rs b/tests/simple/fs.rs
index 96fcee9..39d1294 100644
--- a/tests/simple/fs.rs
+++ b/tests/simple/fs.rs
@@ -235,7 +235,7 @@ impl Entry {
                 PxarEntryKind::File { size, .. } => {
                     let mut data = Vec::new();
                     decoder
-                        .contents()
+                        .contents()?
                         .ok_or_else(|| {
                             format_err!("failed to get contents for file entry: {:?}", item.path())
                         })?
-- 
2.39.2



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


  reply	other threads:[~2024-06-12 13:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12 13:17 [pbs-devel] [PATCH v4 pxar proxmox-backup 0/3] fix fuse mount performance for split archives Christian Ebner
2024-06-12 13:17 ` Christian Ebner [this message]
2024-06-12 13:17 ` [pbs-devel] [PATCH v4 pxar 2/3] accessor: adapt and restrict contents access Christian Ebner
2024-06-12 13:17 ` [pbs-devel] [PATCH v4 proxmox-backup 3/3] client: pxar: fix fuse mount performance for split archives Christian Ebner
2024-06-17  9:28 ` [pbs-devel] applied-series: [PATCH v4 pxar proxmox-backup 0/3] " Fabian Grünbichler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240612131713.133353-2-c.ebner@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal