d8c9d3a468e61ee2a2b2c3454e662398b0885411Zbigniew Jędrzejewski-Szmek This file is part of systemd.
d8c9d3a468e61ee2a2b2c3454e662398b0885411Zbigniew Jędrzejewski-Szmek Copyright 2013 Zbigniew Jędrzejewski-Szmek
d8c9d3a468e61ee2a2b2c3454e662398b0885411Zbigniew Jędrzejewski-Szmek systemd is free software; you can redistribute it and/or modify it
d8c9d3a468e61ee2a2b2c3454e662398b0885411Zbigniew Jędrzejewski-Szmek under the terms of the GNU Lesser General Public License as published by
d8c9d3a468e61ee2a2b2c3454e662398b0885411Zbigniew Jędrzejewski-Szmek the Free Software Foundation; either version 2.1 of the License, or
d8c9d3a468e61ee2a2b2c3454e662398b0885411Zbigniew Jędrzejewski-Szmek (at your option) any later version.
d8c9d3a468e61ee2a2b2c3454e662398b0885411Zbigniew Jędrzejewski-Szmek systemd is distributed in the hope that it will be useful, but
d8c9d3a468e61ee2a2b2c3454e662398b0885411Zbigniew Jędrzejewski-Szmek WITHOUT ANY WARRANTY; without even the implied warranty of
d8c9d3a468e61ee2a2b2c3454e662398b0885411Zbigniew Jędrzejewski-Szmek MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d8c9d3a468e61ee2a2b2c3454e662398b0885411Zbigniew Jędrzejewski-Szmek Lesser General Public License for more details.
d8c9d3a468e61ee2a2b2c3454e662398b0885411Zbigniew Jędrzejewski-Szmek You should have received a copy of the GNU Lesser General Public License
d8c9d3a468e61ee2a2b2c3454e662398b0885411Zbigniew Jędrzejewski-Szmek along with systemd; If not, see <http://www.gnu.org/licenses/>.
d8c9d3a468e61ee2a2b2c3454e662398b0885411Zbigniew Jędrzejewski-Szmekstatic void test_tmpdir(const char *id, const char *A, const char *B) {
613b411c947635136637f8cdd66b94512f761eabLennart Poettering assert_se(setup_tmp_dirs(id, &a, &b) == 0);
3d94f76c99da13e5603831d0b278f8c8c21bcb02Lennart Poettering _cleanup_close_pair_ int s[2] = { -1, -1 };
613b411c947635136637f8cdd66b94512f761eabLennart Poettering assert_se(socketpair(AF_UNIX, SOCK_DGRAM, 0, s) >= 0);
d8c9d3a468e61ee2a2b2c3454e662398b0885411Zbigniew Jędrzejewski-Szmekint main(int argc, char *argv[]) {
6b46ea73e3b1d8a1e65f58ac04772821bd4a72fbLennart Poettering _cleanup_free_ char *x = NULL, *y = NULL, *z = NULL, *zz = NULL;
6b46ea73e3b1d8a1e65f58ac04772821bd4a72fbLennart Poettering x = strjoin("/tmp/systemd-private-", boot_id, "-abcd.service-", NULL);
6b46ea73e3b1d8a1e65f58ac04772821bd4a72fbLennart Poettering y = strjoin("/var/tmp/systemd-private-", boot_id, "-abcd.service-", NULL);
6b46ea73e3b1d8a1e65f58ac04772821bd4a72fbLennart Poettering z = strjoin("/tmp/systemd-private-", boot_id, "-sys-devices-pci0000:00-0000:00:1a.0-usb3-3\\x2d1-3\\x2d1:1.0-bluetooth-hci0.device-", NULL);
6b46ea73e3b1d8a1e65f58ac04772821bd4a72fbLennart Poettering zz = strjoin("/var/tmp/systemd-private-", boot_id, "-sys-devices-pci0000:00-0000:00:1a.0-usb3-3\\x2d1-3\\x2d1:1.0-bluetooth-hci0.device-", NULL);
6b46ea73e3b1d8a1e65f58ac04772821bd4a72fbLennart Poettering test_tmpdir("sys-devices-pci0000:00-0000:00:1a.0-usb3-3\\x2d1-3\\x2d1:1.0-bluetooth-hci0.device", z, zz);