From 87b9c2e0998d1bca6738345da94f684207baa0d5 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Sat, 2 Jan 2016 17:43:53 +0100 Subject: [PATCH] tests: add test case for issue #143 Segfault when attempting to install a package on hold --- tests/xbps/xbps-install/behaviour_tests.sh | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) mode change 100644 => 100755 tests/xbps/xbps-install/behaviour_tests.sh diff --git a/tests/xbps/xbps-install/behaviour_tests.sh b/tests/xbps/xbps-install/behaviour_tests.sh old mode 100644 new mode 100755 index 02f39ecf..15cfbbdf --- a/tests/xbps/xbps-install/behaviour_tests.sh +++ b/tests/xbps/xbps-install/behaviour_tests.sh @@ -32,6 +32,33 @@ install_existent_body() { atf_check_equal $? 0 } +atf_test_case update_pkg_on_hold + +update_pkg_on_hold_head() { + atf_set "descr" "xbps-install(8): update packages on hold (issue #143)" +} + +update_pkg_on_hold_body() { + mkdir -p some_repo pkg + touch pkg/file00 + cd some_repo + xbps-create -A noarch -n pkg-1.0_1 -s "pkg" ../pkg + atf_check_equal $? 0 + xbps-rindex -d -a $PWD/*.xbps + atf_check_equal $? 0 + xbps-install -r root -C empty.conf --repository=$PWD/some_repo -y pkg + xbps-pkgdb -r root -m hold pkg + cd some_repo + xbps-create -A noarch -n pkg-1.0_2 -s "pkg" ../pkg + atf_check_equal $? 0 + xbps-rindex -d -a $PWD/*.xbps + atf_check_equal $? 0 + cd .. + xbps-install -r root -C empty.conf --repository=$PWD/some_repo -yu >&2 + atf_check_equal $? 0 +} + atf_init_test_cases() { atf_add_test_case install_existent + atf_add_test_case update_pkg_on_hold }