App-OpenHAP
view release on metacpan or search on metacpan
t/openhap/integration/sandbox.t view on Meta::CPAN
# The unveil syscalls: the daemon really builds a view, and a final
# unveil(2) with both arguments NULL locks it. The permission
# strings appear as STRU flags= records. db_path's rwc is unique to
# unveil. A NAMI is not, because any open(2) also leaves one.
my @unveils = $kdump =~ /CALL\s+unveil\(([^)]*)\)/g;
cmp_ok(scalar @unveils, '>=', 3,
'unveil(2) called for the inventory');
like($kdump, qr/STRU\s+flags="rwc"/,
'the state directory is unveiled read-write-create');
like($kdump, qr/CALL\s+unveil\(0,0\)/, 'the view is locked');
is($unveils[-1], '0,0', 'the lock is the last unveil call');
# The inventory grants no execute permission anywhere. The promise
# set withholds exec, so a row that granted x would contradict the
# pledge in the same source file.
unlike($kdump, qr/STRU\s+flags="[^"]*x[^"]*"/,
'no unveil row grants execute permission');
# The library tree is read-only. The daemon loads Net::MQTT::Simple
# late, on the reconnect path, and must never write there.
( run in 2.832 seconds using v1.01-cache-2.11-cpan-800906f7e73 )