The following commit has been merged in the master branch:
commit 9dcb50a59414e1fe0e6a8a4c8ee9f59d10706396
Author: Raphaël Hertzog <[email protected]>
Date: Mon Sep 12 09:42:11 2011 +0200
update-alternatives: new non-regression test
This one catches the regression introduced in
6c481e19a532080643e3cf5c76760df8009ea2c7 and fixed in
9dceac005a0331ceb840f9c8273c7fd195413516.
It should also catch the former problem of passing NULL to stat() (via
new_file). But this did not trigger any segfault, merely a failure
with EFAULT.
diff --git a/utils/t/100_update_alternatives.t
b/utils/t/100_update_alternatives.t
index c5c4b0a..1926ec1 100644
--- a/utils/t/100_update_alternatives.t
+++ b/utils/t/100_update_alternatives.t
@@ -81,7 +81,7 @@ my @choices = (
);
my $nb_slaves = 4;
plan tests => (4 * ($nb_slaves + 1) + 2) * 26 # number of check_choices
- + 102; # rest
+ + 106; # rest
sub cleanup {
system("rm -rf $tmpdir && mkdir -p $admindir && mkdir -p $altdir");
@@ -362,7 +362,15 @@ $choices[0]{"slaves"}[0]{"link"} =
"$bindir/generic-slave-bis";
install_choice(0);
check_choice(0, "auto", "rename lost file");
check_no_link($old_slave, "rename lost file");
+# update of alternative with many slaves not currently installed
+# and the link of the renamed slave exists while it should not
+set_choice(1);
+symlink("/bin/cat", "$bindir/generic-slave-bis");
$choices[0]{"slaves"}[0]{"link"} = "$bindir/slave2";
+install_choice(0, test_id => "update with non-installed slaves");
+check_no_link("$bindir/generic-slave-bis",
+ "drop renamed symlink that should not be installed");
+
# test install with empty admin file (#457863)
cleanup();
system("touch $admindir/generic-test");
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]