/systemd/src/libsystemd-network/ |
H A D | test-dhcp-server.c | 110 } _packed_ test = { local 130 assert_se(dhcp_server_handle_message(server, (DHCPMessage*)&test, sizeof(test)) == DHCP_OFFER); 132 test.end = 0; 134 assert_se(dhcp_server_handle_message(server, (DHCPMessage*)&test, sizeof(test)) == DHCP_OFFER); 135 test.end = SD_DHCP_OPTION_END; 136 assert_se(dhcp_server_handle_message(server, (DHCPMessage*)&test, sizeof(test)) == DHCP_OFFER); 138 test [all...] |
/systemd/src/test/ |
H A D | test-execute.c | 33 #include "test-helper.h" 69 static void test(Manager *m, const char *unit_name, int status_expected, int code_expected) { function 80 assert_se(mkdir_p("/tmp/test-exec_workingdirectory", 0755) >= 0); 82 test(m, "exec-workingdirectory.service", 0, CLD_EXITED); 84 (void) rm_rf("/tmp/test-exec_workingdirectory", REMOVE_ROOT|REMOVE_PHYSICAL); 89 test(m, "exec-personality-x86-64.service", 0, CLD_EXITED); 92 test(m, "exec-personality-s390.service", 0, CLD_EXITED); 95 test(m, "exec-personality-x86.service", 0, CLD_EXITED); 100 test(m, "exec-ignoresigpipe-yes.service", 0, CLD_EXITED); 101 test( 289 test_function_t *test = NULL; local [all...] |
H A D | test-prioq.c | 74 struct test { struct 80 const struct test *x = a, *y = b; 92 const struct test *x = a; 117 struct test *t; 119 t = new0(struct test, 1); 133 struct test *t; 146 struct test *t;
|
H A D | test-path.c | 32 #include "test-helper.h" 49 printf("Skipping test: manager_new: %s\n", strerror(-r)); 58 p = strjoin("/tmp/test-path_", *test_path, NULL); 122 const char *test_path = "/tmp/test-path_exists"; 136 const char *test_path = "/tmp/test-path_existsglobFOOBAR"; 149 const char *test_path = "/tmp/test-path_changed"; 169 const char *test_path = "/tmp/test-path_modified"; 181 fputs("test", f); 187 const char *test_path = "/tmp/test-path_unit"; 201 const char *test_path = "/tmp/test 256 test_function_t *test = NULL; local [all...] |
H A D | test-path-util.c | 105 assert_se(endswith(p, "/test-path-util")); 209 #define test(from_dir, to_path, expected) { \ macro 215 test("/", "/", "."); 216 test("/", "/some/path", "some/path"); 217 test("/some/path", "/some/path", "."); 218 test("/some/path", "/some/path/in/subdir", "in/subdir"); 219 test("/some/path", "/", "../.."); 220 test("/some/path", "/some/other/path", "../other/path"); 221 test("//extra/////slashes///won't////fool///anybody//", "////extra///slashes////are/just///fine///", "../../../are/just/fine"); 225 char tmp_dir[] = "/tmp/test [all...] |
H A D | test-json.c | 77 static void test_file(const char *data, Test test) { argument 86 if (test) 87 test(v);
|
H A D | test-util.c | 177 /* test multiple evaluation */ 184 /* overflow test with exact division */ 192 /* overflow test with rounded division */ 216 char name0[] = "/tmp/test-close-many.XXXXXX"; 217 char name1[] = "/tmp/test-close-many.XXXXXX"; 218 char name2[] = "/tmp/test-close-many.XXXXXX"; 667 const char test[] = "test abc d\te f "; local 669 "test", 678 FOREACH_WORD(word, l, test, stat 682 check(const char *test, char** expected, bool trailing) argument [all...] |
/systemd/src/udev/ |
H A D | udev-builtin-blkid.c | 39 static void print_property(struct udev_device *dev, bool test, const char *name, const char *value) { argument 45 udev_builtin_add_property(dev, test, "ID_FS_TYPE", value); 48 udev_builtin_add_property(dev, test, "ID_FS_USAGE", value); 51 udev_builtin_add_property(dev, test, "ID_FS_VERSION", value); 55 udev_builtin_add_property(dev, test, "ID_FS_UUID", s); 57 udev_builtin_add_property(dev, test, "ID_FS_UUID_ENC", s); 61 udev_builtin_add_property(dev, test, "ID_FS_UUID_SUB", s); 63 udev_builtin_add_property(dev, test, "ID_FS_UUID_SUB_ENC", s); 67 udev_builtin_add_property(dev, test, "ID_FS_LABEL", s); 69 udev_builtin_add_property(dev, test, "ID_FS_LABEL_EN 107 find_gpt_root(struct udev_device *dev, blkid_probe pr, bool test) argument 223 builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool test) argument [all...] |
H A D | udev-builtin-input_id.c | 52 static void extract_info(struct udev_device *dev, const char *devpath, bool test) { argument 71 udev_builtin_add_property(dev, test, "ID_INPUT_WIDTH_MM", width); 72 udev_builtin_add_property(dev, test, "ID_INPUT_HEIGHT_MM", height); 84 bool test) { 115 if (test) { 139 bool test) { 168 udev_builtin_add_property(dev, test, "ID_INPUT_ACCELEROMETER", "1"); 220 udev_builtin_add_property(dev, test, "ID_INPUT_POINTINGSTICK", "1"); 222 udev_builtin_add_property(dev, test, "ID_INPUT_MOUSE", "1"); 224 udev_builtin_add_property(dev, test, "ID_INPUT_TOUCHPA 81 get_cap_mask(struct udev_device *dev, struct udev_device *pdev, const char* attr, unsigned long *bitmask, size_t bitmask_size, bool test) argument 133 test_pointers(struct udev_device *dev, const unsigned long* bitmask_ev, const unsigned long* bitmask_abs, const unsigned long* bitmask_key, const unsigned long* bitmask_rel, const unsigned long* bitmask_props, bool test) argument 236 test_key(struct udev_device *dev, const unsigned long* bitmask_ev, const unsigned long* bitmask_key, bool test) argument 284 builtin_input_id(struct udev_device *dev, int argc, char *argv[], bool test) argument [all...] |
H A D | udev-builtin-net_setup_link.c | 27 static int builtin_net_setup_link(struct udev_device *dev, int argc, char **argv, bool test) { argument 40 udev_builtin_add_property(dev, test, "ID_NET_DRIVER", driver); 59 udev_builtin_add_property(dev, test, "ID_NET_LINK_FILE", link->filename); 62 udev_builtin_add_property(dev, test, "ID_NET_NAME", name);
|
H A D | udev-builtin-btrfs.c | 33 static int builtin_btrfs(struct udev_device *dev, int argc, char *argv[], bool test) { argument 50 udev_builtin_add_property(dev, test, "ID_BTRFS_READY", one_zero(err == 0));
|
H A D | udev-builtin-usb_id.c | 234 static int builtin_usb_id(struct udev_device *dev, int argc, char *argv[], bool test) { argument 444 udev_builtin_add_property(dev, test, "ID_VENDOR", vendor_str); 445 udev_builtin_add_property(dev, test, "ID_VENDOR_ENC", vendor_str_enc); 446 udev_builtin_add_property(dev, test, "ID_VENDOR_ID", vendor_id); 447 udev_builtin_add_property(dev, test, "ID_MODEL", model_str); 448 udev_builtin_add_property(dev, test, "ID_MODEL_ENC", model_str_enc); 449 udev_builtin_add_property(dev, test, "ID_MODEL_ID", product_id); 450 udev_builtin_add_property(dev, test, "ID_REVISION", revision_str); 451 udev_builtin_add_property(dev, test, "ID_SERIAL", serial); 453 udev_builtin_add_property(dev, test, "ID_SERIAL_SHOR [all...] |
H A D | udev-builtin-hwdb.c | 37 const char *filter, bool test) { 56 if (udev_builtin_add_property(dev, test, key, value) < 0) 85 const char *filter, bool test) { 122 r = udev_builtin_hwdb_lookup(dev, prefix, modalias, filter, test); 130 static int builtin_hwdb(struct udev_device *dev, int argc, char *argv[], bool test) { argument 175 if (udev_builtin_hwdb_lookup(dev, prefix, argv[optind], filter, test) > 0) 187 if (udev_builtin_hwdb_search(dev, srcdev, subsystem, prefix, filter, test) > 0) 35 udev_builtin_hwdb_lookup(struct udev_device *dev, const char *prefix, const char *modalias, const char *filter, bool test) argument 83 udev_builtin_hwdb_search(struct udev_device *dev, struct udev_device *srcdev, const char *subsystem, const char *prefix, const char *filter, bool test) argument
|
H A D | udev-builtin.c | 121 int udev_builtin_run(struct udev_device *dev, enum udev_builtin_cmd cmd, const char *command, bool test) { argument 133 return builtins[cmd]->cmd(dev, argc, argv, test); 136 int udev_builtin_add_property(struct udev_device *dev, bool test, const char *key, const char *val) { argument 139 if (test)
|
H A D | udev-builtin-net_id.c | 479 static int ieee_oui(struct udev_device *dev, struct netnames *names, bool test) { argument 490 udev_builtin_hwdb_lookup(dev, NULL, str, NULL, test); 494 static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool test) { argument 544 udev_builtin_add_property(dev, test, "ID_NET_NAME_MAC", str); 546 ieee_oui(dev, &names, test); 555 udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str); 570 udev_builtin_add_property(dev, test, "ID_NET_NAME_ONBOARD", str); 574 udev_builtin_add_property(dev, test, "ID_NET_LABEL_ONBOARD", str); 578 udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str); 582 udev_builtin_add_property(dev, test, "ID_NET_NAME_SLO [all...] |
H A D | udev-builtin-uaccess.c | 32 static int builtin_uaccess(struct udev_device *dev, int argc, char *argv[], bool test) { argument
|
H A D | udev.h | 167 int (*cmd)(struct udev_device *dev, int argc, char *argv[], bool test); 194 int udev_builtin_run(struct udev_device *dev, enum udev_builtin_cmd cmd, const char *command, bool test); 197 int udev_builtin_add_property(struct udev_device *dev, bool test, const char *key, const char *val); 199 const char *filter, bool test);
|
H A D | udev-builtin-kmod.c | 66 static int builtin_kmod(struct udev_device *dev, int argc, char *argv[], bool test) { argument
|
H A D | udevadm-hwdb.c | 547 " -t,--test=MODALIAS query database and print result\n" 560 { "test", required_argument, NULL, 't' }, 565 const char *test = NULL; local 582 test = optarg; 596 if (!update && !test) { 597 log_error("Either --update or --test must be used"); 667 if (test) { 675 SD_HWDB_FOREACH_PROPERTY(hwdb, test, key, value)
|
H A D | udev-builtin-path_id.c | 616 static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool test) { argument 748 udev_builtin_add_property(dev, test, "ID_PATH", path); 749 udev_builtin_add_property(dev, test, "ID_PATH_TAG", tag);
|
H A D | udev-builtin-keyboard.c | 195 static int builtin_keyboard(struct udev_device *dev, int argc, char *argv[], bool test) { argument
|
/systemd/src/journal/ |
H A D | test-journal-verify.c | 91 assert_se(journal_file_open("test.journal", O_RDWR|O_CREAT, 0666, true, !!verification_key, NULL, NULL, NULL, &f) == 0); 96 char *test; local 100 assert_se(asprintf(&test, "RANDOM=%lu", random() % RANDOM_RANGE)); 102 iovec.iov_base = (void*) test; 103 iovec.iov_len = strlen(test); 107 free(test); 114 assert_se(journal_file_open("test.journal", O_RDONLY, 0666, true, !!verification_key, NULL, NULL, NULL, &f) == 0); 131 assert_se(stat("test.journal", &st) >= 0); 134 bit_toggle("test.journal", p); 138 if (raw_verify("test [all...] |
H A D | test-journal.c | 35 static const char test[] = "TEST1=1", test2[] = "TEST2=2"; local 45 assert_se(journal_file_open("test.journal", O_RDWR|O_CREAT, 0666, true, true, NULL, NULL, NULL, &f) == 0); 49 iovec.iov_base = (void*) test; 50 iovec.iov_len = strlen(test); 57 iovec.iov_base = (void*) test; 58 iovec.iov_len = strlen(test); 80 assert_se(journal_file_find_data_object(f, test, strlen(test), NULL, &p) == 1); 134 assert_se(journal_file_open("test.journal", O_RDWR|O_CREAT, 0666, false, false, NULL, NULL, NULL, &f1) == 0); 136 assert_se(journal_file_open("test [all...] |
/systemd/test/ |
H A D | udev-test.pl | 3 # udev test 6 # The whole test is self contained in this file, except the matching sysfs tree. 7 # Simply extend the @tests array, to add a new test variant. 9 # Every test is driven by its own temporary config file. 23 my $udev_bin = "./test-udev"; 28 my $udev_dev = "test/dev"; 29 my $udev_run = "test/run"; 31 my $udev_rules = "$udev_rules_dir/udev-test.rules"; 45 desc => "label test of scsi disc", 54 desc => "label test o [all...] |