From 03f65fe6a9cd32a5861b1a929cdf4f7eddbd593f Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 16 Aug 2007 12:45:31 +0200 Subject: [PATCH] accept relative path for TEST --- test/udev-test.pl | 28 ++++++++++++++++++++++++++++ udev_rules.c | 8 ++++++++ 2 files changed, 36 insertions(+) diff --git a/test/udev-test.pl b/test/udev-test.pl index 53499d88..fe1c6da4 100755 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -1568,6 +1568,34 @@ EOF exp_name => "00:e0:00:fb:04:e1", rules => < "TEST absolute path", + subsys => "block", + devpath => "/block/sda", + exp_name => "there", + rules => < "TEST subsys/kernel lookup", + subsys => "block", + devpath => "/block/sda", + exp_name => "yes", + rules => < "TEST relative path", + subsys => "block", + devpath => "/block/sda", + exp_name => "relative", + rules => <dev->devpath, sizeof(tmp)); + strlcat(tmp, "/", sizeof(tmp)); + strlcat(tmp, filename, sizeof(tmp)); + strlcpy(filename, tmp, sizeof(filename)); } match = (stat(filename, &statbuf) == 0); -- 2.39.5