paul@239 | 1 | -- vim:set ft=lua: |
paul@239 | 2 | |
paul@239 | 3 | local L4 = require("L4"); |
paul@239 | 4 | |
paul@239 | 5 | local l = L4.default_loader; |
paul@239 | 6 | |
paul@239 | 7 | local pipe_server = l:new_channel(); |
paul@239 | 8 | |
paul@239 | 9 | l:startv({ |
paul@239 | 10 | caps = { |
paul@239 | 11 | server = pipe_server:svr(), |
paul@239 | 12 | }, |
paul@239 | 13 | log = { "pipes", "r" }, |
paul@239 | 14 | }, |
paul@239 | 15 | "rom/dstest_pipe_server", "10"); |
paul@239 | 16 | |
paul@239 | 17 | local blocksvr = l:new_channel(); |
paul@239 | 18 | |
paul@239 | 19 | l:startv({ |
paul@239 | 20 | caps = { |
paul@239 | 21 | server = blocksvr:svr(), |
paul@239 | 22 | }, |
paul@239 | 23 | log = { "blocksvr", "r" }, |
paul@239 | 24 | }, |
paul@239 | 25 | "rom/dstest_block_server", "10"); |
paul@239 | 26 | |
paul@239 | 27 | local ext2svr = l:new_channel(); |
paul@239 | 28 | |
paul@239 | 29 | l:startv({ |
paul@239 | 30 | caps = { |
paul@239 | 31 | blocksvr = blocksvr, |
paul@239 | 32 | pipes = pipe_server, |
paul@239 | 33 | ext2svr = ext2svr:svr(), |
paul@239 | 34 | }, |
paul@239 | 35 | log = { "ext2svr", "y" }, |
paul@239 | 36 | }, |
paul@239 | 37 | "rom/dstest_ext2_server", "blocksvr", "rom/e2test.fs", "10", "ext2svr"); |
paul@239 | 38 | |
paul@239 | 39 | -- Obtain user filesystems with umask 0022 (18). |
paul@239 | 40 | |
paul@239 | 41 | local open_for_user = 6; |
paul@239 | 42 | local ext2svr_davidb = L4.cast(L4.Proto.Factory, ext2svr):create(open_for_user, 1001, 1001, 18); |
paul@239 | 43 | |
paul@239 | 44 | l:startv({ |
paul@239 | 45 | caps = { |
paul@239 | 46 | server = ext2svr_davidb, |
paul@239 | 47 | }, |
paul@239 | 48 | log = { "client", "g" }, |
paul@239 | 49 | }, |
paul@239 | 50 | -- program, directory |
paul@239 | 51 | "rom/dstest_file_access", "home/paulb/private", "home/paulb/public", "home/paulb/shared"); |