[LTP] [PATCH 7/7] Delete depreacted input test suite helper
Cyril Hrubis
chrubis@suse.cz
Thu Nov 28 11:55:04 CET 2024
Hi!
> -static void check_ui_get_sysname_ioctl(int fd)
> -{
> - char sys_name[256];
> - char dev_name[256];
> - char *path;
> -
> - SAFE_IOCTL(NULL, fd, UI_GET_SYSNAME(sizeof(sys_name)), sys_name, NULL);
> - SAFE_ASPRINTF(NULL, &path, "/sys/devices/virtual/input/%s/name", sys_name);
> -
> - if (FILE_SCANF(path, "%s", dev_name)) {
> - tst_resm(TFAIL|TERRNO, "Failed to read '%s'", path);
> - free(path);
> - return;
> - }
> -
> - if (!strcmp(VIRTUAL_DEVICE, dev_name))
> - tst_resm(TPASS, "ioctl UI_GET_SYSNAME returned correct name");
> - else
> - tst_resm(TFAIL, "ioctl UI_GET_SYSNAME returned wrong name");
> -
> - free(path);
> -}
> -
> -void create_device(int fd)
> -{
> - int nb;
> - struct uinput_user_dev uidev = {
> - .name = VIRTUAL_DEVICE,
> - .id = {
> - .bustype = BUS_USB,
> - .vendor = 0x1,
> - .product = 0x1,
> - .version = 1,
> - }
> - };
> -
> - SAFE_WRITE(NULL, SAFE_WRITE_ALL, fd, &uidev, sizeof(uidev));
> - SAFE_IOCTL(NULL, fd, UI_DEV_CREATE, NULL);
> -
> - for (nb = 100; nb > 0; nb--) {
> - if (check_device()) {
> - check_ui_get_sysname_ioctl(fd);
This check is being removed without replacement. This was added in:
commit ccc8bc7b8104d932daf5d1131b0522250eaa14ce
Author: Wei Gao via ltp <ltp@lists.linux.it>
Date: Tue Oct 17 09:16:46 2023 -0400
testcases/input: Add test for UI_GET_NAME ioctl
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list