Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#3320 pipe order: Remove pipe before and after tests #7259

Merged
merged 3 commits into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clients/drcachesim/tests/allasm_aarch64_flush.asm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ _start:
ic ivau, x1

// Exit.
mov w0, #1 // stdout
mov w0, #2 // stderr
#ifdef __APPLE__
adrp x1, helloworld@PAGE
add x1, x1, helloworld@PAGEOFF
Expand Down
2 changes: 1 addition & 1 deletion clients/drcachesim/tests/allasm_aarch64_prefetch.asm
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ _start:
prfum pstl3strm, [x1]

// Exit.
mov w0, #1 // stdout
mov w0, #2 // stderr
#ifdef __APPLE__
adrp x1, helloworld@PAGE
add x1, x1, helloworld@PAGEOFF
Expand Down
2 changes: 1 addition & 1 deletion clients/drcachesim/tests/allasm_scattergather_aarch64.asm
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ _start:
// Unique instructions: 367

// Exit.
mov w0, #1 // stdout
mov w0, #2 // stderr
#ifdef __APPLE__
adrp x1, helloworld@PAGE
add x1, x1, helloworld@PAGEOFF
Expand Down
4 changes: 2 additions & 2 deletions clients/drcachesim/tests/allasm_scattergather_x86.asm
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ incorrect_scratch:
lea rsi, incorrect_scratch_str
mov rdx, 18
done_cmp:
mov rdi, 1 // stdout
mov rdi, 2 // stderr
mov eax, 1 // SYS_write
syscall

// Print end message.
mov rdi, 1 // stdout
mov rdi, 2 // stderr
lea rsi, hello_str
mov rdx, 13 // sizeof(hello_str)
mov eax, 1 // SYS_write
Expand Down
4 changes: 2 additions & 2 deletions clients/drcachesim/tests/builtin_prefetch.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* **********************************************************
* Copyright (c) 2020 Google, Inc. All rights reserved.
* Copyright (c) 2020-2025 Google, Inc. All rights reserved.
* **********************************************************/

/*
Expand Down Expand Up @@ -55,6 +55,6 @@ main(void)
__builtin_prefetch(&d, 1, 2);
// L3
__builtin_prefetch(&d, 1, 1);
printf("Hello, world!\n");
fprintf(stderr, "Hello, world!\n");
return 0;
}
20 changes: 20 additions & 0 deletions suite/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3809,6 +3809,16 @@ if (BUILD_CLIENTS)
"${PROJECT_SOURCE_DIR}/clients/drcachesim/tests")
set(tool.drcachesim.${testname}_rawtemp ON) # no preprocessor
set(tool.drcachesim.${testname}_self_serial ON)
if (UNIX)
# Avoid stale pipe files on failure causing retries to time out.
# We delete the file before and after just to be safe.
set(tool.drcachesim.${testname}_runcmp
"${CMAKE_CURRENT_SOURCE_DIR}/runmulti.cmake")
set(tool.drcachesim.${testname}_precmd
"${CMAKE_COMMAND}@-E@remove@${IPC_PREFIX}drtestpipe_${testname}")
set(tool.drcachesim.${testname}_postcmd
"${CMAKE_COMMAND}@-E@remove@${IPC_PREFIX}drtestpipe_${testname}")
endif ()
endmacro (torunonly_drcachesim)

set(config_files_dir ${PROJECT_SOURCE_DIR}/clients/drcachesim/tests)
Expand Down Expand Up @@ -3974,6 +3984,16 @@ if (BUILD_CLIENTS)
"-ipc_name ${IPC_PREFIX}drtestpipe_${testname} ${sim_ops}" "" "${app_args}")
set(tool.${testname}_toolname "drmemtrace")
set(tool.${testname}_basedir "${PROJECT_SOURCE_DIR}/clients/drcachesim/tests")
if (UNIX)
# Avoid stale pipe files on failure causing retries to time out.
# We delete the file before and after just to be safe.
set(tool.${testname}_runcmp
"${CMAKE_CURRENT_SOURCE_DIR}/runmulti.cmake")
set(tool.${testname}_precmd
"${CMAKE_COMMAND}@-E@remove@${IPC_PREFIX}drtestpipe_${testname}")
set(tool.${testname}_postcmd
"${CMAKE_COMMAND}@-E@remove@${IPC_PREFIX}drtestpipe_${testname}")
endif ()
endmacro (torunonly_simtool)

torunonly_simtool(histogram ${ci_shared_app}
Expand Down
2 changes: 1 addition & 1 deletion suite/tests/common/allasm_aarch64_cache.asm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ loop2: // The inner loop steps through the region writing zeroes.
b.cc loop1

// Exit.
mov w0, #1 // stdout
mov w0, #2 // stderr
// XXX: Use asm_defines.asm AARCH64_ADR_GOT()?
#ifdef __APPLE__
adrp x1, alldone@PAGE
Expand Down
8 changes: 4 additions & 4 deletions suite/tests/common/allasm_arm.asm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ _start:
bic sp, sp, #63 // align stack pointer to cache line
mov r3, #4
1:
mov r0, #1 // stdout
mov r0, #2 // stderr
ldr r1, =hello
mov r2, #13 // sizeof(hello)
mov r7, #4 // SYS_write
Expand Down Expand Up @@ -119,7 +119,7 @@ separate_bb:
vqshlu.s64 d3, d9, #13

// exit
mov r0, #1 // stdout
mov r0, #2 // stderr
ldr r1, =alldone
mov r2, #9 // sizeof(alldone)
mov r7, #4 // SYS_write
Expand All @@ -132,7 +132,7 @@ separate_bb:
_print:
mov r2, r1 // size of string
mov r1, r0 // string to print
mov r0, #1 // stdout
mov r0, #2 // stderr
mov r7, #4 // SYS_write
svc 0
bx lr
Expand All @@ -141,7 +141,7 @@ _print_pop_pc:
push {r4-r8,lr}
mov r2, r1 // size of string
mov r1, r0 // string to print
mov r0, #1 // stdout
mov r0, #2 // stderr
mov r7, #4 // SYS_write
svc 0
pop {r4-r8,pc}
Expand Down
8 changes: 4 additions & 4 deletions suite/tests/common/allasm_thumb.asm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ _start:

mov r3, #4
1:
mov r0, #1 // stdout
mov r0, #2 // stderr
ldr r1, =hello
mov r2, #13 // sizeof(hello)
mov r7, #4 // SYS_write
Expand Down Expand Up @@ -284,7 +284,7 @@ addpc_bb:

// exit
_exit:
mov r0, #1 // stdout
mov r0, #2 // stderr
ldr r1, =alldone
mov r2, #9 // sizeof(alldone)
mov r7, #4 // SYS_write
Expand All @@ -297,7 +297,7 @@ _exit:
_print:
mov r2, r1 // size of string
mov r1, r0 // string to print
mov r0, #1 // stdout
mov r0, #2 // stderr
mov r7, #4 // SYS_write
svc 0
bx lr
Expand All @@ -306,7 +306,7 @@ _print_pop_pc:
push {r4-r8,lr}
mov r2, r1 // size of string
mov r1, r0 // string to print
mov r0, #1 // stdout
mov r0, #2 // stderr
mov r7, #4 // SYS_write
svc 0
pop {r4-r8,pc}
Expand Down
2 changes: 1 addition & 1 deletion suite/tests/common/allasm_x86_64.asm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ _start:

mov rbx, 16 // loop counter
loop:
mov rdi, 1 // stdout
mov rdi, 2 // stderr
lea rsi, hello
mov rdx, 13 // sizeof(hello)
mov eax, 1 // SYS_write
Expand Down
Loading