diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:09 +0000 |
commit | 3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c (patch) | |
tree | 9532e637f47d6ff7246ccbabb62d4e2b4b5908df /tests | |
parent | Adding debian version 1.22.6. (diff) | |
download | dpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.tar.xz dpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.zip |
Merging upstream version 1.22.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/README | 5 | ||||
-rw-r--r-- | tests/Test.mk | 3 | ||||
-rw-r--r-- | tests/t-db/Makefile | 10 | ||||
-rw-r--r-- | tests/t-db/db-bogus-versioned-provides-update/status | 10 | ||||
-rw-r--r-- | tests/t-db/db-bogus-versioned-provides-update/updates/.keep | 0 | ||||
-rw-r--r-- | tests/t-db/db-bogus-versioned-provides-update/updates/0001 | 10 | ||||
-rw-r--r-- | tests/t-db/db-bogus-versioned-provides/status | 21 | ||||
-rw-r--r-- | tests/t-db/db-bogus-versioned-provides/updates/.keep | 0 | ||||
-rw-r--r-- | tests/t-provides/Makefile | 15 | ||||
-rw-r--r-- | tests/t-provides/pkg-provides-bogus/DEBIAN/control | 8 |
10 files changed, 80 insertions, 2 deletions
diff --git a/tests/README b/tests/README index 3da99ab..a6592a4 100644 --- a/tests/README +++ b/tests/README @@ -10,7 +10,10 @@ You probably want to use something like eatmydata to run the tests, it affects the performance significantly. To test the tools from the dpkg build-tree, use the «test» target. If you -want instead to test the installed programs use the «installtest» target +want instead to test the installed programs use the «installtest» target. + +To test with the compiler sanitizer «configure ---enable-compiler-sanitizer», +and run the tests normally. The DPKG_TESTSUITE_OPTIONS environment/make variable can be used to change the behavior of the test runs, the following options are currently diff --git a/tests/Test.mk b/tests/Test.mk index 3c020af..a830d5d 100644 --- a/tests/Test.mk +++ b/tests/Test.mk @@ -27,6 +27,9 @@ DPKG_ENV = \ # eatmydata confuses ASAN link order check. export ASAN_OPTIONS = verify_asan_link_order=0 +# Do not fail due to leaks, as the code is still using lots of +# static variables and error variables. +export LSAN_OPTIONS = exitcode=0 ifdef DPKG_BUILDTREE export DPKG_DATADIR := $(DPKG_BUILDTREE)/src diff --git a/tests/t-db/Makefile b/tests/t-db/Makefile index 2e5b621..a64e28c 100644 --- a/tests/t-db/Makefile +++ b/tests/t-db/Makefile @@ -16,6 +16,8 @@ TEST_CASES += test-bogus-dupe-same-single TEST_CASES += test-bogus-dupe-diff-single TEST_CASES += test-bogus-multi TEST_CASES += test-bogus-multi-update +TEST_CASES += test-bogus-versioned-provides +TEST_CASES += test-bogus-versioned-provides-update test-case: $(TEST_CASES) @@ -58,3 +60,11 @@ test-bogus-multi: test-bogus-multi-update: override DPKG_ADMINDIR = db-bogus-multi-update test-bogus-multi-update: $(call stderr_has,$(PKG_TUPLE),error) + +test-bogus-versioned-provides: override DPKG_ADMINDIR = db-bogus-versioned-provides +test-bogus-versioned-provides: + $(call stderr_has,$(PKG_TUPLE),warning) + +test-bogus-versioned-provides-update: override DPKG_ADMINDIR = db-bogus-versioned-provides-update +test-bogus-versioned-provides-update: + $(call stderr_has,$(PKG_TUPLE),warning) diff --git a/tests/t-db/db-bogus-versioned-provides-update/status b/tests/t-db/db-bogus-versioned-provides-update/status new file mode 100644 index 0000000..ce0b2eb --- /dev/null +++ b/tests/t-db/db-bogus-versioned-provides-update/status @@ -0,0 +1,10 @@ +Package: pkg-correct-versioned-provides +Status: install ok installed +Priority: extra +Section: test +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: amd64 +Version: 1.0 +Provides: pkg-correct (= 1.0) +Description: test package + Correct versioned Provides with equal operator. diff --git a/tests/t-db/db-bogus-versioned-provides-update/updates/.keep b/tests/t-db/db-bogus-versioned-provides-update/updates/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/t-db/db-bogus-versioned-provides-update/updates/.keep diff --git a/tests/t-db/db-bogus-versioned-provides-update/updates/0001 b/tests/t-db/db-bogus-versioned-provides-update/updates/0001 new file mode 100644 index 0000000..4851dfb --- /dev/null +++ b/tests/t-db/db-bogus-versioned-provides-update/updates/0001 @@ -0,0 +1,10 @@ +Package: pkg-bogus-versioned-provides +Status: install ok installed +Priority: extra +Section: test +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: amd64 +Version: 1.0 +Provides: pkg-bogus (>= 1.0) +Description: test package + Bogus versioned provides with non-equal operator. diff --git a/tests/t-db/db-bogus-versioned-provides/status b/tests/t-db/db-bogus-versioned-provides/status new file mode 100644 index 0000000..bd3858c --- /dev/null +++ b/tests/t-db/db-bogus-versioned-provides/status @@ -0,0 +1,21 @@ +Package: pkg-bogus-versioned-provides +Status: install ok installed +Priority: extra +Section: test +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: amd64 +Version: 1.0 +Provides: pkg-bogus (>= 1.0) +Description: test package + Bogus versioned provides with non-equal operator. + +Package: pkg-correct-versioned-provides +Status: install ok installed +Priority: extra +Section: test +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: amd64 +Version: 1.0 +Provides: pkg-correct (= 1.0) +Description: test package + Correct versioned Provides with equal operator. diff --git a/tests/t-db/db-bogus-versioned-provides/updates/.keep b/tests/t-db/db-bogus-versioned-provides/updates/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/t-db/db-bogus-versioned-provides/updates/.keep diff --git a/tests/t-provides/Makefile b/tests/t-provides/Makefile index 6794c20..76e3073 100644 --- a/tests/t-provides/Makefile +++ b/tests/t-provides/Makefile @@ -8,6 +8,17 @@ TESTS_DEB := \ include ../Test.mk +test-bogus: + # test building with bogus provides + ! $(DPKG_BUILD_DEB) pkg-provides-bogus + + # build bogus packages + $(DPKG_BUILD_DEB) --nocheck pkg-provides-bogus + + # test installing packages with bogus provides + ! $(DPKG_INSTALL) pkg-provides-bogus.deb + $(call pkg_is_not_installed,pkg-provides-bogus) + define PURGE_DEPENDS $(DPKG_PURGE) pkg-depends $(DPKG_PURGE) pkg-depends-le @@ -282,7 +293,7 @@ test-conflicts: # The provided predependency is removed, pass $(DPKG_PURGE) pkg-provides -test-case: test-depends test-predepends test-breaks test-conflicts +test-case: test-bogus test-depends test-predepends test-breaks test-conflicts test-clean: -$(DPKG_PURGE) pkg-depends @@ -305,3 +316,5 @@ test-clean: -$(DPKG_PURGE) pkg-a-depends-ge-lt -$(DPKG_PURGE) pkg-b-provides -$(DPKG_PURGE) pkg-c-provides + + rm -f pkg-provides-bogus.deb diff --git a/tests/t-provides/pkg-provides-bogus/DEBIAN/control b/tests/t-provides/pkg-provides-bogus/DEBIAN/control new file mode 100644 index 0000000..a64ab77 --- /dev/null +++ b/tests/t-provides/pkg-provides-bogus/DEBIAN/control @@ -0,0 +1,8 @@ +Package: pkg-provides-bogus +Version: 0 +Section: test +Priority: extra +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: all +Provides: pkg-virtual-bogus (>= 1.0) +Description: test package - package providing a bogus virtual package |