public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox] oci: ignore tests that require to be run as UID 0
@ 2026-03-09 15:39 Filip Schauer
  2026-03-10  8:40 ` Fabian Grünbichler
  0 siblings, 1 reply; 2+ messages in thread
From: Filip Schauer @ 2026-03-09 15:39 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-10  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-09 15:39 [PATCH proxmox] oci: ignore tests that require to be run as UID 0 Filip Schauer
2026-03-10  8:40 ` Fabian Grünbichler

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