summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/data/SPECS/file-conflicts/e.spec22
-rw-r--r--t/superuser--file-conflicts.t19
2 files changed, 41 insertions, 0 deletions
diff --git a/t/data/SPECS/file-conflicts/e.spec b/t/data/SPECS/file-conflicts/e.spec
new file mode 100644
index 00000000..d06e1ced
--- /dev/null
+++ b/t/data/SPECS/file-conflicts/e.spec
@@ -0,0 +1,22 @@
+Summary: x
+Name: e
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+BuildArch: noarch
+
+%description
+x
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/etc
+ln -s d $RPM_BUILD_ROOT/etc/dir
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+/etc/*
diff --git a/t/superuser--file-conflicts.t b/t/superuser--file-conflicts.t
index b86073e1..195f5006 100644
--- a/t/superuser--file-conflicts.t
+++ b/t/superuser--file-conflicts.t
@@ -1,5 +1,10 @@
#!/usr/bin/perl
+# a and b contains the same file name, with different content => should fail
+# a and c contents the same file name, with same content => should work
+# a and d contents the same directory name => should work
+# a and e contents the same path for a directory vs a symlink => should fail
+
use strict;
use lib '.', 't';
use helper;
@@ -30,6 +35,10 @@ sub test_rpm_same_transaction {
test_rpm_i_succeeds('a', 'd');
check_installed_and_remove('a', 'd');
+
+ # disabled, fail (#32528)
+ #test_rpm_i_fail('a', 'e');
+ #check_nothing_installed();
}
sub test_rpm_different_transactions {
@@ -37,6 +46,9 @@ sub test_rpm_different_transactions {
test_rpm_i_fail('b');
check_installed_names('a');
+ test_rpm_i_fail('e');
+ check_installed_names('a');
+
test_rpm_i_succeeds('c');
check_installed_and_remove('a', 'c');
@@ -55,6 +67,10 @@ sub test_urpmi_same_transaction {
urpmi('a d');
check_installed_and_remove('a', 'd');
+
+ # disabled, fail (#32528)
+ #urpmi('a e');
+ #check_installed_and_remove('a', 'e');
}
sub test_urpmi_different_transactions {
@@ -62,6 +78,9 @@ sub test_urpmi_different_transactions {
test_urpmi_fail('b');
check_installed_names('a');
+ test_urpmi_fail('e');
+ check_installed_names('a');
+
# disabled, fail when dropping RPMTAG_FILEDIGESTS
#urpmi('c');
#check_installed_and_remove('a', 'c');