summaryrefslogtreecommitdiff
path: root/src/test/test-tables.c
Commit message (Collapse)AuthorAgeFilesLines
* basic: rename util.h to logarithm.hZbigniew Jędrzejewski-Szmek2022-11-081-1/+0
| | | | | util.h is now about logarithms only, so we can rename it. Many files included util.h for no apparent reason… Those includes are dropped.
* install: include full type name in special UnitFilePresetMode valuesLennart Poettering2022-10-141-1/+1
| | | | | | Typically the _MAX and _INVALID special enum values use the full type as prefix, even if the actual values of the enum might not. Let's follow this rule here too.
* install: make InstallChange enum type a proper typeLennart Poettering2022-10-141-1/+1
| | | | | | | We can just make this an enum, as long as we ensure it has enough range, which we can do by adding -ERRNO_MAX as one possible value (at least on GNU C). We already do that at multiple other places, so let's do this here too.
* shared/install: rename 'unit_file_change_type' to 'install_change' + followupsZbigniew Jędrzejewski-Szmek2022-10-131-1/+1
| | | | | | We had an anonymous enum with values called UNIT_FILE_…, which could easily be confused with UNIT_FILE_… from UnitFileFlags enum. This commit renames the enum values and also the variables which refer to them.
* compress: make Compression a regular non-sparse enumLennart Poettering2022-04-261-2/+1
| | | | | | | Given we have two different types for the journal object flags and the Compression enum, let's make the latter a regular non-sparse enum, and thus remove some surprises. We have to convert anyway between the two, and already do via COMPRESSION_FROM_OBJECT().
* basic: move compress.[ch] → src/basic/Lennart Poettering2022-04-261-1/+1
| | | | | | | | | | | | The compression helpers are used both in journal code and in coredump code, and there's a good chance we'll use them later for other stuff. Let's hence move them into src/basic/, to make them a proper internal API we can use from everywhere where that's desirable. (pstore might be a candidate, for example) No real code changes, just some moving around, build system rearrangements, and stripping of journal-def.h inclusion.
* virt: rework kvm with hyperv enlightenment checks a bitLennart Poettering2022-04-041-0/+1
| | | | | | | | | | | | | | Let's avoid extending the virtualization with an "alias" entry that has the same string assigned as another. The only reason this was done was to make the patch small that added a second CPUID vendor string for kvm to the vm_table[] array. Let's instead rework the array to use struct elements that match up strings with ids. Given the array was previously mostly sparse this should be a general improvement. Fixes: #22950 Follow-up for: #22945
* Identify kvm + hv_passthrough as "kvm"Brett Holman2022-04-031-1/+0
|
* sd-device: add sd_device_get_action() + sd_device_get_seqnum() + ↵Lennart Poettering2021-02-181-1/+3
| | | | | | | | | | | | | | | | sd_device_new_from_stat_rdev() To make sd-device properly usable for all programs we need to provide an API for the "action" field of an event, it's one of the most relevant ones, and it was so far missing. This also adds sd_device_get_seqnum(), which isn't that interesting, except for generating pretty debug output, which we use it ourselves for. This also makes device_new_from_stat_rdev() public, as it is truly useful, as we can see in our own uses of it, and I think is fairly generic to show up in the public APIs.
* cgroup-util: add ManagedOOMPreference enum to use between pid1 and oomdAnita Zhang2021-02-091-0/+1
|
* shared: rename machine-image.[ch] → discover-image.[ch]Lennart Poettering2021-02-031-1/+1
| | | | | | | | | | The old name originates when this was used to discover "machine" images, as managed by machined/machinectl. But nowadays this is also used by portable services and system extensions, hence let's use a more generic name for this API. Taking inspiration from "dissect-image.[ch]", let's call this "discover-image.[ch]". This is pure renaming, no other changes.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* core: add ManagedOOM*= properties to configure systemd-oomd on the unitAnita Zhang2020-10-071-0/+2
| | | | | This adds the hook ups so it can be read with the usual systemd utilities. Used in later commits by sytemd-oomd.
* udev/link-config: rename MACPolicy to MACAddressPolicyZbigniew Jędrzejewski-Szmek2019-03-221-1/+1
| | | | | Things are clearer if the same name is used everywhere, and we don't gain much by saving a few bytes.
* sd-device: move device_action_from_string() and friends to device-private.hYu Watanabe2019-03-071-1/+1
|
* Merge pull request #9685 from yuwata/fix-9663Lennart Poettering2018-07-231-0/+2
|\ | | | | core: serialize and deserialize current ShowStatus
| * test: add a table test for ShowStatusYu Watanabe2018-07-231-0/+2
| |
* | test: add more string-table tests in test-tablesYu Watanabe2018-07-241-0/+4
|/
* Drop my copyright headersZbigniew Jędrzejewski-Szmek2018-06-141-3/+0
| | | | | | | perl -i -0pe 's/\s*Copyright © .... Zbigniew Jędrzejewski.*?\n/\n/gms' man/*xml git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/(#\n)?# +Copyright © [0-9, -]+ Zbigniew Jędrzejewski.*?\n//gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s*\/\*\*\*\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*?\s*\*\*\*\/\s*/\n\n/gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*//gms'
* tree-wide: beautify remaining copyright statementsLennart Poettering2018-06-141-1/+1
| | | | | | Let's unify an beautify our remaining copyright statements, with a unicode ©. This means our copyright statements are now always formatted the same way. Yay.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* test-tables,test-network-tables: add a few more testsZbigniew Jędrzejewski-Szmek2018-05-281-0/+18
|
* test-tables*: sortZbigniew Jędrzejewski-Szmek2018-05-281-4/+4
|
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
| | | | | This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
* Drop busname unit typeZbigniew Jędrzejewski-Szmek2017-07-231-4/+0
| | | | | | | Since busname units are only useful with kdbus, they weren't actively used. This was dead code, only compile-tested. If busname units are ever added back, it'll be cleaner to start from scratch (possibly reverting parts of this patch).
* Merge pull request #4442 from keszybz/detect-virt-usernsEvgeny Vereshchagin2016-10-271-0/+2
|\ | | | | detect-virt: add --private-users switch to check if a userns is active; add Condition=private-users
| * test-tables: test ConditionVirtualizationZbigniew Jędrzejewski-Szmek2016-10-261-0/+2
| |
* | failure-action: generalize failure action to emergency actionLukas Nykryn2016-10-211-1/+1
|/
* remove bus-proxydDaniel Mack2016-02-121-3/+0
| | | | | | | | | | As kdbus won't land in the anticipated way, the bus-proxy is not needed in its current form. It can be resurrected at any time thanks to the history, but for now, let's remove it from the sources. If we'll have a similar tool in the future, it will look quite differently anyway. Note that stdio-bridge is still available. It was restored from a version prior to f252ff17, and refactored to make use of the current APIs.
* tree-wide: sort includesThomas Hindoe Paaboel Andersen2015-11-161-3/+2
| | | | Sort the includes accoding to the new coding style.
* Remove snapshot unit typeZbigniew Jędrzejewski-Szmek2015-11-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Snapshots were never useful or used for anything. Many systemd developers that I spoke to at systemd.conf2015, didn't even know they existed, so it is fairly safe to assume that this type can be deleted without harm. The fundamental problem with snapshots is that the state of the system is dynamic, devices come and go, users log in and out, timers fire... and restoring all units to some state from the past would "undo" those changes, which isn't really possible. Tested by creating a snapshot, running the new binary, and checking that the transition did not cause errors, and the snapshot is gone, and snapshots cannot be created anymore. New systemctl says: Unknown operation snapshot. Old systemctl says: Failed to create snapshot: Support for snapshots has been removed. IgnoreOnSnaphost settings are warned about and ignored: Support for option IgnoreOnSnapshot= has been removed and it is ignored http://lists.freedesktop.org/archives/systemd-devel/2015-November/034872.html
* util-lib: split out resource limits related calls into rlimit-util.[ch]Lennart Poettering2015-10-271-6/+7
|
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-231-2/+0
| | | | | | This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
* core: rearrange code so that libsystemd/sd-bus/ does not include header ↵Lennart Poettering2014-12-231-1/+2
| | | | | | | files from core Stuff in src/shared or src/libsystemd should *never* include code from src/core or any of the tools, so don't do that here either. It's not OK!
* shared: rename condition-util.[ch] to condition.[ch]Lennart Poettering2014-11-061-1/+1
| | | | | Now that we only have one file with condition implementations around, we can drop the -util suffix and simplify things a bit.
* core: get rid of condition.c and move the remaining call into util.cLennart Poettering2014-11-061-1/+1
| | | | | | | That way only one file with condition code remaining, in src/shared/, rather than src/core/. Next step: dropping the "-util" suffix from condition-util.[ch].
* core: introduce the concept of AssertXYZ= similar to ConditionXYZ=, but ↵Lennart Poettering2014-11-061-0/+2
| | | | fatal for a start job if not met
* tests: add missing entry for LocalVariable to test-tablesRonny Chevalier2014-10-311-0/+2
|
* bus: factor out bus policy itemsDaniel Mack2014-09-081-1/+1
| | | | | In order to re-use the policy definitions, factor them out into their own files.
* core: add support for a configurable system-wide start-up timeoutLennart Poettering2014-08-221-1/+1
| | | | | | | | | | | | | | | | | | | When this system-wide start-up timeout is hit we execute one of the failure actions already implemented for services that fail. This should not only be useful on embedded devices, but also on laptops which have the power-button reachable when the lid is closed. This devices, when in a backpack might get powered on by accident due to the easily reachable power button. We want to make sure that the system turns itself off if it starts up due this after a while. When the system manages to fully start-up logind will suspend the machine by default if the lid is closed. However, in some cases we don't even get as far as logind, and the boot hangs much earlier, for example because we ask for a LUKS password that nobody ever enters. Yeah, this is a real-life problem on my Yoga 13, which has one of those easily accessible power buttons, even if the device is closed.
* tests: add missing entry to test-tablesRonny Chevalier2014-08-181-0/+1
|
* core: remove systemd_running_as lookup functionsZbigniew Jędrzejewski-Szmek2014-07-191-1/+0
| | | | They are unused and unlikely to ever be.
* test-tables: add new entriesZbigniew Jędrzejewski-Szmek2014-07-161-1/+22
| | | | | | One missing string found. A few things had to be moved around to make it possible to test them.
* service: rename StartLimitAction enum to FailureActionMichael Olbrich2014-04-241-1/+1
| | | | It's used for the FailureAction property as well.
* syscallfilter: port to libseccompRonny Chevalier2014-02-121-3/+0
|
* test-tables: allow sparse tables and check mapping for -1Zbigniew Jędrzejewski-Szmek2013-07-161-1/+1
| | | | | | | Jan: test-tables fails on my system. The one it's failing on is: syscall: 222 → (null) → -1 ... and indeed, our own tables should not have holes, but syscall tables certainly might.
* test: add trivial test for syscall table and extend table tests to error pathsZbigniew Jędrzejewski-Szmek2013-07-131-0/+3
|
* tests: add tests for string lookup tablesZbigniew Jędrzejewski-Szmek2013-07-051-0/+102
The tests check if the tables have entries for all values in the enum, and that the entries are unique.