Skip to contentSkip to conversation

ltp: test id usually same as test filename without suffix

PATCH New Li Wang 2 participants 2 messages Mar 13, 2017

lore
Share & tools
lore

Li Wang

author
#0 lore raw

PATCH 1/1 ltp: test id usually same as test filename without suffix

Perform this script under ltp root dir.

 $ cat fix_tid.sh
 #!/bin/bash

for file in find -name *.c; do
value=$(echo $(basename ${file%%.c})); sed -i "/\.tid/s/\".*\"/\"$value\"/g" $file
done

---
 lib/newlib_tests/test03.c                         | 2 +-
 testcases/kernel/syscalls/add_key/add_key02.c     | 2 +-
 testcases/kernel/syscalls/ioctl/ioctl06.c         | 2 +-
 testcases/kernel/syscalls/mq_unlink/mq_unlink01.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
lib/newlib_tests/test03.c +1 -1
index c1983ad..d5772a8 100644
@@ -28,6 +28,6 @@ static void do_test(void)
 }
 
 static struct tst_test test = {
-	.tid = "test02",
+	.tid = "test03",
 	.test_all = do_test,
 };
testcases/kernel/syscalls/add_key/add_key02.c +1 -1
index e954575..fc99191 100644
@@ -69,7 +69,7 @@ static void verify_add_key(unsigned int i)
 }
 
 static struct tst_test test = {
-	.tid = "add_key01",
+	.tid = "add_key02",
 	.tcnt = ARRAY_SIZE(tcases),
 	.test = verify_add_key,
 };
testcases/kernel/syscalls/ioctl/ioctl06.c +1 -1
index 9046a3f..d05aa45 100644
@@ -63,7 +63,7 @@ static void cleanup(void)
 }
 
 static struct tst_test test = {
-	.tid = "ioctl07",
+	.tid = "ioctl06",
 	.needs_device = 1,
 	.setup = setup,
 	.cleanup = cleanup,
testcases/kernel/syscalls/mq_unlink/mq_unlink01.c +1 -1
index 03ce3f8..40f6db2 100644
@@ -124,7 +124,7 @@ EXIT:
 }
 
 static struct tst_test test = {
-	.tid = "mq_ulink01",
+	.tid = "mq_unlink01",
 	.tcnt = ARRAY_SIZE(tcase),
 	.test = do_test,
 	.needs_root = 1,
Signature · 1 line
2.9.3
#1 lore raw

PATCH 1/1 ltp: test id usually same as test filename without suffix

Hi!
Good catch, pushed, thanks.

Signature · 2 lines
Cyril Hrubis
[email protected]