summaryrefslogtreecommitdiff
path: root/410user/progs/exec_basic.c
diff options
context:
space:
mode:
authorHanjie Wu <hanjiew@andrew.cmu.edu>2023-04-18 02:21:10 -0400
committerHanjie Wu <hanjiew@andrew.cmu.edu>2023-04-18 02:21:10 -0400
commitc71294cdd3581c3738d24ffd65414f8644a1094d (patch)
treec86245d50fad9eee4163dbba169bd1839edbf88f /410user/progs/exec_basic.c
initial commit
Diffstat (limited to '410user/progs/exec_basic.c')
-rw-r--r--410user/progs/exec_basic.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/410user/progs/exec_basic.c b/410user/progs/exec_basic.c
new file mode 100644
index 0000000..5cd2f6d
--- /dev/null
+++ b/410user/progs/exec_basic.c
@@ -0,0 +1,33 @@
+/** @file 410user/progs/exec_basic.c
+ * @author mpa
+ * @brief Tests basic functionality of exec()
+ * @public yes
+ * @for p3
+ * @covers exec
+ * @status done
+ */
+
+#include <syscall.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <simics.h>
+#include "410_tests.h"
+
+DEF_TEST_NAME("exec_basic:");
+
+int main()
+{
+
+ REPORT_LOCAL_INIT;
+
+ char *name = "exec_basic_helper";
+ char *args[] = {name, 0};
+
+ REPORT_START_CMPLT;
+
+ REPORT_ON_ERR(exec(name,args));
+
+ REPORT_END_FAIL;
+
+ exit(-1);
+}