mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 22:36:00 +00:00
test(proot): address benchmark review findings
This commit is contained in:
1 parent
ac8d97e098
commit
2c3c135b52
9 files changed
+44
-10
No files matched your search
@@ -0,0 +1,10 @@
|
||||
#ifndef DROIDDECK_BENCH_CHECKS_H
|
||||
#define DROIDDECK_BENCH_CHECKS_H
|
||||
|
||||
/* Benchmark assertions execute the operations being measured. */
|
||||
#ifdef NDEBUG
|
||||
#undef NDEBUG
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#endif
|
||||
@@ -3,7 +3,7 @@ static void interruption_hook(const long *);
|
||||
#define FP_SVC_TEST_HOOK interruption_hook
|
||||
#endif
|
||||
#include "../fastpath/fastpath.c"
|
||||
#include <assert.h>
|
||||
#include "checks.h"
|
||||
#include <sys/wait.h>
|
||||
#include <linux/futex.h>
|
||||
#include <signal.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "../fastpath/fastpath.c"
|
||||
#include <assert.h>
|
||||
#include "checks.h"
|
||||
#include <linux/filter.h>
|
||||
#include <linux/seccomp.h>
|
||||
#include <sys/prctl.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <assert.h>
|
||||
#include "checks.h"
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <assert.h>
|
||||
#include "checks.h"
|
||||
#include <dlfcn.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <assert.h>
|
||||
#include "checks.h"
|
||||
#include <dlfcn.h>
|
||||
#include <fcntl.h>
|
||||
#include <pthread.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <assert.h>
|
||||
#include "checks.h"
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@@ -59,8 +59,9 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
assert(fts_close(fts) == 0);
|
||||
printf("fts: %u files %u dirs %u links\n", files, dirs, links);
|
||||
char resolved[4096];
|
||||
assert(realpath(link, resolved) && !strcmp(resolved, path));
|
||||
char resolved[4096], canonical[4096];
|
||||
assert(realpath(path, canonical));
|
||||
assert(realpath(link, resolved) && !strcmp(resolved, canonical));
|
||||
struct passwd pw, *found;
|
||||
char buf[16384];
|
||||
r = getpwnam_r("root", &pw, buf, sizeof buf, &found);
|
||||
|
||||
Reference in new issue
Block a user