public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Filip Schauer <f.schauer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH proxmox] oci: ignore tests that require to be run as UID 0
Date: Mon,  9 Mar 2026 16:39:25 +0100	[thread overview]
Message-ID: <20260309154055.139983-1-f.schauer@proxmox.com> (raw)

This prevents unprivileged test runs from failing when extracting test
artifacts containing files with UID 0.

The tests can still run without root privileges using a user namespace:
unshare -r cargo test -- --include-ignored

Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
---
 proxmox-oci/tests/extract_replace.rs   | 3 +++
 proxmox-oci/tests/extract_whiteouts.rs | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/proxmox-oci/tests/extract_replace.rs b/proxmox-oci/tests/extract_replace.rs
index eb41f9e3..2c8ea7ed 100644
--- a/proxmox-oci/tests/extract_replace.rs
+++ b/proxmox-oci/tests/extract_replace.rs
@@ -4,6 +4,7 @@ use proxmox_oci::{parse_and_extract_image, Arch};
 use proxmox_sys::fs::make_tmp_dir;
 
 #[test]
+#[ignore = "Must be run as UID 0 (unshare -r cargo test -- --include-ignored)"]
 fn test_replace_file() {
     let extract_dir = make_tmp_dir("/tmp/", None).unwrap();
 
@@ -23,6 +24,7 @@ fn test_replace_file() {
 }
 
 #[test]
+#[ignore = "Must be run as UID 0 (unshare -r cargo test -- --include-ignored)"]
 fn test_replace_file_with_dir() {
     let extract_dir = make_tmp_dir("/tmp/", None).unwrap();
 
@@ -40,6 +42,7 @@ fn test_replace_file_with_dir() {
 }
 
 #[test]
+#[ignore = "Must be run as UID 0 (unshare -r cargo test -- --include-ignored)"]
 fn test_replace_dir_with_file() {
     let extract_dir = make_tmp_dir("/tmp/", None).unwrap();
 
diff --git a/proxmox-oci/tests/extract_whiteouts.rs b/proxmox-oci/tests/extract_whiteouts.rs
index 71ec4dea..0333dac9 100644
--- a/proxmox-oci/tests/extract_whiteouts.rs
+++ b/proxmox-oci/tests/extract_whiteouts.rs
@@ -40,6 +40,7 @@ fn test_whiteout_root_parent_breakout() {
 }
 
 #[test]
+#[ignore = "Must be run as UID 0 (unshare -r cargo test -- --include-ignored)"]
 fn test_whiteout_current_directory() {
     let extract_dir = make_tmp_dir("/tmp/", None).unwrap();
 
@@ -57,6 +58,7 @@ fn test_whiteout_current_directory() {
 }
 
 #[test]
+#[ignore = "Must be run as UID 0 (unshare -r cargo test -- --include-ignored)"]
 fn test_whiteout_symlink() {
     let extract_dir = make_tmp_dir("/tmp/", None).unwrap();
 
@@ -75,6 +77,7 @@ fn test_whiteout_symlink() {
 }
 
 #[test]
+#[ignore = "Must be run as UID 0 (unshare -r cargo test -- --include-ignored)"]
 fn test_whiteout_dead_symlink_parent() {
     let extract_dir = make_tmp_dir("/tmp/", None).unwrap();
 
-- 
2.47.3





             reply	other threads:[~2026-03-09 15:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 15:39 Filip Schauer [this message]
2026-03-10  8:40 ` 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=20260309154055.139983-1-f.schauer@proxmox.com \
    --to=f.schauer@proxmox.com \
    --cc=pve-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