Squash commits for public release
This commit is contained in:
8
test/kernel/fs/procfs/BUILD.gn
Normal file
8
test/kernel/fs/procfs/BUILD.gn
Normal file
@@ -0,0 +1,8 @@
|
||||
import("//build/test/TEMPLATE.gni")
|
||||
|
||||
xOS_test("procfs") {
|
||||
test_bundle = "kernel/fs/procfs"
|
||||
sources = [ "main.c" ]
|
||||
configs = [ "//build/userland:userland_flags" ]
|
||||
deplibs = [ "libc" ]
|
||||
}
|
||||
21
test/kernel/fs/procfs/main.c
Normal file
21
test/kernel/fs/procfs/main.c
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int fd = 0;
|
||||
fd = open("/proc/stat", O_RDWR);
|
||||
if (fd > 0) {
|
||||
TestErr("Opened /proc/stat for write");
|
||||
}
|
||||
|
||||
fd = open("/proc/stat", O_RDONLY);
|
||||
if (fd <= 0) {
|
||||
TestErr("Can't open /proc/stat for read");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user