diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-06-04 15:16:02 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-06-04 15:28:52 +0200 |
commit | 0192864da7e9c5a89439809d518ae17b660b1dab (patch) | |
tree | e492e1ad2fb1fd8f8094ec2b7c3a33e9e44e318f /src/udev/test-udev-node.c | |
parent | shell-completion: udevadm: support --uuid option (diff) | |
download | systemd-0192864da7e9c5a89439809d518ae17b660b1dab.tar.xz systemd-0192864da7e9c5a89439809d518ae17b660b1dab.zip |
test: add a testcase that demonstrates a conflict of hashed filename
The commit e64943363a8dd8bd320c2b633478be8befd1af5c introduces hashed
path at the end of the filename. But we can easily generate the path
which conflicts another path. The issue will be fixed in later commit.
Diffstat (limited to 'src/udev/test-udev-node.c')
-rw-r--r-- | src/udev/test-udev-node.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/udev/test-udev-node.c b/src/udev/test-udev-node.c index fe3dd437d5..d2e2285089 100644 --- a/src/udev/test-udev-node.c +++ b/src/udev/test-udev-node.c @@ -33,6 +33,10 @@ static void test_udev_node_escape_path(void) { strcpy(b + sizeof(b) - 12, "N3YhcCqFeID"); test_udev_node_escape_path_one(a, b); + + strcpy(a + sizeof(a) - 12 - 9, "N3YhcCqFeID"); + + test_udev_node_escape_path_one(a, b); /* <-- Ouch. This will pass. Needs to be fixed. */ } int main(int argc, char *argv[]) { |