Commit be76c04a authored by jan.koester's avatar jan.koester
Browse files

test

parent 46aa9ce5
Loading
Loading
Loading
Loading
+7 −0
Changes for build-chroot.sh: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1294,6 +1294,12 @@ stage_sources() {
        # patches next to the specs
        elif [[ -f $FENRIR_FILES/$fdir/${f#"$fdir"-} ]]; then
            cp "$FENRIR_FILES/$fdir/${f#"$fdir"-}" "$srcdir/$f"
        # a local directory files/<dir>/<sub>/ as <dir>-<sub>.tar.gz (ffmpeg's
        # generated/ tree), unpacked to <sub>/
        elif [[ $f == "$fdir"-*.tar.gz && -d $FENRIR_FILES/$fdir/$(basename "${f#"$fdir"-}" .tar.gz) ]]; then
            local sub
            sub="$(basename "${f#"$fdir"-}" .tar.gz)"
            tar_tree "$FENRIR_FILES/$fdir/$sub" "$srcdir/$f" "$sub"
        elif [[ -f $FENRIR_FILES/$fdir/$f ]]; then
            cp "$FENRIR_FILES/$fdir/$f" "$srcdir/$f"
        elif [[ -f $FENRIR_FILES/rpm/$f ]]; then
@@ -1313,6 +1319,7 @@ PACKAGES="${PACKAGES:-zlib zstd popt lua file systempp libressl libelf rpm fresh
    ca-certificates ncurses libjson-c libbrotli libcmdplus libuuidp libnetplus libhtmlpp libconfplus libhttppp libparitypp
    libauthdb-client libsmtppp liblzma libxml2 libarchive glib2 curl libsolv librepo fmt toml11 libsmartcols dnf5 createrepo_c 
    fenriros-release proxyplus openssh dosfstools e2fsprogs gptfdisk syslite sharedd adconnect storaged iscsid upsd tinyxml2 snmpdd ntpplus containerd webctl limine perl rsync
    nasm libwebp x264 x265 libaom ffmpeg
    fenriros-installer dwarves kernel systrace}"

# rpmbuild's automatic Provides/Requires (libc.so.1()(64bit), ...) need
+6 −0
Changes for include/cxx/list: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -378,6 +378,12 @@ public:
    void splice(const_iterator pos, list& other, const_iterator it) noexcept {
        node* n = it._n;
        if (!n) return;
        /* Within one list, pos == it or pos == next(it) is a no-op (the
         * standard says so). Relinking anyway with pos == it made the node
         * its own neighbour (n->next == n) -- mediadb's LRU touch of the
         * entry that already was at the front, then a double free when the
         * list was destroyed. */
        if (this == &other && (pos._n == n || pos._n == n->next)) return;

        if (n->prev) n->prev->next = n->next; else other._head = n->next;
        if (n->next) n->next->prev = n->prev; else other._tail = n->prev;
+13 −0
Changes for src/test/e2e/cxx_list_bitset_test.cpp: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -55,6 +55,19 @@ static int test_list() {
    std::list<int> copy = a;
    copy.pop_back();
    CHECK(a.size() == 6 && copy.size() == 5, "list copy is independent");

    /* LRU touch: moving the element that already is at pos (or right
     * before it) within the same list must leave the list unchanged. */
    std::list<int> lru = {7};
    lru.splice(lru.begin(), lru, lru.begin());
    CHECK(lru.size() == 1 && lru.front() == 7 && ++lru.begin() == lru.end(), "self-splice of the only element");
    std::list<int> t = {1, 2, 3};
    t.splice(t.begin(), t, t.begin());
    t.splice(std::next(t.begin(), 2), t, std::next(t.begin()));
    t.splice(t.begin(), t, std::prev(t.end()));
    int order[3], i = 0;
    for (int v : t) order[i++] = v;
    CHECK(t.size() == 3 && order[0] == 3 && order[1] == 1 && order[2] == 2, "self-splice no-ops and move-to-front");
    return 0;
}