Advertisement
nareshkamboju

futex test pass from first ssh terminal after first reboot

Jun 13th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 45.88 KB | None | 0 0
  1. naresh@linaro:~$ ssh linaro@192.168.1.5
  2. hikey:~$ su
  3. hikey:/home/linaro# cd /usr/bin/kselftests/futex/functional/
  4. hikey:/usr/bin/kselftests/futex/functional# ./futex_requeue_pi
  5. futex_requeue_pi: Test requeue functionality
  6. Arguments: broadcast=0 locked=0 owner=0 timeout=0ns
  7. Result: PASS
  8. hikey:/usr/bin/kselftests/futex/functional# ulimit
  9. unlimited
  10. hikey:/usr/bin/kselftests/futex/functional# ulimit -a
  11. core file size (blocks, -c) unlimited
  12. data seg size (kbytes, -d) unlimited
  13. scheduling priority (-e) 0
  14. file size (blocks, -f) unlimited
  15. pending signals (-i) 7226
  16. max locked memory (kbytes, -l) 64
  17. max memory size (kbytes, -m) unlimited
  18. open files (-n) 1024
  19. pipe size (512 bytes, -p) 8
  20. POSIX message queues (bytes, -q) 819200
  21. real-time priority (-r) 0
  22. stack size (kbytes, -s) 8192
  23. cpu time (seconds, -t) unlimited
  24. max user processes (-u) 7226
  25. virtual memory (kbytes, -v) unlimited
  26. file locks (-x) unlimited
  27. hikey:/usr/bin/kselftests/futex/functional# cat /etc/se
  28. securetty security/ services
  29. hikey:/usr/bin/kselftests/futex/functional# cat /etc/secur
  30. securetty security/
  31. hikey:/usr/bin/kselftests/futex/functional# cat /etc/security/
  32. access.conf group.conf limits.conf limits.d/ namespace.conf namespace.d/ namespace.init pam_env.conf time.conf
  33. hikey:/usr/bin/kselftests/futex/functional# cat /etc/security/access.conf
  34. # Login access control table.
  35. #
  36. # Comment line must start with "#", no space at front.
  37. # Order of lines is important.
  38. #
  39. # When someone logs in, the table is scanned for the first entry that
  40. # matches the (user, host) combination, or, in case of non-networked
  41. # logins, the first entry that matches the (user, tty) combination. The
  42. # permissions field of that table entry determines whether the login will
  43. # be accepted or refused.
  44. #
  45. # Format of the login access control table is three fields separated by a
  46. # ":" character:
  47. #
  48. # [Note, if you supply a 'fieldsep=|' argument to the pam_access.so
  49. # module, you can change the field separation character to be
  50. # '|'. This is useful for configurations where you are trying to use
  51. # pam_access with X applications that provide PAM_TTY values that are
  52. # the display variable like "host:0".]
  53. #
  54. # permission : users : origins
  55. #
  56. # The first field should be a "+" (access granted) or "-" (access denied)
  57. # character.
  58. #
  59. # The second field should be a list of one or more login names, group
  60. # names, or ALL (always matches). A pattern of the form user@host is
  61. # matched when the login name matches the "user" part, and when the
  62. # "host" part matches the local machine name.
  63. #
  64. # The third field should be a list of one or more tty names (for
  65. # non-networked logins), host names, domain names (begin with "."), host
  66. # addresses, internet network numbers (end with "."), ALL (always
  67. # matches), NONE (matches no tty on non-networked logins) or
  68. # LOCAL (matches any string that does not contain a "." character).
  69. #
  70. # You can use @netgroupname in host or user patterns; this even works
  71. # for @usergroup@@hostgroup patterns.
  72. #
  73. # The EXCEPT operator makes it possible to write very compact rules.
  74. #
  75. # The group file is searched only when a name does not match that of the
  76. # logged-in user. Both the user's primary group is matched, as well as
  77. # groups in which users are explicitly listed.
  78. # To avoid problems with accounts, which have the same name as a group,
  79. # you can use brackets around group names '(group)' to differentiate.
  80. # In this case, you should also set the "nodefgroup" option.
  81. #
  82. # TTY NAMES: Must be in the form returned by ttyname(3) less the initial
  83. # "/dev" (e.g. tty1 or vc/1)
  84. #
  85. ##############################################################################
  86. #
  87. # Disallow non-root logins on tty1
  88. #
  89. #-:ALL EXCEPT root:tty1
  90. #
  91. # Disallow console logins to all but a few accounts.
  92. #
  93. #-:ALL EXCEPT wheel shutdown sync:LOCAL
  94. #
  95. # Same, but make sure that really the group wheel and not the user
  96. # wheel is used (use nodefgroup argument, too):
  97. #
  98. #-:ALL EXCEPT (wheel) shutdown sync:LOCAL
  99. #
  100. # Disallow non-local logins to privileged accounts (group wheel).
  101. #
  102. #-:wheel:ALL EXCEPT LOCAL .win.tue.nl
  103. #
  104. # Some accounts are not allowed to login from anywhere:
  105. #
  106. #-:wsbscaro wsbsecr wsbspac wsbsym wscosor wstaiwde:ALL
  107. #
  108. # All other accounts are allowed to login from anywhere.
  109. #
  110. ##############################################################################
  111. # All lines from here up to the end are building a more complex example.
  112. ##############################################################################
  113. #
  114. # User "root" should be allowed to get access via cron .. tty5 tty6.
  115. #+ : root : cron crond :0 tty1 tty2 tty3 tty4 tty5 tty6
  116. #
  117. # User "root" should be allowed to get access from hosts with ip addresses.
  118. #+ : root : 192.168.200.1 192.168.200.4 192.168.200.9
  119. #+ : root : 127.0.0.1
  120. #
  121. # User "root" should get access from network 192.168.201.
  122. # This term will be evaluated by string matching.
  123. # comment: It might be better to use network/netmask instead.
  124. # The same is 192.168.201.0/24 or 192.168.201.0/255.255.255.0
  125. #+ : root : 192.168.201.
  126. #
  127. # User "root" should be able to have access from domain.
  128. # Uses string matching also.
  129. #+ : root : .foo.bar.org
  130. #
  131. # User "root" should be denied to get access from all other sources.
  132. #- : root : ALL
  133. #
  134. # User "foo" and members of netgroup "nis_group" should be
  135. # allowed to get access from all sources.
  136. # This will only work if netgroup service is available.
  137. #+ : @nis_group foo : ALL
  138. #
  139. # User "john" should get access from ipv4 net/mask
  140. #+ : john : 127.0.0.0/24
  141. #
  142. # User "john" should get access from ipv4 as ipv6 net/mask
  143. #+ : john : ::ffff:127.0.0.0/127
  144. #
  145. # User "john" should get access from ipv6 host address
  146. #+ : john : 2001:4ca0:0:101::1
  147. #
  148. # User "john" should get access from ipv6 host address (same as above)
  149. #+ : john : 2001:4ca0:0:101:0:0:0:1
  150. #
  151. # User "john" should get access from ipv6 net/mask
  152. #+ : john : 2001:4ca0:0:101::/64
  153. #
  154. # All other users should be denied to get access from all sources.
  155. #- : ALL : ALL
  156. hikey:/usr/bin/kselftests/futex/functional# cat /etc/security/
  157. access.conf group.conf limits.conf limits.d/ namespace.conf namespace.d/ namespace.init pam_env.conf time.conf
  158. hikey:/usr/bin/kselftests/futex/functional# ls -l /etc/security/
  159. total 40
  160. -rw-r--r-- 1 root root 4620 May 19 06:52 access.conf
  161. -rw-r--r-- 1 root root 3635 May 19 06:52 group.conf
  162. -rw-r--r-- 1 root root 1835 May 19 06:52 limits.conf
  163. drwxr-xr-x 2 root root 4096 May 19 06:52 limits.d
  164. -rw-r--r-- 1 root root 1440 May 19 06:52 namespace.conf
  165. drwxr-xr-x 2 root root 4096 May 19 06:52 namespace.d
  166. -rwxr-xr-x 1 root root 1016 May 19 06:52 namespace.init
  167. -rw-r--r-- 1 root root 2972 May 19 06:52 pam_env.conf
  168. -rw-r--r-- 1 root root 2179 May 19 06:52 time.conf
  169. hikey:/usr/bin/kselftests/futex/functional# date
  170. Sat May 20 12:41:54 UTC 2017
  171. hikey:/usr/bin/kselftests/futex/functional# cat /etc/security/pam_env.conf
  172. #
  173. # This is the configuration file for pam_env, a PAM module to load in
  174. # a configurable list of environment variables for a
  175. #
  176. # The original idea for this came from Andrew G. Morgan ...
  177. #<quote>
  178. # Mmm. Perhaps you might like to write a pam_env module that reads a
  179. # default environment from a file? I can see that as REALLY
  180. # useful... Note it would be an "auth" module that returns PAM_IGNORE
  181. # for the auth part and sets the environment returning PAM_SUCCESS in
  182. # the setcred function...
  183. #</quote>
  184. #
  185. # What I wanted was the REMOTEHOST variable set, purely for selfish
  186. # reasons, and AGM didn't want it added to the SimpleApps login
  187. # program (which is where I added the patch). So, my first concern is
  188. # that variable, from there there are numerous others that might/would
  189. # be useful to be set: NNTPSERVER, LESS, PATH, PAGER, MANPAGER .....
  190. #
  191. # Of course, these are a different kind of variable than REMOTEHOST in
  192. # that they are things that are likely to be configured by
  193. # administrators rather than set by logging in, how to treat them both
  194. # in the same config file?
  195. #
  196. # Here is my idea:
  197. #
  198. # Each line starts with the variable name, there are then two possible
  199. # options for each variable DEFAULT and OVERRIDE.
  200. # DEFAULT allows and administrator to set the value of the
  201. # variable to some default value, if none is supplied then the empty
  202. # string is assumed. The OVERRIDE option tells pam_env that it should
  203. # enter in its value (overriding the default value) if there is one
  204. # to use. OVERRIDE is not used, "" is assumed and no override will be
  205. # done.
  206. #
  207. # VARIABLE [DEFAULT=[value]] [OVERRIDE=[value]]
  208. #
  209. # (Possibly non-existent) environment variables may be used in values
  210. # using the ${string} syntax and (possibly non-existent) PAM_ITEMs may
  211. # be used in values using the @{string} syntax. Both the $ and @
  212. # characters can be backslash escaped to be used as literal values
  213. # values can be delimited with "", escaped " not supported.
  214. # Note that many environment variables that you would like to use
  215. # may not be set by the time the module is called.
  216. # For example, HOME is used below several times, but
  217. # many PAM applications don't make it available by the time you need it.
  218. #
  219. #
  220. # First, some special variables
  221. #
  222. # Set the REMOTEHOST variable for any hosts that are remote, default
  223. # to "localhost" rather than not being set at all
  224. #REMOTEHOST DEFAULT=localhost OVERRIDE=@{PAM_RHOST}
  225. #
  226. # Set the DISPLAY variable if it seems reasonable
  227. #DISPLAY DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY}
  228. #
  229. #
  230. # Now some simple variables
  231. #
  232. #PAGER DEFAULT=less
  233. #MANPAGER DEFAULT=less
  234. #LESS DEFAULT="M q e h15 z23 b80"
  235. #NNTPSERVER DEFAULT=localhost
  236. #PATH DEFAULT=${HOME}/bin:/usr/local/bin:/bin\
  237. #:/usr/bin:/usr/local/bin/X11:/usr/bin/X11
  238. #
  239. # silly examples of escaped variables, just to show how they work.
  240. #
  241. #DOLLAR DEFAULT=\$
  242. #DOLLARDOLLAR DEFAULT= OVERRIDE=\$${DOLLAR}
  243. #DOLLARPLUS DEFAULT=\${REMOTEHOST}${REMOTEHOST}
  244. #ATSIGN DEFAULT="" OVERRIDE=\@
  245. hikey:/usr/bin/kselftests/futex/functional# cat /etc/security/limits.
  246. limits.conf limits.d/
  247. hikey:/usr/bin/kselftests/futex/functional# cat /etc/security/limits.conf
  248. # /etc/security/limits.conf
  249. #
  250. #Each line describes a limit for a user in the form:
  251. #
  252. #<domain> <type> <item> <value>
  253. #
  254. #Where:
  255. #<domain> can be:
  256. # - a user name
  257. # - a group name, with @group syntax
  258. # - the wildcard *, for default entry
  259. # - the wildcard %, can be also used with %group syntax,
  260. # for maxlogin limit
  261. #
  262. #<type> can have the two values:
  263. # - "soft" for enforcing the soft limits
  264. # - "hard" for enforcing hard limits
  265. #
  266. #<item> can be one of the following:
  267. # - core - limits the core file size (KB)
  268. # - data - max data size (KB)
  269. # - fsize - maximum filesize (KB)
  270. # - memlock - max locked-in-memory address space (KB)
  271. # - nofile - max number of open file descriptors
  272. # - rss - max resident set size (KB)
  273. # - stack - max stack size (KB)
  274. # - cpu - max CPU time (MIN)
  275. # - nproc - max number of processes
  276. # - as - address space limit (KB)
  277. # - maxlogins - max number of logins for this user
  278. # - maxsyslogins - max number of logins on the system
  279. # - priority - the priority to run user process with
  280. # - locks - max number of file locks the user can hold
  281. # - sigpending - max number of pending signals
  282. # - msgqueue - max memory used by POSIX message queues (bytes)
  283. # - nice - max nice priority allowed to raise to values: [-20, 19]
  284. # - rtprio - max realtime priority
  285. #
  286. #<domain> <type> <item> <value>
  287. #
  288.  
  289. #* soft core 0
  290. #* hard rss 10000
  291. #@student hard nproc 20
  292. #@faculty soft nproc 20
  293. #@faculty hard nproc 50
  294. #ftp hard nproc 0
  295. #@student - maxlogins 4
  296.  
  297. # End of file
  298. hikey:/usr/bin/kselftests/futex/functional# cat /etc/security/limits.
  299. limits.conf limits.d/
  300. hikey:/usr/bin/kselftests/futex/functional# ls /etc/security/limits.d/
  301. hikey:/usr/bin/kselftests/futex/functional# ls
  302. futex_requeue_pi futex_requeue_pi_signal_restart futex_wait_timeout futex_wait_wouldblock
  303. futex_requeue_pi_mismatched_ops futex_wait_private_mapped_file futex_wait_uninitialized_heap run.sh
  304. hikey:/usr/bin/kselftests/futex/functional# env
  305. XDG_SESSION_ID=c1
  306. SHELL=/bin/sh
  307. TERM=xterm-256color
  308. SSH_CLIENT=192.168.1.4 54148 22
  309. OLDPWD=/home/linaro
  310. SSH_TTY=/dev/pts/0
  311. USER=root
  312. PATH=/sbin:/bin:/usr/sbin:/usr/bin
  313. MAIL=/var/spool/mail/root
  314. PWD=/usr/bin/kselftests/futex/functional
  315. EDITOR=vi
  316. PS1=\h:\w\$
  317. HOME=/home/root
  318. SHLVL=2
  319. LOGNAME=root
  320. SSH_CONNECTION=192.168.1.4 54148 192.168.1.5 22
  321. XDG_RUNTIME_DIR=/run/user/1000
  322. _=/usr/bin/env
  323. hikey:/usr/bin/kselftests/futex/functional# ./futex_requeue_pi
  324. futex_requeue_pi: Test requeue functionality
  325. Arguments: broadcast=0 locked=0 owner=0 timeout=0ns
  326. Result: PASS
  327. hikey:/usr/bin/kselftests/futex/functional# id
  328. uid=0(root) gid=0(root) groups=0(root)
  329. hikey:/usr/bin/kselftests/futex/functional# id --help
  330. Usage: id [OPTION]... [USER]
  331. Print user and group information for the specified USER,
  332. or (when USER omitted) for the current user.
  333.  
  334. -a ignore, for compatibility with other versions
  335. -Z, --context print only the security context of the process
  336. -g, --group print only the effective group ID
  337. -G, --groups print all group IDs
  338. -n, --name print a name instead of a number, for -ugG
  339. -r, --real print the real ID instead of the effective ID, with -ugG
  340. -u, --user print only the effective user ID
  341. -z, --zero delimit entries with NUL characters, not whitespace;
  342. not permitted in default format
  343. --help display this help and exit
  344. --version output version information and exit
  345.  
  346. Without any OPTION, print some useful set of identified information.
  347.  
  348. GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
  349. Report id translation bugs to <http://translationproject.org/team/>
  350. Full documentation at: <http://www.gnu.org/software/coreutils/id>
  351. or available locally via: info '(coreutils) id invocation'
  352. hikey:/usr/bin/kselftests/futex/functional# id -a
  353. uid=0(root) gid=0(root) groups=0(root)
  354. hikey:/usr/bin/kselftests/futex/functional# id -u
  355. 0
  356. hikey:/usr/bin/kselftests/futex/functional# id -Z
  357. id: --context (-Z) works only on an SELinux-enabled kernel
  358. hikey:/usr/bin/kselftests/futex/functional# id
  359. uid=0(root) gid=0(root) groups=0(root)
  360. hikey:/usr/bin/kselftests/futex/functional# history
  361. 1 cd /usr/bin/kselftests/futex/functional/
  362. 2 ./futex_requeue_pi
  363. 3 cd
  364. 4 cd /home/linaro/
  365. 5 cd -
  366. 6 cd -
  367. 7 ip a
  368. 8 nmcli d wifi connect naresh password naresh@123
  369. 9 ip a
  370. 10 reboot
  371. 11 cd /usr/bin/kselftests/futex/functional/
  372. 12 ./futex_requeue_pi
  373. 13 cd
  374. 14 cd /home/linaro/
  375. 15 ./test_set_other_sched
  376. 16 cd /usr/bin/kselftests/futex/functional/
  377. 17 ./futex_requeue_pi
  378. 18 uname -a
  379. 19 cd /home/linaro/
  380. 20 ./test-set-rr
  381. 21 ./test_set_other_sched
  382. 22 ./test-rr-sched
  383. 23 strace ./test_set_other_sched
  384. 24 strace ./test-set-rr
  385. 25 nice.coreutils
  386. 26 nice
  387. 27 filefrag
  388. 28 filefrag -b
  389. 29 cd /usr/bin/kselftests/futex/functional/
  390. 30 ./futex_requeue_pi
  391. 31 ulimit
  392. 32 ulimit -a
  393. 33 cat /etc/security/access.conf
  394. 34 ls -l /etc/security/
  395. 35 date
  396. 36 cat /etc/security/pam_env.conf
  397. 37 cat /etc/security/limits.conf
  398. 38 ls /etc/security/limits.d/
  399. 39 ls
  400. 40 env
  401. 41 ./futex_requeue_pi
  402. 42 id
  403. 43 id --help
  404. 44 id -a
  405. 45 id -u
  406. 46 id -Z
  407. 47 id
  408. 48 history
  409. hikey:/usr/bin/kselftests/futex/functional# nice
  410. 0
  411. hikey:/usr/bin/kselftests/futex/functional#
  412. hikey:/usr/bin/kselftests/futex/functional#
  413. hikey:/usr/bin/kselftests/futex/functional# ./run.sh
  414.  
  415. futex_requeue_pi: Test requeue functionality
  416. Arguments: broadcast=0 locked=0 owner=0 timeout=0ns
  417. Result: PASS
  418. futex_requeue_pi: Test requeue functionality
  419. Arguments: broadcast=1 locked=0 owner=0 timeout=0ns
  420. Result: PASS
  421. futex_requeue_pi: Test requeue functionality
  422. Arguments: broadcast=1 locked=1 owner=0 timeout=0ns
  423. Result: PASS
  424. futex_requeue_pi: Test requeue functionality
  425. Arguments: broadcast=1 locked=0 owner=1 timeout=0ns
  426. Result: PASS
  427. futex_requeue_pi: Test requeue functionality
  428. Arguments: broadcast=0 locked=1 owner=0 timeout=0ns
  429. Result: PASS
  430. futex_requeue_pi: Test requeue functionality
  431. Arguments: broadcast=0 locked=0 owner=1 timeout=0ns
  432. Result: PASS
  433. futex_requeue_pi: Test requeue functionality
  434. Arguments: broadcast=1 locked=1 owner=0 timeout=5000ns
  435. Result: PASS
  436. futex_requeue_pi: Test requeue functionality
  437. Arguments: broadcast=0 locked=1 owner=0 timeout=5000ns
  438. Result: PASS
  439. futex_requeue_pi: Test requeue functionality
  440. Arguments: broadcast=1 locked=1 owner=0 timeout=500000ns
  441. Result: PASS
  442. futex_requeue_pi: Test requeue functionality
  443. Arguments: broadcast=0 locked=1 owner=0 timeout=500000ns
  444. Result: PASS
  445. futex_requeue_pi: Test requeue functionality
  446. Arguments: broadcast=1 locked=0 owner=0 timeout=5000ns
  447. Result: PASS
  448. futex_requeue_pi: Test requeue functionality
  449. Arguments: broadcast=0 locked=0 owner=0 timeout=5000ns
  450. Result: PASS
  451. futex_requeue_pi: Test requeue functionality
  452. Arguments: broadcast=1 locked=0 owner=0 timeout=500000ns
  453. Result: PASS
  454. futex_requeue_pi: Test requeue functionality
  455. Arguments: broadcast=0 locked=0 owner=0 timeout=500000ns
  456. Result: PASS
  457. futex_requeue_pi: Test requeue functionality
  458. Arguments: broadcast=1 locked=0 owner=1 timeout=5000ns
  459. Result: PASS
  460. futex_requeue_pi: Test requeue functionality
  461. Arguments: broadcast=0 locked=1 owner=0 timeout=5000ns
  462. Result: PASS
  463. futex_requeue_pi: Test requeue functionality
  464. Arguments: broadcast=1 locked=0 owner=1 timeout=500000ns
  465. Result: PASS
  466. futex_requeue_pi: Test requeue functionality
  467. Arguments: broadcast=0 locked=1 owner=0 timeout=500000ns
  468. Result: PASS
  469. futex_requeue_pi: Test requeue functionality
  470. Arguments: broadcast=1 locked=1 owner=0 timeout=2000000000ns
  471. Result: PASS
  472. futex_requeue_pi: Test requeue functionality
  473. Arguments: broadcast=0 locked=1 owner=0 timeout=2000000000ns
  474. Result: PASS
  475.  
  476. futex_requeue_pi_mismatched_ops: Detect mismatched requeue_pi operations
  477. Result: PASS
  478.  
  479. futex_requeue_pi_signal_restart: Test signal handling during requeue_pi
  480. Arguments: <none>
  481. Result: PASS
  482.  
  483. futex_wait_timeout: Block on a futex and wait for timeout
  484. Arguments: timeout=100000ns
  485. Result: PASS
  486.  
  487. futex_wait_wouldblock: Test the unexpected futex value in FUTEX_WAIT
  488. Result: PASS
  489.  
  490. futex_wait_uninitialized_heap: Test the uninitialized futex value in FUTEX_WAIT
  491. Result: PASS
  492. futex_wait_private_mapped_file: Test the futex value of private file mappings in FUTEX_WAIT
  493. Result: PASS
  494. hikey:/usr/bin/kselftests/futex/functional# uname -a
  495. Linux hikey 4.4.69-g59d4acf #1 SMP PREEMPT Mon May 22 22:17:10 UTC 2017 aarch64 aarch64 aarch64 GNU/Linux
  496. hikey:/usr/bin/kselftests/futex/functional# cat /proc/version
  497. Linux version 4.4.69-g59d4acf (buildslave@x86-64-08) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #1 SMP PREEMPT Mon May 22 22:17:10 UTC 2017
  498. hikey:/usr/bin/kselftests/futex/functional# strace ./futex_requeue_pi
  499. execve("./futex_requeue_pi", ["./futex_requeue_pi"], [/* 18 vars */]) = 0
  500. brk(NULL) = 0x22cc1000
  501. mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9a18e000
  502. faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
  503. openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
  504. fstat(3, {st_mode=S_IFREG|0644, st_size=10465, ...}) = 0
  505. mmap(NULL, 10465, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9a18b000
  506. close(3) = 0
  507. openat(AT_FDCWD, "/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
  508. read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\320[\0\0\0\0\0\0"..., 832) = 832
  509. fstat(3, {st_mode=S_IFREG|0755, st_size=97592, ...}) = 0
  510. mmap(NULL, 177048, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9a13b000
  511. mprotect(0x7f9a152000, 61440, PROT_NONE) = 0
  512. mmap(0x7f9a161000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f9a161000
  513. mmap(0x7f9a163000, 13208, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f9a163000
  514. close(3) = 0
  515. openat(AT_FDCWD, "/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
  516. read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0x\364\1\0\0\0\0\0"..., 832) = 832
  517. fstat(3, {st_mode=S_IFREG|0755, st_size=1267360, ...}) = 0
  518. mmap(NULL, 1340040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f99ff3000
  519. mprotect(0x7f9a122000, 61440, PROT_NONE) = 0
  520. mmap(0x7f9a131000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12e000) = 0x7f9a131000
  521. mmap(0x7f9a137000, 12936, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f9a137000
  522. close(3) = 0
  523. mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9a189000
  524. mprotect(0x7f9a131000, 16384, PROT_READ) = 0
  525. mprotect(0x7f9a161000, 4096, PROT_READ) = 0
  526. mprotect(0x7f9a192000, 4096, PROT_READ) = 0
  527. munmap(0x7f9a18b000, 10465) = 0
  528. set_tid_address(0x7f9a1890d0) = 2886
  529. set_robust_list(0x7f9a1890e0, 24) = 0
  530. rt_sigaction(SIGRTMIN, {0x7f9a1405e0, [], SA_SIGINFO}, NULL, 8) = 0
  531. rt_sigaction(SIGRT_1, {0x7f9a1406d8, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
  532. rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
  533. getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
  534. fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
  535. brk(NULL) = 0x22cc1000
  536. brk(0x22ce2000) = 0x22ce2000
  537. write(1, "futex_requeue_pi: Test requeue f"..., 45futex_requeue_pi: Test requeue functionality
  538. ) = 45
  539. write(1, "\tArguments: broadcast=0 locked=0"..., 53 Arguments: broadcast=0 locked=0 owner=0 timeout=0ns
  540. ) = 53
  541. sched_get_priority_min(SCHED_FIFO) = 1
  542. sched_get_priority_max(SCHED_FIFO) = 99
  543. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f997f3000
  544. mprotect(0x7f997f3000, 4096, PROT_NONE) = 0
  545. clone(child_stack=0x7f99ff1b10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f99ff22d0, tls=0x7f99ff28f0, child_tidptr=0x7f99ff22d0) = 2887
  546. sched_setscheduler(2887, SCHED_FIFO, [1]) = 0
  547. futex(0x7f99ff2618, FUTEX_WAKE_PRIVATE, 1) = 1
  548. sched_get_priority_min(SCHED_FIFO) = 1
  549. sched_get_priority_max(SCHED_FIFO) = 99
  550. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f98ff3000
  551. mprotect(0x7f98ff3000, 4096, PROT_NONE) = 0
  552. clone(child_stack=0x7f997f1b10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f997f22d0, tls=0x7f997f28f0, child_tidptr=0x7f997f22d0) = 2888
  553. sched_setscheduler(2888, SCHED_FIFO, [1]) = 0
  554. futex(0x7f997f2618, FUTEX_WAKE_PRIVATE, 1) = 1
  555. sched_get_priority_min(SCHED_FIFO) = 1
  556. sched_get_priority_max(SCHED_FIFO) = 99
  557. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f987f3000
  558. mprotect(0x7f987f3000, 4096, PROT_NONE) = 0
  559. clone(child_stack=0x7f98ff1b10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f98ff22d0, tls=0x7f98ff28f0, child_tidptr=0x7f98ff22d0) = 2890
  560. sched_setscheduler(2890, SCHED_FIFO, [1]) = 0
  561. futex(0x7f98ff2618, FUTEX_WAKE_PRIVATE, 1) = 1
  562. sched_get_priority_min(SCHED_FIFO) = 1
  563. sched_get_priority_max(SCHED_FIFO) = 99
  564. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f97ff3000
  565. mprotect(0x7f97ff3000, 4096, PROT_NONE) = 0
  566. clone(child_stack=0x7f987f1b10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f987f22d0, tls=0x7f987f28f0, child_tidptr=0x7f987f22d0) = 2891
  567. sched_setscheduler(2891, SCHED_FIFO, [1]) = 0
  568. futex(0x7f987f2618, FUTEX_WAKE_PRIVATE, 1) = 1
  569. sched_get_priority_min(SCHED_FIFO) = 1
  570. sched_get_priority_max(SCHED_FIFO) = 99
  571. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f977f3000
  572. mprotect(0x7f977f3000, 4096, PROT_NONE) = 0
  573. clone(child_stack=0x7f97ff1b10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f97ff22d0, tls=0x7f97ff28f0, child_tidptr=0x7f97ff22d0) = 2892
  574. sched_setscheduler(2892, SCHED_FIFO, [1]) = 0
  575. futex(0x7f97ff2618, FUTEX_WAKE_PRIVATE, 1) = 1
  576. sched_get_priority_min(SCHED_FIFO) = 1
  577. sched_get_priority_max(SCHED_FIFO) = 99
  578. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f96ff3000
  579. mprotect(0x7f96ff3000, 4096, PROT_NONE) = 0
  580. clone(child_stack=0x7f977f1b10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f977f22d0, tls=0x7f977f28f0, child_tidptr=0x7f977f22d0) = 2893
  581. sched_setscheduler(2893, SCHED_FIFO, [1]) = 0
  582. futex(0x7f977f2618, FUTEX_WAKE_PRIVATE, 1) = 1
  583. sched_get_priority_min(SCHED_FIFO) = 1
  584. sched_get_priority_max(SCHED_FIFO) = 99
  585. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f967f3000
  586. mprotect(0x7f967f3000, 4096, PROT_NONE) = 0
  587. clone(child_stack=0x7f96ff1b10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f96ff22d0, tls=0x7f96ff28f0, child_tidptr=0x7f96ff22d0) = 2894
  588. sched_setscheduler(2894, SCHED_FIFO, [1]) = 0
  589. futex(0x7f96ff2618, FUTEX_WAKE_PRIVATE, 1) = 1
  590. sched_get_priority_min(SCHED_FIFO) = 1
  591. sched_get_priority_max(SCHED_FIFO) = 99
  592. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f95ff3000
  593. mprotect(0x7f95ff3000, 4096, PROT_NONE) = 0
  594. clone(child_stack=0x7f967f1b10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f967f22d0, tls=0x7f967f28f0, child_tidptr=0x7f967f22d0) = 2895
  595. sched_setscheduler(2895, SCHED_FIFO, [1]) = 0
  596. futex(0x7f967f2618, FUTEX_WAKE_PRIVATE, 1) = 1
  597. sched_get_priority_min(SCHED_FIFO) = 1
  598. sched_get_priority_max(SCHED_FIFO) = 99
  599. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f957f3000
  600. mprotect(0x7f957f3000, 4096, PROT_NONE) = 0
  601. clone(child_stack=0x7f95ff1b10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f95ff22d0, tls=0x7f95ff28f0, child_tidptr=0x7f95ff22d0) = 2896
  602. sched_setscheduler(2896, SCHED_FIFO, [1]) = 0
  603. futex(0x7f95ff2618, FUTEX_WAKE_PRIVATE, 1) = 1
  604. sched_get_priority_min(SCHED_FIFO) = 1
  605. sched_get_priority_max(SCHED_FIFO) = 99
  606. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f94ff3000
  607. mprotect(0x7f94ff3000, 4096, PROT_NONE) = 0
  608. clone(child_stack=0x7f957f1b10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f957f22d0, tls=0x7f957f28f0, child_tidptr=0x7f957f22d0) = 2897
  609. sched_setscheduler(2897, SCHED_FIFO, [1]) = 0
  610. futex(0x7f957f2618, FUTEX_WAKE_PRIVATE, 1) = 1
  611. sched_get_priority_min(SCHED_FIFO) = 1
  612. sched_get_priority_max(SCHED_FIFO) = 99
  613. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f947f3000
  614. mprotect(0x7f947f3000, 4096, PROT_NONE) = 0
  615. clone(child_stack=0x7f94ff1b10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f94ff22d0, tls=0x7f94ff28f0, child_tidptr=0x7f94ff22d0) = 2898
  616. sched_setscheduler(2898, SCHED_FIFO, [1]) = 0
  617. futex(0x7f94ff2618, FUTEX_WAKE_PRIVATE, 1) = 1
  618. futex(0x7f99ff22d0, FUTEX_WAIT, 2887, NULL) = 0
  619. munmap(0x7f997f3000, 8388608) = 0
  620. munmap(0x7f98ff3000, 8388608) = 0
  621. munmap(0x7f987f3000, 8388608) = 0
  622. munmap(0x7f97ff3000, 8388608) = 0
  623. munmap(0x7f977f3000, 8388608) = 0
  624. munmap(0x7f96ff3000, 8388608) = 0
  625. write(1, "Result: PASS\n", 14Result: PASS
  626. ) = 14
  627. exit_group(0) = ?
  628. +++ exited with 0 +++
  629. hikey:/usr/bin/kselftests/futex/functional# cd /opt/ltp/testcases/
  630. hikey:/opt/ltp/testcases# cd -
  631. /usr/bin/kselftests/futex/functional
  632. hikey:/usr/bin/kselftests/futex/functional# cd /opt/ltp/testcases/bin/
  633. hikey:/opt/ltp/testcases/bin# ./sched_getscheduler01
  634. sched_getscheduler01 1 TPASS : policy value returned is correct
  635. sched_getscheduler01 2 TPASS : policy value returned is correct
  636. sched_getscheduler01 3 TPASS : policy value returned is correct
  637. hikey:/opt/ltp/testcases/bin# ./sched_getscheduler02
  638. sched_getscheduler02 1 TPASS : call failed with ESRCH
  639. hikey:/opt/ltp/testcases/bin# ./sched_rr_get_interval0
  640. sh: ./sched_rr_get_interval0: No such file or directory
  641. hikey:/opt/ltp/testcases/bin# ./sched_rr_get_interval01
  642. sched_rr_get_interval01 1 TPASS : sched_rr_get_interval() returned 0
  643. hikey:/opt/ltp/testcases/bin# ./sched_rr_get_interval02
  644. sched_rr_get_interval02 1 TPASS : Test passed
  645. hikey:/opt/ltp/testcases/bin# ./sched_rr_get_interval0
  646. sched_rr_get_interval01 sched_rr_get_interval02 sched_rr_get_interval03
  647. hikey:/opt/ltp/testcases/bin# ./sched_rr_get_interval03
  648. sched_rr_get_interval03 1 TPASS : Test Passed
  649. sched_rr_get_interval03 2 TPASS : Test Passed
  650. sched_rr_get_interval03 3 TPASS : Test Passed
  651. hikey:/opt/ltp/testcases/bin# ./sched_setscheduler01
  652. sched_setscheduler01 1 TPASS : expected failure - errno = 3 : No such process
  653. sched_setscheduler01 2 TPASS : expected failure - errno = 22 : Invalid argument
  654. sched_setscheduler01 3 TPASS : expected failure - errno = 14 : Bad address
  655. sched_setscheduler01 4 TPASS : expected failure - errno = 22 : Invalid argument
  656. hikey:/opt/ltp/testcases/bin# ./sched_setscheduler02
  657. sched_setscheduler02 1 TPASS : got EPERM
  658. hikey:/opt/ltp/testcases/bin# ./sched_setscheduler0
  659. sched_setscheduler01 sched_setscheduler02 sched_setscheduler03
  660. hikey:/opt/ltp/testcases/bin# ./sched_setscheduler03
  661. tst_test.c:760: INFO: Timeout per run is 0h 05m 00s
  662. sched_setscheduler03.c:76: INFO: rlimit rlim_cur=0
  663. sched_setscheduler03.c:78: INFO: rlimit rlim_max=0
  664. sched_setscheduler03.c:86: INFO: Setting rlim_cur to 19
  665. sched_setscheduler03.c:88: INFO: Setting rlim_max to 19
  666. sched_setscheduler03.c:76: INFO: rlimit rlim_cur=19
  667. sched_setscheduler03.c:78: INFO: rlimit rlim_max=19
  668. sched_setscheduler03.c:143: INFO: Setting init sched policy to SCHED_OTHER
  669. sched_setscheduler03.c:151: INFO: Setting euid to nobody to drop privilege
  670. sched_setscheduler03.c:165: INFO: forked pid is 2910
  671. sched_setscheduler03.c:109: INFO: Verifying case[1]: policy = 0, priority = 0
  672. sched_setscheduler03.c:117: PASS: case[1] succeeded
  673. sched_setscheduler03.c:165: INFO: forked pid is 2911
  674. sched_setscheduler03.c:109: INFO: Verifying case[2]: policy = 3, priority = 0
  675. sched_setscheduler03.c:117: PASS: case[2] succeeded
  676. sched_setscheduler03.c:165: INFO: forked pid is 2912
  677. sched_setscheduler03.c:109: INFO: Verifying case[3]: policy = 5, priority = 0
  678. sched_setscheduler03.c:117: PASS: case[3] succeeded
  679.  
  680. Summary:
  681. passed 3
  682. failed 0
  683. skipped 0
  684. warnings 0
  685. hikey:/opt/ltp/testcases/bin# env
  686. XDG_SESSION_ID=c1
  687. SHELL=/bin/sh
  688. TERM=xterm-256color
  689. SSH_CLIENT=192.168.1.4 54148 22
  690. OLDPWD=/usr/bin/kselftests/futex/functional
  691. SSH_TTY=/dev/pts/0
  692. USER=root
  693. PATH=/sbin:/bin:/usr/sbin:/usr/bin
  694. MAIL=/var/spool/mail/root
  695. PWD=/opt/ltp/testcases/bin
  696. EDITOR=vi
  697. PS1=\h:\w\$
  698. HOME=/home/root
  699. SHLVL=2
  700. LOGNAME=root
  701. SSH_CONNECTION=192.168.1.4 54148 192.168.1.5 22
  702. XDG_RUNTIME_DIR=/run/user/1000
  703. _=/usr/bin/env
  704. hikey:/opt/ltp/testcases/bin# ulimit -a
  705. core file size (blocks, -c) unlimited
  706. data seg size (kbytes, -d) unlimited
  707. scheduling priority (-e) 0
  708. file size (blocks, -f) unlimited
  709. pending signals (-i) 7226
  710. max locked memory (kbytes, -l) 64
  711. max memory size (kbytes, -m) unlimited
  712. open files (-n) 1024
  713. pipe size (512 bytes, -p) 8
  714. POSIX message queues (bytes, -q) 819200
  715. real-time priority (-r) 0
  716. stack size (kbytes, -s) 8192
  717. cpu time (seconds, -t) unlimited
  718. max user processes (-u) 7226
  719. virtual memory (kbytes, -v) unlimited
  720. file locks (-x) unlimited
  721. hikey:/opt/ltp/testcases/bin# history
  722. 1 cd /usr/bin/kselftests/futex/functional/
  723. 2 ./futex_requeue_pi
  724. 3 cd
  725. 4 cd /home/linaro/
  726. 5 cd -
  727. 6 cd -
  728. 7 ip a
  729. 8 nmcli d wifi connect naresh password naresh@123
  730. 9 ip a
  731. 10 reboot
  732. 11 cd /usr/bin/kselftests/futex/functional/
  733. 12 ./futex_requeue_pi
  734. 13 cd
  735. 14 cd /home/linaro/
  736. 15 ./test_set_other_sched
  737. 16 cd /usr/bin/kselftests/futex/functional/
  738. 17 ./futex_requeue_pi
  739. 18 uname -a
  740. 19 cd /home/linaro/
  741. 20 ./test-set-rr
  742. 21 ./test_set_other_sched
  743. 22 ./test-rr-sched
  744. 23 strace ./test_set_other_sched
  745. 24 strace ./test-set-rr
  746. 25 nice.coreutils
  747. 26 nice
  748. 27 filefrag
  749. 28 filefrag -b
  750. 29 cd /usr/bin/kselftests/futex/functional/
  751. 30 ./futex_requeue_pi
  752. 31 ulimit
  753. 32 ulimit -a
  754. 33 cat /etc/security/access.conf
  755. 34 ls -l /etc/security/
  756. 35 date
  757. 36 cat /etc/security/pam_env.conf
  758. 37 cat /etc/security/limits.conf
  759. 38 ls /etc/security/limits.d/
  760. 39 ls
  761. 40 env
  762. 41 ./futex_requeue_pi
  763. 42 id
  764. 43 id --help
  765. 44 id -a
  766. 45 id -u
  767. 46 id -Z
  768. 47 id
  769. 48 history
  770. 49 nice
  771. 50 ./run.sh
  772. 51 uname -a
  773. 52 cat /proc/version
  774. 53 strace ./futex_requeue_pi
  775. 54 cd /opt/ltp/testcases/
  776. 55 cd -
  777. 56 cd /opt/ltp/testcases/bin/
  778. 57 ./sched_getscheduler01
  779. 58 ./sched_getscheduler02
  780. 59 ./sched_rr_get_interval0
  781. 60 ./sched_rr_get_interval01
  782. 61 ./sched_rr_get_interval02
  783. 62 ./sched_rr_get_interval03
  784. 63 ./sched_setscheduler01
  785. 64 ./sched_setscheduler02
  786. 65 ./sched_setscheduler03
  787. 66 env
  788. 67 ulimit -a
  789. 68 history
  790. hikey:/opt/ltp/testcases/bin# ./sched_setscheduler03
  791. tst_test.c:760: INFO: Timeout per run is 0h 05m 00s
  792. sched_setscheduler03.c:76: INFO: rlimit rlim_cur=0
  793. sched_setscheduler03.c:78: INFO: rlimit rlim_max=0
  794. sched_setscheduler03.c:86: INFO: Setting rlim_cur to 19
  795. sched_setscheduler03.c:88: INFO: Setting rlim_max to 19
  796. sched_setscheduler03.c:76: INFO: rlimit rlim_cur=19
  797. sched_setscheduler03.c:78: INFO: rlimit rlim_max=19
  798. sched_setscheduler03.c:143: INFO: Setting init sched policy to SCHED_OTHER
  799. sched_setscheduler03.c:151: INFO: Setting euid to nobody to drop privilege
  800. sched_setscheduler03.c:165: INFO: forked pid is 3362
  801. sched_setscheduler03.c:109: INFO: Verifying case[1]: policy = 0, priority = 0
  802. sched_setscheduler03.c:117: PASS: case[1] succeeded
  803. sched_setscheduler03.c:165: INFO: forked pid is 3363
  804. sched_setscheduler03.c:109: INFO: Verifying case[2]: policy = 3, priority = 0
  805. sched_setscheduler03.c:117: PASS: case[2] succeeded
  806. sched_setscheduler03.c:165: INFO: forked pid is 3364
  807. sched_setscheduler03.c:109: INFO: Verifying case[3]: policy = 5, priority = 0
  808. sched_setscheduler03.c:117: PASS: case[3] succeeded
  809.  
  810. Summary:
  811. passed 3
  812. failed 0
  813. skipped 0
  814. warnings 0
  815. hikey:/opt/ltp/testcases/bin# cd /usr/bin/kselftests/futex/functional/
  816. hikey:/usr/bin/kselftests/futex/functional#
  817. hikey:/usr/bin/kselftests/futex/functional# uname -a
  818. Linux hikey 4.4.69-g59d4acf #1 SMP PREEMPT Mon May 22 22:17:10 UTC 2017 aarch64 aarch64 aarch64 GNU/Linux
  819. hikey:/usr/bin/kselftests/futex/functional# ./futex_requeue_pi
  820. futex_requeue_pi: Test requeue functionality
  821. Arguments: broadcast=0 locked=0 owner=0 timeout=0ns
  822. Result: PASS
  823. hikey:/usr/bin/kselftests/futex/functional# strace ./futex_requeue_pi
  824. execve("./futex_requeue_pi", ["./futex_requeue_pi"], [/* 18 vars */]) = 0
  825. brk(NULL) = 0x301d8000
  826. mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb6aaa000
  827. faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
  828. openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
  829. fstat(3, {st_mode=S_IFREG|0644, st_size=10465, ...}) = 0
  830. mmap(NULL, 10465, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fb6aa7000
  831. close(3) = 0
  832. openat(AT_FDCWD, "/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
  833. read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\320[\0\0\0\0\0\0"..., 832) = 832
  834. fstat(3, {st_mode=S_IFREG|0755, st_size=97592, ...}) = 0
  835. mmap(NULL, 177048, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fb6a57000
  836. mprotect(0x7fb6a6e000, 61440, PROT_NONE) = 0
  837. mmap(0x7fb6a7d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7fb6a7d000
  838. mmap(0x7fb6a7f000, 13208, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fb6a7f000
  839. close(3) = 0
  840. openat(AT_FDCWD, "/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
  841. read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0x\364\1\0\0\0\0\0"..., 832) = 832
  842. fstat(3, {st_mode=S_IFREG|0755, st_size=1267360, ...}) = 0
  843. mmap(NULL, 1340040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fb690f000
  844. mprotect(0x7fb6a3e000, 61440, PROT_NONE) = 0
  845. mmap(0x7fb6a4d000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12e000) = 0x7fb6a4d000
  846. mmap(0x7fb6a53000, 12936, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fb6a53000
  847. close(3) = 0
  848. mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb6aa5000
  849. mprotect(0x7fb6a4d000, 16384, PROT_READ) = 0
  850. mprotect(0x7fb6a7d000, 4096, PROT_READ) = 0
  851. mprotect(0x7fb6aae000, 4096, PROT_READ) = 0
  852. munmap(0x7fb6aa7000, 10465) = 0
  853. set_tid_address(0x7fb6aa50d0) = 3382
  854. set_robust_list(0x7fb6aa50e0, 24) = 0
  855. rt_sigaction(SIGRTMIN, {0x7fb6a5c5e0, [], SA_SIGINFO}, NULL, 8) = 0
  856. rt_sigaction(SIGRT_1, {0x7fb6a5c6d8, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
  857. rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
  858. getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
  859. fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
  860. brk(NULL) = 0x301d8000
  861. brk(0x301f9000) = 0x301f9000
  862. write(1, "futex_requeue_pi: Test requeue f"..., 45futex_requeue_pi: Test requeue functionality
  863. ) = 45
  864. write(1, "\tArguments: broadcast=0 locked=0"..., 53 Arguments: broadcast=0 locked=0 owner=0 timeout=0ns
  865. ) = 53
  866. sched_get_priority_min(SCHED_FIFO) = 1
  867. sched_get_priority_max(SCHED_FIFO) = 99
  868. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fb610f000
  869. mprotect(0x7fb610f000, 4096, PROT_NONE) = 0
  870. clone(child_stack=0x7fb690db10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb690e2d0, tls=0x7fb690e8f0, child_tidptr=0x7fb690e2d0) = 3383
  871. sched_setscheduler(3383, SCHED_FIFO, [1]) = 0
  872. futex(0x7fb690e618, FUTEX_WAKE_PRIVATE, 1) = 1
  873. sched_get_priority_min(SCHED_FIFO) = 1
  874. sched_get_priority_max(SCHED_FIFO) = 99
  875. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fb590f000
  876. mprotect(0x7fb590f000, 4096, PROT_NONE) = 0
  877. clone(child_stack=0x7fb610db10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb610e2d0, tls=0x7fb610e8f0, child_tidptr=0x7fb610e2d0) = 3384
  878. sched_setscheduler(3384, SCHED_FIFO, [1]) = 0
  879. futex(0x7fb610e618, FUTEX_WAKE_PRIVATE, 1) = 1
  880. sched_get_priority_min(SCHED_FIFO) = 1
  881. sched_get_priority_max(SCHED_FIFO) = 99
  882. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fb510f000
  883. mprotect(0x7fb510f000, 4096, PROT_NONE) = 0
  884. clone(child_stack=0x7fb590db10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb590e2d0, tls=0x7fb590e8f0, child_tidptr=0x7fb590e2d0) = 3385
  885. sched_setscheduler(3385, SCHED_FIFO, [1]) = 0
  886. futex(0x7fb590e618, FUTEX_WAKE_PRIVATE, 1) = 1
  887. sched_get_priority_min(SCHED_FIFO) = 1
  888. sched_get_priority_max(SCHED_FIFO) = 99
  889. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fb490f000
  890. mprotect(0x7fb490f000, 4096, PROT_NONE) = 0
  891. clone(child_stack=0x7fb510db10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb510e2d0, tls=0x7fb510e8f0, child_tidptr=0x7fb510e2d0) = 3386
  892. sched_setscheduler(3386, SCHED_FIFO, [1]) = 0
  893. futex(0x7fb510e618, FUTEX_WAKE_PRIVATE, 1) = 1
  894. sched_get_priority_min(SCHED_FIFO) = 1
  895. sched_get_priority_max(SCHED_FIFO) = 99
  896. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fb410f000
  897. mprotect(0x7fb410f000, 4096, PROT_NONE) = 0
  898. clone(child_stack=0x7fb490db10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb490e2d0, tls=0x7fb490e8f0, child_tidptr=0x7fb490e2d0) = 3387
  899. sched_setscheduler(3387, SCHED_FIFO, [1]) = 0
  900. futex(0x7fb490e618, FUTEX_WAKE_PRIVATE, 1) = 1
  901. sched_get_priority_min(SCHED_FIFO) = 1
  902. sched_get_priority_max(SCHED_FIFO) = 99
  903. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fb390f000
  904. mprotect(0x7fb390f000, 4096, PROT_NONE) = 0
  905. clone(child_stack=0x7fb410db10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb410e2d0, tls=0x7fb410e8f0, child_tidptr=0x7fb410e2d0) = 3388
  906. sched_setscheduler(3388, SCHED_FIFO, [1]) = 0
  907. futex(0x7fb410e618, FUTEX_WAKE_PRIVATE, 1) = 1
  908. sched_get_priority_min(SCHED_FIFO) = 1
  909. sched_get_priority_max(SCHED_FIFO) = 99
  910. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fb310f000
  911. mprotect(0x7fb310f000, 4096, PROT_NONE) = 0
  912. clone(child_stack=0x7fb390db10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb390e2d0, tls=0x7fb390e8f0, child_tidptr=0x7fb390e2d0) = 3389
  913. sched_setscheduler(3389, SCHED_FIFO, [1]) = 0
  914. futex(0x7fb390e618, FUTEX_WAKE_PRIVATE, 1) = 1
  915. sched_get_priority_min(SCHED_FIFO) = 1
  916. sched_get_priority_max(SCHED_FIFO) = 99
  917. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fb290f000
  918. mprotect(0x7fb290f000, 4096, PROT_NONE) = 0
  919. clone(child_stack=0x7fb310db10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb310e2d0, tls=0x7fb310e8f0, child_tidptr=0x7fb310e2d0) = 3390
  920. sched_setscheduler(3390, SCHED_FIFO, [1]) = 0
  921. futex(0x7fb310e618, FUTEX_WAKE_PRIVATE, 1) = 1
  922. sched_get_priority_min(SCHED_FIFO) = 1
  923. sched_get_priority_max(SCHED_FIFO) = 99
  924. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fb210f000
  925. mprotect(0x7fb210f000, 4096, PROT_NONE) = 0
  926. clone(child_stack=0x7fb290db10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb290e2d0, tls=0x7fb290e8f0, child_tidptr=0x7fb290e2d0) = 3391
  927. sched_setscheduler(3391, SCHED_FIFO, [1]) = 0
  928. futex(0x7fb290e618, FUTEX_WAKE_PRIVATE, 1) = 1
  929. sched_get_priority_min(SCHED_FIFO) = 1
  930. sched_get_priority_max(SCHED_FIFO) = 99
  931. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fb190f000
  932. mprotect(0x7fb190f000, 4096, PROT_NONE) = 0
  933. clone(child_stack=0x7fb210db10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb210e2d0, tls=0x7fb210e8f0, child_tidptr=0x7fb210e2d0) = 3392
  934. sched_setscheduler(3392, SCHED_FIFO, [1]) = 0
  935. futex(0x7fb210e618, FUTEX_WAKE_PRIVATE, 1) = 1
  936. sched_get_priority_min(SCHED_FIFO) = 1
  937. sched_get_priority_max(SCHED_FIFO) = 99
  938. mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fb110f000
  939. mprotect(0x7fb110f000, 4096, PROT_NONE) = 0
  940. clone(child_stack=0x7fb190db10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fb190e2d0, tls=0x7fb190e8f0, child_tidptr=0x7fb190e2d0) = 3393
  941. sched_setscheduler(3393, SCHED_FIFO, [1]) = 0
  942. futex(0x7fb190e618, FUTEX_WAKE_PRIVATE, 1) = 1
  943. futex(0x7fb690e2d0, FUTEX_WAIT, 3383, NULL) = 0
  944. munmap(0x7fb610f000, 8388608) = 0
  945. munmap(0x7fb590f000, 8388608) = 0
  946. munmap(0x7fb510f000, 8388608) = 0
  947. munmap(0x7fb490f000, 8388608) = 0
  948. munmap(0x7fb410f000, 8388608) = 0
  949. munmap(0x7fb390f000, 8388608) = 0
  950. write(1, "Result: PASS\n", 14Result: PASS
  951. ) = 14
  952. exit_group(0) = ?
  953. +++ exited with 0 +++
  954. hikey:/usr/bin/kselftests/futex/functional#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement