Skip to contentSkip to conversation

Add ltp pivot_root test

PATCH New Paul Lawrence 2 participants 2 messages Mar 19, 2019 – Mar 20, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add ltp pivot_root test

---
 runtest/syscalls                              |   2 +
 testcases/kernel/syscalls/pivot_root/Makefile |  11 +
 .../kernel/syscalls/pivot_root/pivot_root01.c | 193 ++++++++++++++++++
 3 files changed, 206 insertions(+)
 create mode 100644 testcases/kernel/syscalls/pivot_root/Makefile
 create mode 100644 testcases/kernel/syscalls/pivot_root/pivot_root01.c
runtest/syscalls +2 -0
index 668c87cd1..debda74b8 100644
@@ -835,6 +835,8 @@ pipe11 pipe11
 pipe2_01 pipe2_01
 pipe2_02 pipe2_02
 
+pivot_root01 pivot_root01
+
 poll01 poll01
 poll02 poll02
 
testcases/kernel/syscalls/pivot_root/Makefile new file +11 -0
new file mode 100644
index 000000000..6a3810270
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (c) 2019 Google, Inc.
+
+top_srcdir		?= ../../../..
+
+include $(top_srcdir)/include/mk/testcases.mk
+
+LDLIBS += $(CAP_LIBS)
+
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/syscalls/pivot_root/pivot_root01.c new file +193 -0

193 lines not on this page · raw message

Signature · 1 line
2.21.0.225.g810b269d1ac-goog
#1 lore raw

PATCH 1/1 Add ltp pivot_root test

Hi!
Pushed with minor changes, thanks.

* Added .gitignore for the pivot_root01 binary

* Changed tst_brk(TFAIL, ...) to tst_brk(TBROK, ...) (see https://github.com/linux-test-project/ltp/issues/462)

* Made use of TERRNO flag instead of strerror(), we avoid using strerror() since it produces localized sentencies instead of errno symbolic names. Instead we use either TERRNO or tst_strerrno() function.

Signature · 2 lines
Cyril Hrubis
[email protected]