From b5b5b2687efaeef0b6970a46fe5b76bdbb4fb3e3 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 13 Aug 2007 17:29:03 +0000 Subject: add a test for dir vs symlink conflict --- t/data/SPECS/file-conflicts/e.spec | 22 ++++++++++++++++++++++ t/superuser--file-conflicts.t | 19 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 t/data/SPECS/file-conflicts/e.spec 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'); -- cgit v1.2.1