summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* create_pnor_partition_table: Extract helper for vpnor treesAndrew Jeffery2018-03-241-19/+44
| | | | | | | | | | | | | | | | The helper function makes use of parseTocLine() which we just spent a bunch of effort on extracting from the Table class. This means the tests and the daemon both share the same parsing code, and thus the same bugs. By passing in an array of ToC line strings we can have enough information to populate a directory tree of test zeroed out files in the read-only directory and write the corresponding ToC file. This way when the code under test is pointed at the read-only directory it can correctly construct the environment dictated by the test code and begin servicing access requests. Change-Id: I229393be5f53913c9f61102bbb5f8f7f9177c39e Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* misc: Replace license blurb with kernel-style SPDX markersAndrew Jeffery2018-03-2434-612/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was roughly achieved by the following shell script: $ git ls-files | grep '\.[ch]p*$' | while read F; do EXT=${F##*.}; cat spdx.$EXT <(sed '/^\/\*$/,/^ \*\/$/d' $F) > ${F}.tmp; mv ${F}.tmp $F; done With the following context: $ cat spdx.c // SPDX-License-Identifier: Apache-2.0 // Copyright (C) 2018 IBM Corp. $ cat spdx.h /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright (C) 2018 IBM Corp. */ $ ls -l spdx.* -rw-r--r-- 1 andrew andrew 71 Feb 27 12:02 spdx.c lrwxrwxrwx 1 andrew andrew 6 Feb 27 12:02 spdx.cpp -> spdx.c -rw-r--r-- 1 andrew andrew 77 Feb 27 12:02 spdx.h lrwxrwxrwx 1 andrew andrew 6 Feb 27 12:02 spdx.hpp -> spdx.h The `sed` invocation catches a lot of function documentation, so the hunks were manually added to avoid removing information that we want to keep. Change-Id: I63e49ca2593aa0db0568c7a63bfdead388642e76 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* misc: Add license blurb to unlicensed filesAndrew Jeffery2018-03-243-0/+55
| | | | | | | | | | | | | | | This was roughly achieved with: $ git ls-files | grep '.[ch]p*$' | while read F; do head -n 1 $F | fgrep -v '/*' > /dev/null && echo $F; done | while read L; do cat apache $L > ${L}.tmp; mv ${L}.tmp ${L}; done Some fixups performed by hand to eliminate modifications to files that were hit which should not have been. Change-Id: I9fa5af4644687d8b595a6cf70d6f7575a767d11a Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Move related tests to vpnor directoryAndrew Jeffery2018-03-245-76/+76
| | | | | Change-Id: I5fe7f625ad642cef17fe53bd244dcde8fd99f3ad Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Move tests to a separate Makefile fragmentAndrew Jeffery2018-03-241-0/+178
| | | | | Change-Id: I46d5b165ed668ace67ae237b16d65a24586dd87d Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* Format C++ files according to OpenBMC style guideAndrew Jeffery2018-03-193-61/+51
| | | | | | | We don't touch the C yet as upstream hasn't got such a change in place. Change-Id: Ie6cab4bf99df520bb6655b9b00ae31e762e3c57b Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: system: Return memory size rather than mtd size in LPC ioctlAndrew Jeffery2018-03-191-1/+1
| | | | | | | | | The old behaviour was an outright bug in the system framework. The size of the LPC reserved memory window has nothing to do with the size of the flash. Change-Id: Ie16686ac6df8fb3117fb46aa2eaab082873fd4d0 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: mbox: Type buf parameter to dump_buf() as `const void *`Andrew Jeffery2018-03-192-3/+4
| | | | | | | | This makes it a bit more ergonomic to use by not forcing the caller to cast. Change-Id: I5d40715f4de84f174157a39d459dc1b40a94a949 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Update tmpf to store data in /tmp, reformat namesAndrew Jeffery2018-03-196-7/+22
| | | | | | | | | Cleans up residuals from failed tests in the source tree by moving them to /tmp. Some were annoying to remove with prefixes like 'mbox', so change the pattern as well to include '-store'. Change-Id: I674664a372e7e15ec4c3cd93d33318c4135f33ba Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Fix memory leak in write_flash_vpnorAndrew Jeffery2018-02-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running the test suite when configuring the source via `./bootstrap.sh dev` leads to a failure of the write_flash_vpnor test with the report below in test-suite.log. Add the necessary cleanup to ensure the test suite passes cleanly. =================================== mboxd 2.1.0: ./test-suite.log =================================== .. contents:: :depth: 2 FAIL: test/write_flash_vpnor ============================ [ 1519173867.854683139] Write flash @ 0x00003000 for 0x00000008 from 0x7ffe94d51ae0 [ 1519173867.854904248] Didn't find the file in the desired partition so copying[/tmp/prsv.RY6KiO/TEST3] [ 1519173867.854979940] File copied from[/tmp/ro.dUeyxG/TEST3] to [/tmp/prsv.RY6KiO/TEST3] [ 1519173867.855082198] Write flash @ 0x00001000 for 0x00000008 from 0x7ffe94d51ae0 [ 1519173867.857098822] Write flash @ 0x00002000 for 0x00000008 from 0x7ffe94d51ae0 [ 1519173867.857249802] Write flash @ 0x00002003 for 0x0000001c from 0x7ffe94d51ae0 [ 1519173867.857806832] Write flash @ 0x00002000 for 0x00000008 from 0x7ffe94d51ae0 [ 1519173867.857955823] Write flash @ 0x00002000 for 0x00000001 from 0x7ffe94d51ae0 [ 1519173867.858045089] Write flash @ 0x00002001 for 0x00000001 from 0x7ffe94d51ae1 [ 1519173867.858120016] Write flash @ 0x00002002 for 0x00000001 from 0x7ffe94d51ae2 [ 1519173867.858273459] Write flash @ 0x00002000 for 0x00000008 from 0x7ffe94d51b20 [ 1519173867.855134488] Can't open the RO partition for write[ 1519173867.857323229] Offset is beyond the partition file length[0x00000008] ================================================================= ==15139==ERROR: LeakSanitizer: detected memory leaks Direct leak of 8 byte(s) in 1 object(s) allocated from: #0 0x7f98b42f6458 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0458) #1 0x56371c4cb52f in vpnor_create_partition_table_from_path /home/andrew/src/openbmc/phosphor-mboxd/mboxd_pnor_partition_table.cpp:40 #2 0x56371c502013 in main test/write_flash_vpnor.cpp:145 #3 0x7f98b225b1c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0) Direct leak of 2 byte(s) in 1 object(s) allocated from: #0 0x7f98b42f4d38 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded38) #1 0x56371c5003b6 in init(mbox_context*) test/write_flash_vpnor.cpp:115 #2 0x56371c501c36 in main test/write_flash_vpnor.cpp:137 #3 0x7f98b225b1c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0) Indirect leak of 4096 byte(s) in 1 object(s) allocated from: #0 0x7f98b42f6458 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0458) #1 0x56371c3fa0c0 in __gnu_cxx::new_allocator<unsigned char>::allocate(unsigned long, void const*) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x2850c0) #2 0x56371c3f3483 in std::allocator_traits<std::allocator<unsigned char> >::allocate(std::allocator<unsigned char>&, unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x27e483) #3 0x56371c3ebf6c in std::_Vector_base<unsigned char, std::allocator<unsigned char> >::_M_allocate(unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x276f6c) #4 0x56371c3e3aa4 in std::vector<unsigned char, std::allocator<unsigned char> >::_M_default_append(unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x26eaa4) #5 0x56371c3d82c5 in std::vector<unsigned char, std::allocator<unsigned char> >::resize(unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x2632c5) #6 0x56371c3c623d in openpower::virtual_pnor::endianFixup(std::vector<unsigned char, std::allocator<unsigned char> > const&) /home/andrew/src/openbmc/phosphor-mboxd/pnor_partition_table.cpp:268 #7 0x56371c3c2366 in openpower::virtual_pnor::partition::Table::Table(std::experimental::filesystem::v1::__cxx11::path&&, unsigned long, unsigned long) /home/andrew/src/openbmc/phosphor-mboxd/pnor_partition_table.cpp:38 #8 0x56371c4cb844 in vpnor_create_partition_table_from_path /home/andrew/src/openbmc/phosphor-mboxd/mboxd_pnor_partition_table.cpp:45 #9 0x56371c502013 in main test/write_flash_vpnor.cpp:145 #10 0x7f98b225b1c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0) Indirect leak of 4096 byte(s) in 1 object(s) allocated from: #0 0x7f98b42f6458 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0458) #1 0x56371c3fa0c0 in __gnu_cxx::new_allocator<unsigned char>::allocate(unsigned long, void const*) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x2850c0) #2 0x56371c3f3483 in std::allocator_traits<std::allocator<unsigned char> >::allocate(std::allocator<unsigned char>&, unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x27e483) #3 0x56371c3ebf6c in std::_Vector_base<unsigned char, std::allocator<unsigned char> >::_M_allocate(unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x276f6c) #4 0x56371c3e3aa4 in std::vector<unsigned char, std::allocator<unsigned char> >::_M_default_append(unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x26eaa4) #5 0x56371c3d82c5 in std::vector<unsigned char, std::allocator<unsigned char> >::resize(unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x2632c5) #6 0x56371c3d1b40 in openpower::virtual_pnor::partition::Table::allocateMemory(std::experimental::filesystem::v1::__cxx11::path const&) /home/andrew/src/openbmc/phosphor-mboxd/pnor_partition_table.cpp:78 #7 0x56371c3c3006 in openpower::virtual_pnor::partition::Table::preparePartitions() /home/andrew/src/openbmc/phosphor-mboxd/pnor_partition_table.cpp:165 #8 0x56371c3c2216 in openpower::virtual_pnor::partition::Table::Table(std::experimental::filesystem::v1::__cxx11::path&&, unsigned long, unsigned long) /home/andrew/src/openbmc/phosphor-mboxd/pnor_partition_table.cpp:36 #9 0x56371c4cb844 in vpnor_create_partition_table_from_path /home/andrew/src/openbmc/phosphor-mboxd/mboxd_pnor_partition_table.cpp:45 #10 0x56371c502013 in main test/write_flash_vpnor.cpp:145 #11 0x7f98b225b1c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0) Indirect leak of 432 byte(s) in 3 object(s) allocated from: #0 0x7f98b42f6458 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0458) #1 0x56371c5176b0 in void std::vector<std::experimental::filesystem::v1::__cxx11::path::_Cmpt, std::allocator<std::experimental::filesystem::v1::__cxx11::path::_Cmpt> >::_M_realloc_insert<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::experimental::filesystem::v1::__cxx11::path::_Type, unsigned long&>(__gnu_cxx::__normal_iterator<std::experimental::filesystem::v1::__cxx11::path::_Cmpt*, std::vector<std::experimental::filesystem::v1::__cxx11::path::_Cmpt, std::allocator<std::experimental::filesystem::v1::__cxx11::path::_Cmpt> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::experimental::filesystem::v1::__cxx11::path::_Type&&, unsigned long&) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x3a26b0) Indirect leak of 144 byte(s) in 1 object(s) allocated from: #0 0x7f98b42f6458 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0458) #1 0x56371c4cb74b in vpnor_create_partition_table_from_path /home/andrew/src/openbmc/phosphor-mboxd/mboxd_pnor_partition_table.cpp:45 #2 0x56371c502013 in main test/write_flash_vpnor.cpp:145 #3 0x7f98b225b1c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0) SUMMARY: AddressSanitizer: 8778 byte(s) leaked in 8 allocation(s). FAIL test/write_flash_vpnor (exit status: 1) Change-Id: I7d1a5262833146794e0298084e828e14821041b7 Fixes: openbmc/openbmc#2866 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* vpnor table: Set base address to actual offsetAdriana Kobylak2017-11-303-7/+9
| | | | | | | | | | | | | | | | | | | | | The base address for the partitions is used by mboxd to find requested partitions, and for simplicity it's just a continous number sequence. But this data is used by the host as the partition offsets, which are expected to match to the offsets in the openpower xml: https://github.com/open-power/pnor/blob/21d66daff697f8c13fb067340ca621e9208ab1ea/p9Layouts/defaultPnorLayout_64.xml This xml pnor layout has empty spaces in between the partitions, ex: part ends at address 0x2000 and the next partition HBEL starts at 0x8000. Need to set base address to the actual offset that corresponds to the xml file, so that the host traces that display the partition offsets match the data in documented in the xml. This doesn't affect the memory address allocation. Part of openbmc/openbmc#2677 Change-Id: Ica142129aabd195655018a84f9a993596c333457 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* vpnor: Add patch locationAdriana Kobylak2017-08-021-1/+51
| | | | | | | | | | | | | Look for the requested partition in the designated patch location (/usr/local/share/pnor/). If the partition is not found there, continue with the existing logic of looking in the other partition directories. This allows users to use patches in the virtual pnor implementation. Resolves openbmc/openbmc#1551 Change-Id: I7f27dfc9cd69a3f8ab88cb6fa77b2c1096e32841 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* vpnor: add partition version check to the TOCDeepak Kodihalli2017-07-191-1/+2
| | | | | Change-Id: If5497476f03484334396e483e251b1e9434137f3 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* vpnor: make PNOR block size configurableDeepak Kodihalli2017-07-191-2/+4
| | | | | | | | The vpnor code would assume a PNOR FFS block size of 4K. Make it possible to supply this value, since it needn't always be 4K. Change-Id: I21463b05f1047e93705ba82d46f746056568dcc5 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* test: write the vpnor file(flash)Ratan Gupta2017-06-291-0/+217
| | | | | | | | | | | | | | Add the test binary which runs the following test cases 1) Write to the read only partition 2) Write to the RW partition 3) Write to the preserved partition. 4) Write beyond the partition file length. 5) other boundary test cases. Resolves openbmc/openbmc#1479 Change-Id: Ifd4f0e89e434a26e2579415a973fe1bfdbb3e66f Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Read the partition file from the vpnor.Ratan Gupta2017-06-291-1/+5
| | | | | | | | | This fix reads the file from the partition, Memory map to it and then copy the asked memory area to the reserved memory area. Change-Id: I4b2987e628bc4820edfeb1b0a81e5d1cbb8e7cf1 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Read/write window property defines FFS partition file location.Ratan Gupta2017-06-291-0/+2
| | | | | | | | | | | | | | | | | | | | | The BMC loads the PNOR partitions in a read-only volume. So after that there are following two cases: Read: Tries to open the file in read only mode from the partition(READONLY/READWRITE/PRESERVED), Partition Table tells the partition type depends on the offset. if file is not there in the mapped partition then tries to open the file from the read only partition. Write: Tries to open the file in write mode from the partition(READWRITE/PRESERVED), if file is not there in the mapped partition then mailbox daemon will copy the requested partition to the read-write volume to make changes to it. Change-Id: Ic0ef882380b56536ac55feae3ec563de95fdd4a6 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* test: read window from partition fileRatan Gupta2017-06-291-0/+89
| | | | | | | Resolves openbmc/openbmc#1440 Change-Id: I8e6ae35e4c5ba2936a578349e6cea464de6ab40d Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* pnor : generate partition tableDeepak Kodihalli2017-06-271-0/+76
| | | | | | | | | | | | | | Implement a class that, upon construction, generates the virtual PNOR partition table. The virtual PNOR is typically a subset of the full PNOR image, by choosing partitions of interest. The generation is based on upon information read from the PNOR partition files and table of contents (toc) file. Provide an interface to the virtual PNOR partition table. Change-Id: I7a68e3833b8cf66e92eb6ca274f6a3c376ce0add Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Make the code compatible with c++ compilerRatan Gupta2017-06-021-1/+1
| | | | | | | | | | | | | | | if we write "int i;" in header file, c compiler treats as a tentative definition while c++ compiler treats as a definition. so when two cpp file includes the same header file then during linking time compiler says that there are multiple definitions. so to overcome this problem we are declaring it as extern and defining it in the corresponding c file. Change-Id: I91378c4c587414edf35f8313f2497268be36e2f4 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* test: Set mbox_vlog in tests so we don't segfaultSuraj Jitindar Singh2017-05-043-0/+6
| | | | | | | | | | | | | | mbox_vlog contains the function pointer for the logging function called in MSG_<ERR/INFO/DEBUG>. Currently we don't set it in the <write/copy/erase>_flash tests meaning if there is any test output that we try to dereference a null pointer and thus segfault. Set it in these tests so that we can get test output which can be useful for debugging and most importantly so that we don't segfault which is annoying... Change-Id: If91725ded0ee5d6c3ab0a8925126065ec43b0cc3 Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
* tests: Add test for timeout argument in GET_MBOX_INFOSuraj Jitindar Singh2017-05-041-0/+65
| | | | | | | | | | | | Add a test to check the value returned in the suggested timeout field in the response of GET_MBOX_INFO for a window size >= 1MB. It is worth noting that existing test cases will continue to pass since a window size < 1MB will have zero for the suggested timeout which is what is expected in this field for all existing tests. Change-Id: I4fb4903817b63a8c201af4142d429b7b21881848 Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
* test: Add sequence_numbersAndrew Jeffery2017-04-261-0/+107
| | | | | Change-Id: Ida6123bf27445f0fb65099fbf6d9520344d33f10 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add read_window_cycleAndrew Jeffery2017-04-261-0/+90
| | | | | Change-Id: Iaa967b7e0732ebc0322ea89e74861a5bedb34867 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add invalid_commandAndrew Jeffery2017-04-261-0/+91
| | | | | Change-Id: I42bc056e5c6b6fdd078bc622e40db39583b53c64 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add write_window_dirty_eraseAndrew Jeffery2017-04-261-0/+167
| | | | | Change-Id: I16d2488e75dde619da39d755e00666bc24778217 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add read_window_mark_write_erasedAndrew Jeffery2017-04-261-0/+82
| | | | | Change-Id: I40e3e29e8064f7ec156cdfd579071563d1cc35c3 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add read_window_write_flushAndrew Jeffery2017-04-261-0/+81
| | | | | Change-Id: I17b237f66e57a40df136d47e2e963eae4c3de535 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add mark_read_dirtyAndrew Jeffery2017-04-261-0/+80
| | | | | Change-Id: I7ab43db7d69b0f085574b40701d48dfa99f00856 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add request_low_versionAndrew Jeffery2017-04-261-0/+62
| | | | | Change-Id: Ia2ce45977b2735663e9745e1da72378df5819a01 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add request_high_versionAndrew Jeffery2017-04-261-0/+60
| | | | | | | | | The test identified a flaw in the implementation and lack of clarity in the documentation when compared with Ben's intent and what was discussed with AMI. Change-Id: I1722b1cc8b005cef77fc48f6583ca0e2553ed2f1 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add implicit_flushAndrew Jeffery2017-04-261-0/+166
| | | | | Change-Id: Ib64fe711e7e7922ad90cb8e9a84972df4cbc5b2d Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add create_zero_size_windowAndrew Jeffery2017-04-261-0/+73
| | | | | Change-Id: I59f3c1e92b519d4f52b6d4fe031d425f161e4dd3 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add create_oversize_windowAndrew Jeffery2017-04-261-0/+73
| | | | | Change-Id: I944046be71b6973e8bd1760678fcfaea39d7bc12 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add bmc_event_ack_v2Andrew Jeffery2017-04-261-0/+74
| | | | | Change-Id: Id6966ce54ddfdc2c2ec3933c0dde12451223a61c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add mark_write_erased_v2Andrew Jeffery2017-04-261-0/+106
| | | | | Change-Id: I74f98b63f9971b53a90b4cc8e81ebeddaec1431d Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add write_flush_v2Andrew Jeffery2017-04-261-0/+161
| | | | | Change-Id: I567be3c016f6d96bb5e7b36342e162dfdff2f836 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add mark_write_dirty_v2Andrew Jeffery2017-04-261-0/+82
| | | | | Change-Id: I9a6fe86eff739c8bf377e7a700e79e8d28b90361 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add close_window_v2Andrew Jeffery2017-04-261-0/+124
| | | | | Change-Id: I2ca90440333f1b06c408884f59af22ab0f9c596d Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add create_write_window_v2Andrew Jeffery2017-04-262-0/+77
| | | | | Change-Id: I26992306b7de4ece0b14b51a4a9c443ef47ce302 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add create_read_window_v2Andrew Jeffery2017-04-261-0/+76
| | | | | Change-Id: I2b1295faea3df207cce5430653b4e0a78176e13c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add get_flash_info_v2Andrew Jeffery2017-04-261-0/+68
| | | | | Change-Id: I55916bb3b8538701b0f54f9ce259b1ac4715941c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add reset_stateAndrew Jeffery2017-04-261-0/+68
| | | | | Change-Id: Ia18a5e7c472d8fe55fb90a13be21f731e407e6e9 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add get_mbox_info_v2Andrew Jeffery2017-04-261-0/+60
| | | | | Change-Id: Ibd4d9c7880bc427edcecafcc2e9abeb487620fdb Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add system interface to define MTD and LPC characteristicsAndrew Jeffery2017-04-262-0/+134
| | | | | | | | | | | | | The primary entry point to the system abstraction is through its ioctl() implementation, which handles ioctl calls for the MTD and LPC subsystems. The MBOX portion needs no support as it is driven purely by read() and write() calls. Two helpers are exposed to configure the MTD and LPC subsystems respectively. Change-Id: Id50abdb967f6ea2ece2e3b21288412d276439c36 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add mbox helpers for unit/integration testsAndrew Jeffery2017-04-262-0/+349
| | | | | | | | | The helpers enable initialising the mbox context to the point that dispatch_mbox() can be usefully called in a controlled environment, and then testing any side-effects that resulted. Change-Id: I590841f70dd51e0993b491e537ed4a73ab696e14 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add write_flashAndrew Jeffery2017-04-261-0/+119
| | | | | Change-Id: I887d79db9f1fd5e63c16a717a88cd76a1f800986 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add erase_flashAndrew Jeffery2017-04-261-0/+224
| | | | | Change-Id: Idbe0e8a9d7c62eeb5ac90fce055fc87de80ab1fa Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add copy_flashAndrew Jeffery2017-04-261-0/+93
| | | | | Change-Id: Iac6b6207c01f1db322803218231ca97c210a583c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add NDEBUG sanity checkAndrew Jeffery2017-04-261-0/+8
| | | | | | | Hopefully stops people tripping over themselves if NDEBUG gets defined. Change-Id: Iafb81d01f6451619f49a5030e5154c8f30ffebdb Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
OpenPOWER on IntegriCloud