Skip to contentSkip to conversation

syscalls/execveat02: Add new testcase

PATCH New Xiao Yang 2 participants 2 messages Oct 29, 2018 – Nov 20, 2018

lore
Share & tools
lore

Xiao Yang

author
#0 lore raw

PATCH 3/3 syscalls/execveat02: Add new testcase

From: Jinhui huang <[email protected]>

Check various errnos for execveat(2).

Note:
This patch is based on the following patch set:
http://lists.linux.it/pipermail/ltp/2018-September/009416.html
http://lists.linux.it/pipermail/ltp/2018-September/009417.html

---
 runtest/syscalls                                   |   1 +
 testcases/kernel/syscalls/execveat/.gitignore      |   2 +
 testcases/kernel/syscalls/execveat/execveat02.c    | 113 +++++++++++++++++++++
 .../kernel/syscalls/execveat/execveat_errno.c      |  19 ++++
 4 files changed, 135 insertions(+)
 create mode 100644 testcases/kernel/syscalls/execveat/execveat02.c
 create mode 100644 testcases/kernel/syscalls/execveat/execveat_errno.c
runtest/syscalls +1 -0
index 7004f64..d5b68e7 100644
@@ -149,6 +149,7 @@ execve04 execve04
 execve05 execve05 -i 5 -n 32
 execvp01 execvp01
 execveat01 execveat01
+execveat02 execveat02
 execveat03 execveat03
 
 exit01 exit01
testcases/kernel/syscalls/execveat/.gitignore +2 -0
index 4e0c786..5de1f68 100644
@@ -1,3 +1,5 @@
 /execveat01
+/execveat02
 /execveat03
 /execveat_child
+/execveat_errno
testcases/kernel/syscalls/execveat/execveat02.c new file +113 -0

113 lines not on this page · raw message

testcases/kernel/syscalls/execveat/execveat_errno.c new file +19 -0
new file mode 100644
index 0000000..df7b371
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
+ * Authors: Jinhui huang <[email protected]>
+ */
+
+/*
+ * execveat_errno.c
+ *  dummy program which is used by execveat02.c testcase.
+ */
+
+#define TST_NO_DEFAULT_MAIN
+#include "tst_test.h"
+
+int main(void)
+{
+	tst_reinit();
+	tst_res(TFAIL, "execveat() passes unexpectedly");
+	return 0;
+}
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 3/3 syscalls/execveat02: Add new testcase

Hi!
Pushed with similar change as for the execveat01 for the same reasons, thanks.

Signature · 2 lines
Cyril Hrubis
[email protected]