From ad0364c5581cb48d3d9868f58bf1c711689d1465 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 22 Jul 2021 11:34:40 +0200 Subject: [PATCH] tools: xattr: don't test things beyond our control whether the kernel allows super-long names or weird namespace prefixes is not our concern... also the latter fails under fakeroot Signed-off-by: Wolfgang Bumiller --- pbs-tools/src/xattr.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pbs-tools/src/xattr.rs b/pbs-tools/src/xattr.rs index 5e7845e7..f088b12c 100644 --- a/pbs-tools/src/xattr.rs +++ b/pbs-tools/src/xattr.rs @@ -200,13 +200,6 @@ mod tests { let fd = file.as_raw_fd(); - let mut name = b"user.".to_vec(); - for _ in 0..260 { - name.push(b'a'); - } - - let invalid_name = CString::new(name).unwrap(); - assert!(fsetxattr(fd, c_str!("user.attribute0"), b"value0").is_ok()); assert!(fsetxattr(fd, c_str!("user.empty"), b"").is_ok()); @@ -214,9 +207,6 @@ mod tests { assert_eq!(fsetxattr(fd, c_str!("trusted.attribute0"), b"value0"), Err(Errno::EPERM)); } - assert_eq!(fsetxattr(fd, c_str!("garbage.attribute0"), b"value"), Err(Errno::EOPNOTSUPP)); - assert_eq!(fsetxattr(fd, &invalid_name, b"err"), Err(Errno::ERANGE)); - let v0 = fgetxattr(fd, c_str!("user.attribute0")).unwrap(); let v1 = fgetxattr(fd, c_str!("user.empty")).unwrap();