Skip to content

Commit

Permalink
Android.mk: Rename C source files to its test suite
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Chong <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
  • Loading branch information
Victor Chong authored and jforissier committed Apr 19, 2017
1 parent f84e996 commit 170a1ee
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,33 @@ include $(CLEAR_VARS)
LOCAL_MODULE := xtest
LOCAL_SHARED_LIBRARIES := libteec

srcs := xtest_1000.c
srcs := regression_1000.c

ifeq ($(CFG_GP_SOCKETS),y)
srcs += xtest_2000.c \
srcs += regression_2000.c \
sock_server.c \
rand_stream.c
endif

srcs += xtest_4000.c \
xtest_5000.c \
xtest_6000.c \
xtest_7000.c \
xtest_10000.c \
xtest_20000.c \
xtest_benchmark_1000.c \
xtest_benchmark_2000.c \
xtest_helpers.c \
xtest_main.c \
xtest_test.c \
adbg/src/adbg_case.c \
srcs += adbg/src/adbg_case.c \
adbg/src/adbg_enum.c \
adbg/src/adbg_expect.c \
adbg/src/adbg_log.c \
adbg/src/adbg_run.c \
adbg/src/security_utils_hex.c \
aes_perf.c \
sha_perf.c
benchmark_1000.c \
benchmark_2000.c \
regression_4000.c \
regression_5000.c \
regression_6000.c \
regression_7000.c \
regression_8000.c \
regression_9000.c \
sha_perf.c \
xtest_helpers.c \
xtest_main.c \
xtest_test.c

ifeq ($(CFG_SECURE_DATA_PATH),y)
srcs += sdp_basic.c
Expand Down

5 comments on commit 170a1ee

@kenlsoft
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi vchong,
Would android.mk on tag 2.4.0 could work? We find it is the one don't have your patch....

@vchong
Copy link

@vchong vchong commented on 170a1ee Jun 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need below 3 patches on top of tag 2.4.0 for Android to work:
cd0186b
f84e996
170a1ee (this one is the one here)

@kenlsoft
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Another thing is that, was 2.4.0 based on Android 7? Due to my version still Android 6 so I missed definition of 'pthread_barrier_t' while compiling.

@vchong
Copy link

@vchong vchong commented on 170a1ee Jun 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're welcome. Yes, both 2.3.0 and 2.4.0 are based on 7.

For pthread_barrier_t, yes, it seems like 6 doesn't support it. You can copy it from https://android.googlesource.com/platform/bionic/+/master/libc/include/bits/pthread_types.h, but I don't know how easy it is. There might be many other things you have to bring in as well just to make it compile without errors. Even then, I don't know if things will run properly or not.

Some related references:
https://android.googlesource.com/platform/bionic/+/280236537e06c7accaffabf8fb407f93dd1c834f -> this one introduces pthread barrier
https://android.googlesource.com/platform/bionic/+/468a5d2d83a3d719f7493d041abc69587756d8fa -> this one says that pthread barrrier should only appear in 7 and higher.
android/ndk#336 -> this one explains why it should be only 7 and higher

Or, the other (perhaps more simple) alternative is compile with CFG_GP_SOCKETS=n and that should disable the use of thread barriers in optee_test, but again, there's no guarantee that other parts of OP-TEE will not use it in the future.

@kenlsoft
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it and clear. 👍

Please sign in to comment.