summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2018-08-10 00:22:38 +0930
committerAndrew Jeffery <andrew@aj.id.au>2018-09-12 15:05:51 +0930
commit26558dbb00e439fb6ea18566361c0671ea6133f5 (patch)
tree0b26007acd18ee077cf572f6beca90fc2685bfbb /test
parent55260cef8be6d7630087cf07f9d664fb0b40c7c4 (diff)
downloadphosphor-mboxbridge-26558dbb00e439fb6ea18566361c0671ea6133f5.tar.gz
phosphor-mboxbridge-26558dbb00e439fb6ea18566361c0671ea6133f5.zip
mboxd: Refactor and rename mbox.h to mboxd.h
Refine the purpose of the header file to represent what's required for the daemon itself, not its constituent pieces. Rather, split those definitions out to their respective header files and include them as necessary. Finally the header file is renamed to better reflect its purpose. Change-Id: I48c409f57d96c844589cd865b24f197477dfe87c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Diffstat (limited to 'test')
-rw-r--r--test/bmc_event_ack_v2.c3
-rw-r--r--test/close_window_v2.c2
-rw-r--r--test/create_oversize_window.c2
-rw-r--r--test/create_read_window_v2.c3
-rw-r--r--test/create_write_window_v2.c3
-rw-r--r--test/create_zero_size_window.c2
-rw-r--r--test/flash_copy.c2
-rw-r--r--test/flash_erase.c4
-rw-r--r--test/flash_write.c5
-rw-r--r--test/get_flash_info_v2.c2
-rw-r--r--test/get_mbox_info_v2.c2
-rw-r--r--test/get_mbox_info_v2_timeout.c2
-rw-r--r--test/implicit_flush.c2
-rw-r--r--test/invalid_command.c2
-rw-r--r--test/mark_read_dirty.c2
-rw-r--r--test/mark_write_dirty_v2.c2
-rw-r--r--test/mark_write_erased_v2.c2
-rw-r--r--test/mbox.c2
-rw-r--r--test/mbox.h2
-rw-r--r--test/read_window_cycle.c2
-rw-r--r--test/read_window_mark_write_erased.c2
-rw-r--r--test/read_window_write_flush.c2
-rw-r--r--test/request_high_version.c2
-rw-r--r--test/request_low_version.c2
-rw-r--r--test/reset_state.c2
-rw-r--r--test/sequence_numbers.c2
-rw-r--r--test/write_flush_v2.c2
-rw-r--r--test/write_window_dirty_erase.c2
28 files changed, 36 insertions, 28 deletions
diff --git a/test/bmc_event_ack_v2.c b/test/bmc_event_ack_v2.c
index c9056de..51f026e 100644
--- a/test/bmc_event_ack_v2.c
+++ b/test/bmc_event_ack_v2.c
@@ -7,7 +7,8 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "mbox.h"
+#include "mboxd.h"
+#include "protocol.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/close_window_v2.c b/test/close_window_v2.c
index ae9c7f4..9b646f6 100644
--- a/test/close_window_v2.c
+++ b/test/close_window_v2.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/create_oversize_window.c b/test/create_oversize_window.c
index fa0f99d..2c842cb 100644
--- a/test/create_oversize_window.c
+++ b/test/create_oversize_window.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/create_read_window_v2.c b/test/create_read_window_v2.c
index 12f0208..4e8d1d2 100644
--- a/test/create_read_window_v2.c
+++ b/test/create_read_window_v2.c
@@ -2,8 +2,9 @@
// Copyright (C) 2018 IBM Corp.
#include <assert.h>
+#include <string.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/create_write_window_v2.c b/test/create_write_window_v2.c
index 568735a..b0e246e 100644
--- a/test/create_write_window_v2.c
+++ b/test/create_write_window_v2.c
@@ -2,8 +2,9 @@
// Copyright (C) 2018 IBM Corp.
#include <assert.h>
+#include <string.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/create_zero_size_window.c b/test/create_zero_size_window.c
index 14cff6c..3e936d0 100644
--- a/test/create_zero_size_window.c
+++ b/test/create_zero_size_window.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/flash_copy.c b/test/flash_copy.c
index 565bb0c..08dfc1a 100644
--- a/test/flash_copy.c
+++ b/test/flash_copy.c
@@ -10,7 +10,7 @@
#include <unistd.h>
#include "common.h"
-#include "mbox.h"
+#include "mboxd.h"
#include "flash.h"
#include "test/tmpf.h"
diff --git a/test/flash_erase.c b/test/flash_erase.c
index acbf378..3d299dd 100644
--- a/test/flash_erase.c
+++ b/test/flash_erase.c
@@ -5,12 +5,14 @@
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <linux/types.h>
-#include "mbox.h"
+#include "common.h"
+#include "mboxd.h"
#include "flash.h"
#include "test/tmpf.h"
diff --git a/test/flash_write.c b/test/flash_write.c
index cec6c92..1b55dbe 100644
--- a/test/flash_write.c
+++ b/test/flash_write.c
@@ -2,13 +2,16 @@
// Copyright (C) 2018 IBM Corp.
#include <assert.h>
+#include <mtd/mtd-abi.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <unistd.h>
-#include "mbox.h"
+#include "common.h"
+#include "mboxd.h"
#include "flash.h"
#include "test/tmpf.h"
diff --git a/test/get_flash_info_v2.c b/test/get_flash_info_v2.c
index 7fb3703..36ef8ac 100644
--- a/test/get_flash_info_v2.c
+++ b/test/get_flash_info_v2.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/get_mbox_info_v2.c b/test/get_mbox_info_v2.c
index bcfa2ef..081d3b8 100644
--- a/test/get_mbox_info_v2.c
+++ b/test/get_mbox_info_v2.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/get_mbox_info_v2_timeout.c b/test/get_mbox_info_v2_timeout.c
index c296f5a..f401360 100644
--- a/test/get_mbox_info_v2_timeout.c
+++ b/test/get_mbox_info_v2_timeout.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/implicit_flush.c b/test/implicit_flush.c
index 8c79cff..74275e4 100644
--- a/test/implicit_flush.c
+++ b/test/implicit_flush.c
@@ -4,7 +4,7 @@
#include <assert.h>
#include <sys/mman.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/invalid_command.c b/test/invalid_command.c
index c486dc5..36d0acc 100644
--- a/test/invalid_command.c
+++ b/test/invalid_command.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/mark_read_dirty.c b/test/mark_read_dirty.c
index ea2774a..766e3dc 100644
--- a/test/mark_read_dirty.c
+++ b/test/mark_read_dirty.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/mark_write_dirty_v2.c b/test/mark_write_dirty_v2.c
index 365750f..0c929fe 100644
--- a/test/mark_write_dirty_v2.c
+++ b/test/mark_write_dirty_v2.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/mark_write_erased_v2.c b/test/mark_write_erased_v2.c
index 4698ed3..9c0f172 100644
--- a/test/mark_write_erased_v2.c
+++ b/test/mark_write_erased_v2.c
@@ -4,7 +4,7 @@
#include <assert.h>
#include <sys/mman.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/mbox.c b/test/mbox.c
index 1b14430..6549813 100644
--- a/test/mbox.c
+++ b/test/mbox.c
@@ -13,7 +13,7 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "flash.h"
#include "lpc.h"
#include "transport_mbox.h"
diff --git a/test/mbox.h b/test/mbox.h
index 30d36b6..8c1bff9 100644
--- a/test/mbox.h
+++ b/test/mbox.h
@@ -8,7 +8,7 @@
#include <stdint.h>
#include "common.h"
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "tmpf.h"
diff --git a/test/read_window_cycle.c b/test/read_window_cycle.c
index ec2bc37..8220c63 100644
--- a/test/read_window_cycle.c
+++ b/test/read_window_cycle.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/read_window_mark_write_erased.c b/test/read_window_mark_write_erased.c
index 61e760d..498ac62 100644
--- a/test/read_window_mark_write_erased.c
+++ b/test/read_window_mark_write_erased.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/read_window_write_flush.c b/test/read_window_write_flush.c
index 0131cb8..0f1cace 100644
--- a/test/read_window_write_flush.c
+++ b/test/read_window_write_flush.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/request_high_version.c b/test/request_high_version.c
index 9ffbba4..b8ad7a1 100644
--- a/test/request_high_version.c
+++ b/test/request_high_version.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/request_low_version.c b/test/request_low_version.c
index 7b7abf7..3670f61 100644
--- a/test/request_low_version.c
+++ b/test/request_low_version.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/reset_state.c b/test/reset_state.c
index 05f98d6..7e542a6 100644
--- a/test/reset_state.c
+++ b/test/reset_state.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/sequence_numbers.c b/test/sequence_numbers.c
index 201a5bd..3770a1b 100644
--- a/test/sequence_numbers.c
+++ b/test/sequence_numbers.c
@@ -3,7 +3,7 @@
#include <assert.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/write_flush_v2.c b/test/write_flush_v2.c
index ff1be25..fafa7d0 100644
--- a/test/write_flush_v2.c
+++ b/test/write_flush_v2.c
@@ -4,7 +4,7 @@
#include <assert.h>
#include <sys/mman.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
diff --git a/test/write_window_dirty_erase.c b/test/write_window_dirty_erase.c
index 9bc25e7..e839890 100644
--- a/test/write_window_dirty_erase.c
+++ b/test/write_window_dirty_erase.c
@@ -4,7 +4,7 @@
#include <assert.h>
#include <sys/mman.h>
-#include "mbox.h"
+#include "mboxd.h"
#include "transport_mbox.h"
#include "test/mbox.h"
OpenPOWER on IntegriCloud