Given that we use ltp_syscall() to call getrandom(2) and already
have "GRND_RANDOM, GRND_NONBLOCK" defined in lapi/getrandom.h, indeed
we don't need to include '<linux/random.h>'. Also including
'<linux/random.h>'' will result in some compilation errors in older
linux distribution, for example, in RHEL5.11GA, there will be such
errors:
  In file included from getrandom01.c:29:
  /usr/include/linux/random.h:38: error: expected specifier-qualifier-list 
before ‘__u32’
  /usr/include/linux/random.h:42: error: expected specifier-qualifier-list 
before ‘__u32’
This patch will also fix these compilation errors.

Signed-off-by: Xiaoguang Wang <wangxg.f...@cn.fujitsu.com>
---
 testcases/kernel/syscalls/getrandom/getrandom01.c | 1 -
 testcases/kernel/syscalls/getrandom/getrandom02.c | 1 -
 testcases/kernel/syscalls/getrandom/getrandom03.c | 1 -
 testcases/kernel/syscalls/getrandom/getrandom04.c | 1 -
 4 files changed, 4 deletions(-)

diff --git a/testcases/kernel/syscalls/getrandom/getrandom01.c 
b/testcases/kernel/syscalls/getrandom/getrandom01.c
index 818372e..103748a 100644
--- a/testcases/kernel/syscalls/getrandom/getrandom01.c
+++ b/testcases/kernel/syscalls/getrandom/getrandom01.c
@@ -26,7 +26,6 @@
  *
  */
 
-#include <linux/random.h>
 #include "lapi/getrandom.h"
 #include "linux_syscall_numbers.h"
 #include "test.h"
diff --git a/testcases/kernel/syscalls/getrandom/getrandom02.c 
b/testcases/kernel/syscalls/getrandom/getrandom02.c
index 905917b..0ac8bd2 100644
--- a/testcases/kernel/syscalls/getrandom/getrandom02.c
+++ b/testcases/kernel/syscalls/getrandom/getrandom02.c
@@ -27,7 +27,6 @@
  *
  */
 
-#include <linux/random.h>
 #include "lapi/getrandom.h"
 #include "linux_syscall_numbers.h"
 #include "test.h"
diff --git a/testcases/kernel/syscalls/getrandom/getrandom03.c 
b/testcases/kernel/syscalls/getrandom/getrandom03.c
index 9c13d09..03950e0 100644
--- a/testcases/kernel/syscalls/getrandom/getrandom03.c
+++ b/testcases/kernel/syscalls/getrandom/getrandom03.c
@@ -30,7 +30,6 @@
  *  number of bytes required and expects success.
  */
 
-#include <linux/random.h>
 #include "lapi/getrandom.h"
 #include "linux_syscall_numbers.h"
 #include "test.h"
diff --git a/testcases/kernel/syscalls/getrandom/getrandom04.c 
b/testcases/kernel/syscalls/getrandom/getrandom04.c
index 4e099e1..10ab44b 100644
--- a/testcases/kernel/syscalls/getrandom/getrandom04.c
+++ b/testcases/kernel/syscalls/getrandom/getrandom04.c
@@ -30,7 +30,6 @@
  *  descriptors to 3 and expects success.
  */
 
-#include <linux/random.h>
 #include <sys/resource.h>
 #include "lapi/getrandom.h"
 #include "linux_syscall_numbers.h"
-- 
1.8.2.1


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to