File: fstest4.lua

package info (click to toggle)
lua-ljsyscall 0.12-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,732 kB
  • sloc: ansic: 434; sh: 59; makefile: 3
file content (28 lines) | stat: -rw-r--r-- 566 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-- test tmpfs

local oldassert = assert
local function assert(cond, s)
  return oldassert(cond, tostring(s)) -- annoyingly, assert does not call tostring!
end

local helpers = require "syscall.helpers"

local R = require "syscall.rump.init".init("vfs", "fs.tmpfs")

print("init")

assert(R.mkdir("/tmp", "0700"))

print("mkdir")

local data = {ta_version = 1, ta_nodes_max=100, ta_size_max=1048576, ta_root_mode=helpers.octal("0700")}
assert(R.mount{dir="/tmp", type="tmpfs", data=data})

print("mount")

assert(R.chdir("/tmp"))

print("chdir")

assert(R.reboot())