Commit graph

105 commits

Author SHA1 Message Date
f4e9b80737 Minor refactor and formatting changes 2024-02-11 01:09:21 -05:00
a988a7877e If hardlink exists, remove it before attempting to recreate it 2023-12-19 06:59:57 -05:00
Nathan Fisher
0132e493e4 Add tests for hardlink nodes 2023-12-01 16:03:31 -05:00
Nathan Fisher
3cb0883b4a Fix previous commit by saving file; 2023-11-20 19:10:15 -05:00
Nathan Fisher
ddddeebc59 Add try_pop method for haggis_mq 2023-11-20 19:09:05 -05:00
Nathan Fisher
a7a0f6542d Add test for extracting soft links and fix errors; Fix error in extracting fifo nodes if file exists; 2023-11-20 19:05:11 -05:00
Nathan Fisher
de23c4c4cb Add test for extracting file nodes 2023-11-12 19:04:40 -05:00
935cda6ef7 Fix some tests for FreeBSD 2023-10-17 20:58:48 -04:00
Nathan Fisher
5a769bc36c Remove include added by editor; Make sure to call pthread_cond_broadcast after pushing to mq in order to unblock threads; 2023-10-05 12:50:26 -04:00
ccb742e80e Add test for fifo node extraction 2023-10-05 10:40:12 -04:00
ba69c2b8e9 Add test for extracting directory nodes 2023-10-04 10:48:40 -04:00
d63b9f29d0 Send DevNodeSkipped message type when extracting device nodewithout root
priv
2023-10-03 13:16:25 -04:00
374de790a7 Clean up and label includes 2023-10-03 13:04:50 -04:00
Nathan Fisher
7b94a728ae Get device file ezxtraction working and tested 2023-10-03 01:53:59 -04:00
349c9389dd Flush and close file descriptor after write when extracting a file node;
Remove #include directives automatically added by editor which only
exist on Linux;
2023-09-22 10:16:53 -04:00
Nathan Fisher
2bc5861dc0 Wrote the extract_node functionality; TODO: test it; 2023-09-21 22:58:32 -04:00
58ba56f852 Progress on extracting nodes 2023-09-19 20:46:48 -04:00
Nathan Fisher
2e8e2e9a28 Update function parameters in man page 2023-09-19 00:40:14 -04:00
Nathan Fisher
26dbb9154c Add message queue as parameter when creating nodes; Begin splitting
`create_node` function up into helper functions;
2023-09-19 00:34:27 -04:00
Nathan Fisher
ba46a2e048 Fix haggis_mq_pop function to return the EndOfArchive message while
leaving it in place for the next thread. Previously it was returning
'NULL' upon encountering this message type.
2023-09-18 18:28:40 -04:00
7ac9d7f973 Add mq tests; TODO: Find and fix segfault when popping last message; 2023-09-18 10:43:34 -04:00
Nathan Fisher
13d7682861 Added message queue in mq.c 2023-09-17 19:09:44 -04:00
Nathan Fisher
ec6efebd01 test/create_dev-node.c - check device major and minor numbers conditionally depending on OS; 2023-09-16 22:33:09 -04:00
Nathan Fisher
ad3d5dfddc Add create_file_node test; Ensure fifo is unique in create_fifo_node
test
2023-09-16 18:58:41 -04:00
Nathan Fisher
d12eb47b25 Add tests for creating fifo and device nodes 2023-09-15 19:15:01 -04:00
Nathan Fisher
7671e9e29e Add test for creating a symlink node and change to using lstat
instead of `stat` to check file type.
2023-09-15 01:49:16 -04:00
Nathan Fisher
ee7c9b1b5d Change linkmap structure to handle collisions by placing into the
next free bucket rather than by using a linked list structure. Fix
bug where the filename was being freed in linkmap buckets, even
though the data was owned by the caller.
2023-09-14 22:17:11 -04:00
826df41c01 Three small fixes 2023-09-13 16:48:56 -04:00
3cc22ed428 Add create_dir_node test 2023-09-13 16:41:59 -04:00
37d0668a2f Use echo -e in test/Makefile instead of printf 2023-09-13 16:06:20 -04:00
Nathan Fisher
68871dcc7f Add color formatting for summary line after tests 2023-08-28 22:44:35 -04:00
981b4a24f3 Add manpages to make install 2023-08-28 20:50:29 -04:00
1e6b8b9952 Merge branch 'odin' of git.hitchhiker-linux.org:jeang3nie/seahag into odin 2023-08-28 20:35:26 -04:00
ccaeb67544 Begin man pages 2023-08-28 20:35:02 -04:00
Nathan Fisher
58d620a977 Makefile adjustments to get ready for adding docs 2023-08-24 00:35:39 -04:00
Nathan Fisher
6ddcbd7a96 Remove includes added by lsp server; Check in confg.mk; 2023-08-24 00:18:13 -04:00
7e621cb64f Properly init filename when creating node 2023-08-23 14:05:32 -04:00
d8379df818 Move certain vars into config.mk 2023-08-22 22:47:15 -04:00
f05040ff2b Add test for get_or_add for linkmap 2023-08-22 22:37:59 -04:00
0a210b4e7e Fix UB in load_sha256 test caused by accessing incorrect union field 2023-08-22 13:17:54 -04:00
a8fcdbd140 Merge branch 'odin' of git.hitchhiker-linux.org:jeang3nie/seahag into odin 2023-08-22 03:28:04 -04:00
4cf22a1373 Fix NetBSD compilation 2023-08-22 03:27:03 -04:00
Nathan Fisher
29cc81ccae Add test for linkmap init/deinit; Fix bug in linkmap deinit; 2023-08-19 19:42:00 -04:00
Nathan Fisher
da412f754c Remove unneeded #include for stddef.h 2023-08-18 12:42:16 -04:00
Nathan Fisher
ed9648ff78 Replace linklist with linkmap and remove former completely. Also
remove generic hashmap implementation in favor of linkmap.
2023-08-18 12:37:24 -04:00
e372af0c42 Return a valid target when adding to linkmap if it exists 2023-08-18 11:00:30 -04:00
e266346bf2 Insert new buckets into linked list for for linkmap 2023-08-18 10:42:29 -04:00
Nathan Fisher
6a58dd2a63 Ensure we find a bucket for storing link info after hash collisions; Fix
`install` make target by adding path to `haggis.h`
2023-08-18 00:23:02 -04:00
Nathan Fisher
4149c4275f Left comment note for required functionality 2023-08-17 23:28:25 -04:00
Nathan Fisher
fcdcd40e95 Add haggis_linkmap_get_or_add 2023-08-17 23:26:53 -04:00