- 09 Nov, 2020 2 commits
-
-
Christian Kellner authored
Only meant to be run from schedule pipelines, since there is a rate limit for coverity.
-
Christian Kellner authored
Add a new container to perform coverity analysis, i.e. it fetches the coverity distribution. Add a new coverity.sh script to actually perform the analysis and upload the results.
-
- 21 Oct, 2020 5 commits
-
-
Christian Kellner authored
Add a new test for `bolt_str_parse_as_uint` based on the existing tests for `parse_as_xxx`.
-
Christian Kellner authored
Add a new helper to parse a string as unsigned integer (uint). Internally uses the 64 bit based uint64 parse method and then checks the parsed value fits into an unsigned integer.
-
Christian Kellner authored
For both, parse_uint{32, 64}, check that `errno` is properly set.
-
Christian Kellner authored
The `bolt_str_parse_as_uint32` method uses the uint64 based method to parse the string and then afterwards checks for the parsed value overflows an uint32. In that case also set the errno value, to be consistent with the uint64 parse method.
-
Christian Kellner authored
The value we are checking is a signed 'int', so use the proper comparison function, i.e. `g_assert_cmpint`.
-
- 05 Oct, 2020 9 commits
-
-
Christian Kellner authored
If codespell is available, as it should be in the Fedora container, run in on the source.
-
Christian Kellner authored
Can then be used by docker-build.sh to spell check the source.
-
Christian Kellner authored
Fix all spelling mistakes uncovered by codespell.
-
Christian Kellner authored
This makes codepsell happy without using a German dict.
-
Christian Kellner authored
Fedora 30 is actually EOL already. Use the current stable (F32).
-
Christian Kellner authored
Check that if bolt_domain_can_delete returns FALSE, the store does indeed refuse to delete the domain.
-
Christian Kellner authored
Use the new bolt_domain_can_delete function to check if a domain can be safely deleted before doing so. In the case it is not safe to delete the domain, the bolt_store_del_domain method will now return FALSE and propagate the error from domain_can_delete.
-
Christian Kellner authored
Check that if a domain has journal entries, bolt_domain_can_delete indeed returns FALSE, and TRUE otherwise. This code modifies the original test to use the original domain object 'd1' to delete the domain instead of the object that was fetched from the store. This is so that there are not two objects referring to the domain.
-
Christian Kellner authored
Add a new method, bolt_domain_can_delete, which can be used to check if a domain can safely be deleted without the loss of data. Currently, the only case where this can happen if the boot acl journal for the domain has entries. The function returns FALSE and sets and GError accordingly in case it is not safe to delete the domain.
-
- 23 Sep, 2020 12 commits
-
-
Christian Kellner authored
Check that if we remove a domain, its journal gets removed as well.
-
Christian Kellner authored
Helper to check if a journal of a give type and name exists in the store. Does not check if the specified journal has entries, i.e. an empty journal does exist. :)
-
Christian Kellner authored
When the domain is remove from the store, which means that a previously set "store" member will be set to NULL, also remove the journal.
-
Christian Kellner authored
-
Christian Kellner authored
We need to have the fresh property set to false after put_diff is called.
-
Christian Kellner authored
If all goes well and we replaced the journal with a new one, its freshness needs to be set to FALSE, but was not. Fix that using the new setter.
-
Christian Kellner authored
Add a setter method that will also emit the property notification.
-
Christian Kellner authored
Better separate the cleanup of an existing associated store from referencing and setting up the new store and journal. This makes it easier to follow and prepares for a new helper function to remove the log (if empty).
-
Christian Kellner authored
Including opening and deleting the journal.
-
Christian Kellner authored
Add a new method to delete a journal of a given type and name.
-
Christian Kellner authored
Instead of doing it all directly in set_property, do it in a separate function. No change to the logic itself.
-
Christian Kellner authored
Not much to see here. I do make typos. A lot. And David is not here to check them. So I blame him, really.
-
- 21 Sep, 2020 1 commit
-
-
Christian Kellner authored
Instead of using a construct continuing the loop in the case that a device is not a thunderbolt device, just do the one desired action if it is one.
-
- 02 Sep, 2020 11 commits
-
-
Christian Kellner authored
Just be a bit more PEP-8 compliant.
-
Christian Kellner authored
On integrated TBT (like ICL/TGL) the UUID of the controller is not stable, i.e. it changes between reboots. We therefore must not be saving the domain.
-
Christian Kellner authored
The bolt daemon uses the uuid of the host controller, i.e. the thunderbolt switch, to uniquely identify the domain across reboots. The main reason for this was the boot acl, which can change in the absence of the domain: in older tbt hardware, the controller was powered in hardware when no device was attached. If a user then wanted to remove a device from the controller, that needed to be recorded and synced back to the boot acl when the controller later became available again. All this relies on the fact that the uuid of the controller is stable, i.e. does not change across reboots. This sadly, is not true for integrated TBT, like e.g. on ice lake (ICL) and tiger lake (TGL). In the manager, the stability of the domain's uuid is now detected via the PCI id of the native host interface. If it is in fact not stable, or if the PCI id is unknown, the domain will not be stored. As a result, removing devices from the boot acl while the controller is offline, will not properly be synced to the controller. Since modern controllers are actually not powered down, but use runtime PM, i.e. they go to D3 cold state, this should indeed not matter much. Additionally, modern systems use the IOMMU to secure device access and there the firmware can and will indeed authorize the device during boot. Therefore the boot acl becomes less important, and there seems indeed to be no boot acl entries slots on ICL even.
-
Christian Kellner authored
Add the native host interface (NHI) udev device as a parent of the thunderbolt domain for both, the device mock tree and the simple add_host_domain function. The NHI is a PCI device, which bolt will use to determine certain thunderbolt functionality, i.e. if the uuid of the controller is stable.
-
Christian Kellner authored
Overwrite the disconnect method in TbDevice and reset the 'key' and 'authorized' attributes there, instead of conditional checks in the base class.
-
Christian Kellner authored
Check well known stable and unstable cases and also check the error case, i.e. asking for information about an unknown id.
-
Christian Kellner authored
Add a table that contains the information for which native host interface (NHI), identified via their PCI ids, the uuid of the associated host / switch device is "stable", i.e. does not change across reboots.
-
Christian Kellner authored
When the domain gets exported, also log the detailed domain data, via LOG_DOM ().
-
Christian Kellner authored
Extract the code that stores the domain, together with the error checking path, into its own small helper function. This is mostly to prepare for conditional storing of domains, in the case when their uuid is not stable across reboots.
-
Christian Kellner authored
In handle_udev_device_added (), if the device creation failed, show the sysfs path, so it is easy to identify the underlying udev device.
-
Christian Kellner authored
Now that every domain has an NHI PCI device as a parent, check that bolt_sysfs_nhi_id_for_domain works correctly.
-