summaryrefslogtreecommitdiff
path: root/test/hwdb-test.sh
Commit message (Collapse)AuthorAgeFilesLines
* Rename udev's hwdb/ to hwdb.d/Zbigniew Jędrzejewski-Szmek2019-10-101-2/+2
| | | | | As in the parent commit, this makes the name consistent with the rest of the source tree and the actuall installation path.
* 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.
* test: set log_level to info in test-hwdb and check-help-*Yu Watanabe2017-11-261-0/+1
| | | | | | | | | | These tests check the stderr. So, if the systemd.log_level=debug is set in the kernel command line, then these tests fail. This set log_level to info in hwdb-test.sh and meson-check-help.sh, the kernel command line not to change the output of the target programs. Fixes #7362.
* Add SPDX license headers to various assorted filesZbigniew Jędrzejewski-Szmek2017-11-191-2/+4
|
* meson: hook up hwdb-test.sh againZbigniew Jędrzejewski-Szmek2017-09-261-1/+1
| | | | | The motivation for the ./systemd-hwdb is the same as in the grandparent for systemd-sysv-generator.
* hwdb: improve and test syntax error messagesZbigniew Jędrzejewski-Szmek2016-12-011-0/+23
| | | | | | | | | | | | | | | | | | | Since syntax error are non-fatal, downgrade them to warnings. Use log_syntax to have uniform formatting including the line number. State machine states like DATA and MATCH are internal, user-facing messages should use the names from hwdb(7): match, property, record. Also change "key/value" to "key-value", since there's no alternative here, both parts must be present. [/tmp/tmp.KFwEhm74n4/etc/udev/hwdb.d/10-bad.hwdb:2] Property expected, ignoring record with no properties [/tmp/tmp.KFwEhm74n4/etc/udev/hwdb.d/10-bad.hwdb:5] Property expected, ignoring record with no properties [/tmp/tmp.KFwEhm74n4/etc/udev/hwdb.d/10-bad.hwdb:9] Property expected, ignoring record with no properties [/tmp/tmp.KFwEhm74n4/etc/udev/hwdb.d/10-bad.hwdb:11] Key/value pair expected but got " NO_VALUE", ignoring [/tmp/tmp.KFwEhm74n4/etc/udev/hwdb.d/10-bad.hwdb:18] Property or empty line expected, got "BAD:7:match at wrong place", ignoring record [/tmp/tmp.KFwEhm74n4/etc/udev/hwdb.d/10-bad.hwdb:22] Property or empty line expected, got "BAD:8:match at wrong place", ignoring record [/tmp/tmp.KFwEhm74n4/etc/udev/hwdb.d/10-bad.hwdb:23] Match expected but got indented property " Z=z", ignoring line squash! hwdb: improve syntax error messages
* hwdb-test: properly print error output from systemd-hwdb updateZbigniew Jędrzejewski-Szmek2016-12-011-2/+8
| | | | | | | | | | Because -e was set, we'd exit immediately when systemd-hwdb failed and the captured error output was never printed. We want to test two things: that 0 is returned, and that nothing is printed to stderr (to catch syntax errors in the hwdb). v2: stop capturing stderr to a variable v3: capture stderr to a variable and test both error types separately
* tests: add hwdb parsing testMartin Pitt2016-11-241-0/+43
This calls the built "systemd-hwdb update" on the source tree's hwdb/ in a temporary directory and verifies that there are no error messages.