fix: comprehensive boot warnings and exceptions — fixable silenced, unfixable diagnosed

Build system (5 gaps hardened):
- COOKBOOK_OFFLINE defaults to true (fork-mode)
- normalize_patch handles diff -ruN format
- New 'repo validate-patches' command (25/25 relibc patches)
- 14 patched Qt/Wayland/display recipes added to protected list
- relibc archive regenerated with current patch chain

Boot fixes (fixable):
- Full ISO EFI partition: 16 MiB → 1 MiB (matches mini, BIOS hardcoded 2 MiB offset)
- D-Bus system bus: absolute /usr/bin/dbus-daemon path (was skipped)
- redbear-sessiond: absolute /usr/bin/redbear-sessiond path (was skipped)
- daemon framework: silenced spurious INIT_NOTIFY warnings for oneshot_async services (P0-daemon-silence-init-notify.patch)
- udev-shim: demoted INIT_NOTIFY warning to INFO (expected for oneshot_async)
- relibc: comprehensive named semaphores (sem_open/close/unlink) replacing upstream todo!() stubs
- greeterd: Wayland socket timeout 15s → 30s (compositor DRM wait)
- greeter-ui: built and linked (header guard unification, sem_compat stubs removed)
- mc: un-ignored in both configs, fixed glib/libiconv/pcre2 transitive deps
- greeter config: removed stale keymapd dependency from display/greeter services
- prefix toolchain: relibc headers synced, _RELIBC_STDLIB_H guard unified

Unfixable (diagnosed, upstream):
- i2c-hidd: abort on no-I2C-hardware (QEMU) — process::exit → relibc abort
- kded6/greeter-ui: page fault 0x8 — Qt library null deref
- Thread panics fd != -1 — Rust std library on Redox
- DHCP timeout / eth0 MAC — QEMU user-mode networking
- hwrngd/thermald — no hardware RNG/thermal in VM
- live preload allocation — BIOS memory fragmentation, continues on demand
This commit is contained in:
2026-05-05 20:20:37 +01:00
parent a5f97b6632
commit f31522130f
81834 changed files with 11051982 additions and 108 deletions
@@ -0,0 +1,45 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## tst_qqmltreemodeltotablemodel Test:
#####################################################################
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_qqmltreemodeltotablemodel LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
# Collect test data
file(GLOB_RECURSE test_data_glob
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
data/*)
list(APPEND test_data ${test_data_glob})
qt_internal_add_test(tst_qqmltreemodeltotablemodel
SOURCES
tst_qqmltreemodeltotablemodel.cpp
testmodel.h testmodel.cpp
LIBRARIES
Qt::Gui
Qt::Qml
Qt::QmlPrivate
Qt::Quick
Qt::QuickPrivate
Qt::QuickTestUtilsPrivate
TESTDATA ${test_data}
)
## Scopes:
#####################################################################
qt_internal_extend_target(tst_qqmltreemodeltotablemodel CONDITION ANDROID OR IOS
DEFINES
QT_QMLTEST_DATADIR=":/data"
)
qt_internal_extend_target(tst_qqmltreemodeltotablemodel CONDITION NOT ANDROID AND NOT IOS
DEFINES
QT_QMLTEST_DATADIR="${CMAKE_CURRENT_SOURCE_DIR}/data"
)
@@ -0,0 +1,158 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "testmodel.h"
TreeItem::TreeItem(TreeItem *parent)
: m_parentItem(parent)
{}
TreeItem::~TreeItem()
{
qDeleteAll(m_childItems);
}
int TreeItem::row() const
{
if (!m_parentItem)
return 0;
return m_parentItem->m_childItems.indexOf(const_cast<TreeItem *>(this));
}
TestModel::TestModel(QObject *parent)
: QAbstractItemModel(parent)
{
m_rootItem.reset(new TreeItem());
for (int col = 0; col < m_columnCount; ++col)
m_rootItem.data()->m_entries << QVariant(QString("0, %1").arg(col));
createTreeRecursive(m_rootItem.data(), 4, 0, 4);
}
void TestModel::createTreeRecursive(TreeItem *item, int childCount, int currentDepth, int maxDepth)
{
for (int row = 0; row < childCount; ++row) {
auto childItem = new TreeItem(item);
for (int col = 0; col < m_columnCount; ++col)
childItem->m_entries << QVariant(QString("%1, %2").arg(row).arg(col));
item->m_childItems.append(childItem);
if (currentDepth < maxDepth && row == childCount - 1)
createTreeRecursive(childItem, childCount, currentDepth + 1, maxDepth);
}
}
TreeItem *TestModel::treeItem(const QModelIndex &index) const
{
if (!index.isValid())
return m_rootItem.data();
return static_cast<TreeItem *>(index.internalPointer());
}
int TestModel::rowCount(const QModelIndex &parent) const
{
if (!parent.isValid())
return 1; // root of the tree
if (parent.column() == 0)
return treeItem(parent)->m_childItems.size();
return 0;
}
int TestModel::columnCount(const QModelIndex &parent) const
{
return parent.column() == 0 ? m_columnCount : 0;
}
QVariant TestModel::data(const QModelIndex &index, int role) const
{
Q_UNUSED(role)
if (!index.isValid())
return QVariant();
TreeItem *item = treeItem(TestModel::index(index.row(), 0, index.parent()));
return item->m_entries.at(index.column());
}
bool TestModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
Q_UNUSED(role)
if (!index.isValid())
return false;
TreeItem *item = treeItem(TestModel::index(index.row(), 0, index.parent()));
item->m_entries[index.column()] = value;
emit dataChanged(index, index);
return true;
}
QModelIndex TestModel::index(int row, int column, const QModelIndex &parent) const
{
Q_UNUSED(column)
if (!hasIndex(row, column, parent))
return QModelIndex();
if (column != 0)
return createIndex(row, column);
if (!parent.isValid())
return createIndex(0, 0, m_rootItem.data());
return createIndex(row, 0, treeItem(parent)->m_childItems.at(row));
}
QModelIndex TestModel::parent(const QModelIndex &index) const
{
if (!index.isValid())
return QModelIndex();
if (index.column() != 0)
return QModelIndex();
TreeItem *parentItem = treeItem(index)->m_parentItem;
if (!parentItem) {
qWarning() << "failed to resolve parent item for:" << index;
return QModelIndex();
}
return createIndex(parentItem->row(), 0, parentItem);
}
bool TestModel::insertRows(int position, int rows, const QModelIndex &parent)
{
if (!parent.isValid()) {
qWarning() << "Cannot insert rows on an invalid parent!";
return false;
}
beginInsertRows(parent, position, position + rows - 1);
TreeItem *parentItem = treeItem(parent);
for (int row = 0; row < rows; ++row) {
auto newChildItem = new TreeItem(parentItem);
for (int col = 0; col < m_columnCount; ++col)
newChildItem->m_entries << QVariant(QString("%1, %2 (inserted)").arg(position + row).arg(col));
parentItem->m_childItems.insert(position + row, newChildItem);
}
endInsertRows();
return true;
}
void insertColumnsRecursive(TreeItem *item, int cols)
{
int pos = item->m_entries.size();
for (int col = 0; col < cols; col++)
item->m_entries << QVariant(QString("%1, %2 (inserted)").arg(pos + col).arg(col));
for (auto child : item->m_childItems)
insertColumnsRecursive(child, cols);
}
bool TestModel::insertColumns(int position, int cols, const QModelIndex &parent)
{
if (!parent.isValid()) {
qWarning() << "Cannot insert columns on an invalid parent!";
return false;
}
beginInsertColumns(parent, position, position + cols - 1);
TreeItem *item = m_rootItem.data();
insertColumnsRecursive(item, cols);
m_columnCount += cols;
endInsertColumns();
return true;
}
@@ -0,0 +1,48 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef TESTMODEL_H
#define TESTMODEL_H
#include <QtCore/qabstractitemmodel.h>
#include <QtQuick/qquickview.h>
class TreeItem
{
public:
explicit TreeItem(TreeItem *parent = nullptr);
~TreeItem();
int row() const;
QList<TreeItem *> m_childItems;
TreeItem *m_parentItem;
QList<QVariant> m_entries;
};
// ########################################################
class TestModel : public QAbstractItemModel
{
Q_OBJECT
public:
explicit TestModel(QObject *parent = nullptr);
void createTreeRecursive(TreeItem *item, int childCount, int currentDepth, int maxDepth);
TreeItem *treeItem(const QModelIndex &index) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex & = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex &index) const override;
bool insertRows(int position, int rows, const QModelIndex &parent) override;
bool insertColumns(int position, int rows, const QModelIndex &parent) override;
private:
QScopedPointer<TreeItem> m_rootItem;
int m_columnCount = 2;
};
#endif // TESTMODEL_H
@@ -0,0 +1,39 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/qtest.h>
#include <QAbstractItemModelTester>
#include <QtQmlModels/private/qqmltreemodeltotablemodel_p_p.h>
#include "testmodel.h"
/*
* Note: Out of practical reasons, QQmlTreeModelToTableModel is by and large
* tested from tst_qquicktreeview.cpp, where TreeView is available.
*/
class tst_QQmlTreeModelToTableModel : public QObject {
Q_OBJECT
private slots:
void testTestModel();
void testTreeModelToTableModel();
};
void tst_QQmlTreeModelToTableModel::testTestModel()
{
TestModel treeModel;
QAbstractItemModelTester tester(&treeModel, QAbstractItemModelTester::FailureReportingMode::QtTest);
}
void tst_QQmlTreeModelToTableModel::testTreeModelToTableModel()
{
QQmlTreeModelToTableModel model;
TestModel treeModel;
model.setModel(&treeModel);
QAbstractItemModelTester tester(&model, QAbstractItemModelTester::FailureReportingMode::QtTest);
}
QTEST_MAIN(tst_QQmlTreeModelToTableModel)
#include "tst_qqmltreemodeltotablemodel.moc"