Open Bad916 opened 1 year ago
It seems that nobody exists in Android, but I will "pw=SAFE GETPWNAM ("nobody") " is modified to "pw=SAFE GETPWNAM ("root")" also reports an error.
@Bad916 FYI, this is already ported: https://android.googlesource.com/platform/external/ltp/ Although takes patches from aosp, if reasonable, generally it does not make sense to use LTP upstream for Android. It's documented on https://github.com/linux-test-project/ltp/wiki/Supported-kernel,-libc,-toolchain-versions
See also https://android.googlesource.com/platform/external/ltp/+/6dd37d0d7264a9938d531ce2f3b6c37acf6dbca1/android/skipped-tests.txt access02 is not in a skip list, thus it should work https://android.googlesource.com/platform/external/ltp/+/6dd37d0d7264a9938d531ce2f3b6c37acf6dbca1/android/tools/disabled_tests.txt LTP master even contain android specific fix: https://github.com/linux-test-project/ltp/commit/1b3e3e2755815ef3ed42e53bd7cf292b9cae69b1
@edliaw please correct me if I'm wrong.
That's correct, and the test is enabled here https://cs.android.com/android/platform/superproject/+/master:test/vts-testcase/kernel/ltp/testcase/tools/configs/stable_tests.py;l=615?q=access02 in the VTS test suite, but I will run the test tomorrow to verify just in case.
I put together a walkthrough to building and running LTP for Android here https://android.googlesource.com/platform/external/ltp/+/6dd37d0d7264a9938d531ce2f3b6c37acf6dbca1/android/ltp_android_walkthrough.md . Let me know if you find it helpful.
Edit: the test passes in my test environments. @Bad916 if you still have issues, consider filing a bug through https://issuetracker.google.com/issues?q=componentid:192639 and CC me on it. It would help if you describe how you are building LTP and what device / kernel version you are testing with.
Hello,I ported ltp to Android for testing. The access02 test is failed. What is the reason? Is there any way to modify it?Thanks Here is the print information: tst_test.c:1365: TINFO: Timeout per run is 0h 05m 00s access02.c:167: TBROK: getpwnam(nobody) failed: ENOENT (2) Summary: passed 0 failed 0 broken 1 skipped 0 warnings 0