Skip to content

Commit 9d70540

Browse files
fix build
1 parent 3574184 commit 9d70540

File tree

7 files changed

+23
-121
lines changed

7 files changed

+23
-121
lines changed

.github/workflows/tests.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,6 @@ jobs:
141141
source /opt/${{ matrix.compiler }}/${{ matrix.compiler }}-${{ matrix.compiler-version }}/activate
142142
make run-test-vectors
143143
144-
- name: run solcap tests
145-
if: ${{ matrix.run-unit-tests && matrix.test-case == 'native' }}
146-
run: |
147-
sudo prlimit --pid $$ --memlock=-1:-1
148-
source /opt/${{ matrix.compiler }}/${{ matrix.compiler }}-${{ matrix.compiler-version }}/activate
149-
DUMP=../dump make run-solcap-tests
150-
151144
- name: run integration tests
152145
if: ${{ matrix.run-integration-tests }}
153146
run: |

config/everything.mk

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -463,11 +463,6 @@ LLVM_PROFILE_FILE="$(OBJDIR)/cov/raw/test_vectors-%p.profraw" \
463463
LOG_PATH="$(OBJDIR)/log/fd-test-vectors-report" \
464464
contrib/test/run_test_vectors.sh
465465

466-
run-solcap-tests: bin unit-test
467-
OBJDIR=$(OBJDIR) \
468-
MACHINE=$(MACHINE) \
469-
contrib/test/run_solcap_tests.sh
470-
471466
seccomp-policies:
472467
$(FIND) . -name '*.seccomppolicy' -exec $(PYTHON) contrib/codegen/generate_filters.py {} \;
473468

contrib/test/run_solcap_tests.sh

Lines changed: 0 additions & 86 deletions
This file was deleted.

src/app/firedancer/topology.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@ fd_topo_configure_tile( fd_topo_tile_t * tile,
14111411
tile->bundle.tls_cert_verify = !!config->tiles.bundle.tls_cert_verify;
14121412

14131413
} else if( FD_UNLIKELY( !strcmp( tile->name, "vinyl" ) ) ) {
1414-
1414+
14151415
} else if( FD_UNLIKELY( !strcmp( tile->name, "captur" ) ) ) {
14161416

14171417
tile->capctx.capture_start_slot = config->capture.capture_start_slot;

src/discof/capture/fd_capture_tile.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
recent_slots_per_file configuration. The default is 128 slots per
6161
file. The files are named recent_0.solcap, recent_1.solcap,. The
6262
files are rotated when the current file reaches the number of slots
63-
per file.
63+
per file.
6464
*/
6565

6666
struct fd_capture_tile_ctx {
@@ -122,10 +122,10 @@ populate_allowed_seccomp( fd_topo_t const * topo,
122122
struct sock_filter * out ) {
123123
void * scratch = fd_topo_obj_laddr( topo, tile->tile_obj_id );
124124
fd_capture_tile_ctx_t const * ctx = (fd_capture_tile_ctx_t const *)scratch;
125-
125+
126126
uint solcap_fd_0 = ctx->recent_only ? (uint)ctx->recent_fds[0] : (uint)ctx->fd;
127127
uint solcap_fd_1 = ctx->recent_only ? (uint)ctx->recent_fds[1] : (uint)ctx->fd;
128-
128+
129129
populate_sock_filter_policy_fd_capture_tile( out_cnt,
130130
out,
131131
(uint)fd_log_private_logfile_fd(),
@@ -141,13 +141,13 @@ populate_allowed_fds( fd_topo_t const * topo,
141141
int * out_fds ) {
142142
void * scratch = fd_topo_obj_laddr( topo, tile->tile_obj_id );
143143
fd_capture_tile_ctx_t const * ctx = (fd_capture_tile_ctx_t const *)scratch;
144-
144+
145145
ulong out_cnt = 0UL;
146146

147147
out_fds[ out_cnt++ ] = 2; /* stderr */
148148
if( FD_LIKELY( -1!=fd_log_private_logfile_fd() ) )
149149
out_fds[ out_cnt++ ] = fd_log_private_logfile_fd();
150-
150+
151151
if( ctx->recent_only ) {
152152
/* In recent_only mode, allow both flip-flop file descriptors */
153153
if( FD_LIKELY( -1!=ctx->recent_fds[0] ) )
@@ -226,7 +226,7 @@ fd_capctx_buf_process_msg(fd_capture_tile_ctx_t * ctx,
226226
- SOM (Start of Message): Set on the first fragment of a message
227227
- EOM (End of Message): Set on the last fragment of a message
228228
229-
For a single-fragment message:
229+
For a single-fragment message:
230230
Single Fragment: SOM=1, EOM=1
231231
For a multi-fragment message:
232232
First fragment: SOM=1, EOM=0
@@ -310,8 +310,8 @@ returnable_frag( fd_capture_tile_ctx_t * ctx,
310310
int next_fd = ctx->recent_fds[next_idx];
311311

312312
/* The following is a series of checks to ensure the file is
313-
synced and truncated correctly. This occurs via:
314-
1. Syncing the current file
313+
synced and truncated correctly. This occurs via:
314+
1. Syncing the current file
315315
2. Syncing the next file
316316
3. Truncating the next file
317317
4. Resetting the file descriptor position to 0
@@ -321,7 +321,7 @@ returnable_frag( fd_capture_tile_ctx_t * ctx,
321321
FD_TEST( fsync( next_fd ) == 0 );
322322
FD_TEST( ftruncate( next_fd, 0L ) == 0 );
323323
FD_TEST( lseek( next_fd, 0L, SEEK_SET ) == 0L );
324-
324+
325325
fd_solcap_writer_init( ctx->capture_ctx->capture, next_fd );
326326
ctx->recent_current_idx = next_idx;
327327
ctx->recent_file_start_slot = msg_hdr->slot;
@@ -386,41 +386,41 @@ privileged_init( fd_topo_t * topo,
386386
/* recent_only=1: Ensure path is a directory, create if not exists */
387387
if( stat_result != 0 ) {
388388
if( FD_UNLIKELY( mkdir(tile->capctx.solcap_capture, 0755) != 0 ) ) {
389-
FD_LOG_ERR(( "solcap_recent_only=1 but could not create directory: %s (%i-%s)",
389+
FD_LOG_ERR(( "solcap_recent_only=1 but could not create directory: %s (%i-%s)",
390390
tile->capctx.solcap_capture, errno, strerror(errno) ));
391391
}
392392
} else if( FD_UNLIKELY( !S_ISDIR(path_stat.st_mode) ) ) {
393393
FD_LOG_ERR(( "solcap_recent_only=1 but path is not a directory: %s", tile->capctx.solcap_capture ));
394394
}
395-
395+
396396
ctx->recent_current_idx = 0;
397397
ctx->recent_file_start_slot = 0UL; /* Will be set on first fragment */
398-
398+
399399
for( ulong i = 0; i < 2; i++ ) {
400400
char filepath[PATH_MAX];
401401
int ret = snprintf( filepath, PATH_MAX, "%s/recent_%lu.solcap", tile->capctx.solcap_capture, i );
402402
if( FD_UNLIKELY( ret<0 || ret>=PATH_MAX ) ) {
403403
FD_LOG_ERR(( "snprintf failed or path too long for recent file %lu", i ));
404404
}
405-
405+
406406
ctx->recent_fds[i] = open( filepath, O_RDWR | O_CREAT | O_TRUNC, 0644 );
407407
if( FD_UNLIKELY( ctx->recent_fds[i] == -1 ) ) {
408-
FD_LOG_ERR(( "failed to open or create solcap recent file %s (%i-%s)",
408+
FD_LOG_ERR(( "failed to open or create solcap recent file %s (%i-%s)",
409409
filepath, errno, strerror(errno) ));
410410
}
411411
}
412-
412+
413413
ctx->fd = ctx->recent_fds[0];
414-
414+
415415
} else {
416416
/* recent_only=0: Validate that path is a file*/
417417
if( FD_UNLIKELY( stat_result == 0 && S_ISDIR(path_stat.st_mode) ) ) {
418418
FD_LOG_ERR(( "solcap_recent_only=0 but path is a directory: %s (should be a file path)", tile->capctx.solcap_capture ));
419419
}
420-
420+
421421
ctx->fd = open( tile->capctx.solcap_capture, O_RDWR | O_CREAT | O_TRUNC, 0644 );
422422
if( FD_UNLIKELY( ctx->fd == -1 ) ) {
423-
FD_LOG_ERR(( "failed to open or create solcap capture file %s (%i-%s)",
423+
FD_LOG_ERR(( "failed to open or create solcap capture file %s (%i-%s)",
424424
tile->capctx.solcap_capture, errno, strerror(errno) ));
425425
}
426426
}

src/discof/replay/fd_exec.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct fd_exec_txn_exec_msg {
2222
ulong txn_idx;
2323
fd_txn_p_t txn;
2424

25-
/* Used currently by solcap to maintain ordering of messages
25+
/* Used currently by solcap to maintain ordering of messages
2626
this is a hack for v2.0, will change to using txn sigs eventually */
2727
ulong capture_txn_idx;
2828
};

src/flamenco/runtime/tests/fd_sol_compat.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ sol_compat_setup_runner( fd_solfuzz_runner_options_t const * options ) {
4545
FD_LOG_NOTICE(( "Logging to solcap file %s", solcap_path ));
4646

4747
void * solcap_mem = fd_wksp_alloc_laddr( runner->wksp, fd_solcap_writer_align(), fd_solcap_writer_footprint(), 1UL );
48-
runner->solcap = fd_solcap_writer_new( solcap_mem );
48+
runner->solcap = (fd_solcap_writer_t *)solcap_mem;
4949
FD_TEST( runner->solcap );
50-
FD_TEST( fd_solcap_writer_init( solcap_mem, fd ) );
50+
FD_TEST( fd_solcap_writer_init( runner->solcap, fd ) );
5151
}
5252

5353
return runner;
@@ -57,7 +57,7 @@ static void
5757
sol_compat_cleanup_runner( fd_solfuzz_runner_t * runner ) {
5858
/* Cleanup test runner */
5959
if( runner->solcap ) {
60-
fd_wksp_free_laddr( fd_solcap_writer_delete( runner->solcap ) );
60+
fd_wksp_free_laddr( runner->solcap );
6161
runner->solcap = NULL;
6262
if( runner->solcap_file ) {
6363
close( (int)(ulong)runner->solcap_file );

0 commit comments

Comments
 (0)