Re: live test system

2024-03-17 Thread Paul Spooren
Hi Paul (cool name!),

> Another live system with openwrt master with various openwrt PRs that come 
> in, integrated under some predictable URL (https://host/pr2). Some kind 
> of capability to tweak settings live, or see the console output. ( Does owrt 
> run well in docker as a guest? )

QEMU is your friends, so maybe your or someone wants to pick up Haukes work[0] 
and make it happen. When it comes to Docker the questions is what you want to 
test. Since Docker uses the host Kernel any changes there aren’t of use. LuCI 
should work fine, however that’s something you should discuss as an issue over 
at luci.git.

> This is not intended as a solution to the myriad hardware platforms that 
> require real live tests, but one for catching the lions share of problems on 
> a generic running system.

In case you want to tackle the myriad of hardware platforms, too, you may check 
out Lava[1]. I did[2] some testing but stopped in favor of other projects. In 
theory Lava could scale over multiple communities to have hundreds of devices 
tested connected locally.

Best,
Paul

[0]: https://github.com/openwrt/openwrt/pull/9723
[1]: https://docs.lavasoftware.org/lava/index.html
[2]: https://github.com/aparcar/openwrt-lava-tests


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


live test system

2024-03-17 Thread Paul D



Maybe others have raised this idea. I won't address potential security 
issues at the abstract phase (firewalling necessary), but...


How about a node which spins up a live openwrt system with the latest 
luci master with the various PRs that come in? So contributors can see 
the effect of changes before PRs even go in.


Another live system with openwrt master with various openwrt PRs that 
come in, integrated under some predictable URL (https://host/pr2). 
Some kind of capability to tweak settings live, or see the console 
output. ( Does owrt run well in docker as a guest? )


This is not intended as a solution to the myriad hardware platforms that 
require real live tests, but one for catching the lions share of 
problems on a generic running system.



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 20/20] [TEST] TESTING: try separating build from sources

2023-11-16 Thread Elliott Mitchell
In case anyone was wondering, the later patches are marked "WIP" since
they hadn't been sufficiently tested.

I had run into this a bit ago, but hadn't tracked down the issue.  Now
that I have, another patch is attached to this message.  This is an
outright bug in the patch and should be fixed.


-- 
(\___(\___(\__  --=> 8-) EHM <=--  __/)___/)___/)
 \BS (| ehem+sig...@m5p.com  PGP 87145445 |)   /
  \_CS\   |  _  -O #include  O-   _  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445


>From f646cfb21288df884534d60ed17a075d9661e9b9 Mon Sep 17 00:00:00 2001
Message-Id: 
From: Elliott Mitchell 
Date: Thu, 16 Nov 2023 14:16:01 -0800
Subject: [PATCH] kernel/generic: fix lzma addition patch

When including directories, the full path must be used.  Otherwise the
compiler may fail to find headers.  This fixes separated build and
source directory functioning.

Signed-off-by: Elliott Mitchell 
---
Similar situation to the bcm27xx patch.  Small error in the patch,
which requires the right situation to trigger.  I figure most likely
adjustments are pure style and could be fixed on commit.
---
 .../generic/pending-5.15/530-jffs2_make_lzma_available.patch| 2 +-
 .../generic/pending-6.1/530-jffs2_make_lzma_available.patch | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch b/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch
index f236657b71..0ca857d000 100644
--- a/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch
+++ b/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch
@@ -4578,4 +4578,4 @@ Signed-off-by: Alexandros C. Couloumbis 
 +obj-$(CONFIG_LZMA_COMPRESS) += lzma_compress.o
 +obj-$(CONFIG_LZMA_DECOMPRESS) += lzma_decompress.o
 +
-+EXTRA_CFLAGS += -Iinclude/linux -Iinclude/linux/lzma -include types.h
++EXTRA_CFLAGS += -I$(srctree)/include/linux -I$(srctree)/include/linux/lzma -include types.h
diff --git a/target/linux/generic/pending-6.1/530-jffs2_make_lzma_available.patch b/target/linux/generic/pending-6.1/530-jffs2_make_lzma_available.patch
index 27a673399a..d413cc91a2 100644
--- a/target/linux/generic/pending-6.1/530-jffs2_make_lzma_available.patch
+++ b/target/linux/generic/pending-6.1/530-jffs2_make_lzma_available.patch
@@ -5177,4 +5177,4 @@ Signed-off-by: Alexandros C. Couloumbis 
 +obj-$(CONFIG_LZMA_COMPRESS) += lzma_compress.o
 +obj-$(CONFIG_LZMA_DECOMPRESS) += lzma_decompress.o
 +
-+EXTRA_CFLAGS += -Iinclude/linux -Iinclude/linux/lzma -include types.h
++EXTRA_CFLAGS += -I$(srctree)/include/linux -I$(srctree)/include/linux/lzma -include types.h
-- 
2.39.2

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 20/20] [TEST] TESTING: try separating build from sources

2023-11-14 Thread Elliott Mitchell
Check whether all the spots have been handled.  This hasn't been tried
in a long while, I doubt I've got everything right.

Signed-off-by: Elliott Mitchell 
---
 include/kernel.mk | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/kernel.mk b/include/kernel.mk
index 7f236ece45..4afc9eaf4e 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -44,11 +44,10 @@ else
 FILES_DIR ?= $(foreach dir,$(wildcard $(CURDIR)/files 
$(CURDIR)/files-$(KERNEL_PATCHVER)),"$(dir)")
   endif
   KERNEL_BUILD_DIR ?= $(BUILD_DIR)/linux-$(BOARD)$(if 
$(SUBTARGET),_$(SUBTARGET))
-  LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
   # Location of kernel source files
-  LINUX_SRC_DIR ?= $(LINUX_DIR)
+  LINUX_SRC_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
   # Location of kernel object files
-  LINUX_OBJ_DIR ?= $(LINUX_DIR)
+  LINUX_OBJ_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)-$(PROFILE)
   LINUX_UAPI_DIR=uapi/
   LINUX_VERMAGIC:=$(strip $(shell cat $(LINUX_OBJ_DIR)/.vermagic 2>/dev/null))
   LINUX_VERMAGIC:=$(if $(LINUX_VERMAGIC),$(LINUX_VERMAGIC),unknown)
-- 
(\___(\___(\__  --=> 8-) EHM <=--  __/)___/)___/)
 \BS (|   ehem+open...@m5p.com PGP 87145445   |)   /
  \_CS\   |  _  -O #include  O-   _  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 2/2] grub2: re-add test module

2023-01-23 Thread Tomasz Maciej Nowak
From: Tomasz Maciej Nowak 

It seems more hardware needs early load of firmware when initialised
to work properly (at least Intel hardware). One of previous case is CPU
microcode, which this series[1] tried to change. The second one is Intel
graphics IC, which needs firmware for controlling DMC circuit (switch
conncted display to DC6 power state). As it stands, the i915 module is
built-in and it seems the hardware can't cope with firmware loaded
later from rootfs, it needs to be supplied when the module is loaded.
Unfortunately we need bootloader to handle the load of firmware in this
case, but as previously mentioned series[1], there was an error when
initrd was hardcoded, instead of testing existence for it and then
loading. To remedy this in later the 55b808e0c4be ('x86: image: add test
module to bootloader') was commited. Which was later accidentally
dropped when grub2 image creation was moved to packages. Therefore bring
back test module, so we can test for cases of existing firmware in
grub.cfg.

1. 
https://patchwork.ozlabs.org/project/openwrt/cover/20181120162044.16371-1-tome...@o2.pl

Fixes: 5a5df62d95f5 ("x86/grub2: move grub2 image creation to package")
Signed-off-by: Tomasz Maciej Nowak 
---
 package/boot/grub2/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile
index c4cc43de2e60..7d6cfd539594 100644
--- a/package/boot/grub2/Makefile
+++ b/package/boot/grub2/Makefile
@@ -122,14 +122,14 @@ define Package/grub2/install
-O i386-pc \
-c $(PKG_BUILD_DIR)/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/gpt-core.img \
-   at_keyboard biosdisk boot chain configfile fat linux ls 
part_gpt reboot search serial vga
+   at_keyboard biosdisk boot chain configfile fat linux ls 
part_gpt reboot search serial test vga
$(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \
-O i386-pc \
-c ./files/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/generic-core.img \
-   at_keyboard biosdisk boot chain configfile ext2 linux ls 
part_msdos reboot search serial vga
+   at_keyboard biosdisk boot chain configfile ext2 linux ls 
part_msdos reboot search serial test vga
$(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \
@@ -154,7 +154,7 @@ define Package/grub2-efi/install
-O $(CONFIG_ARCH)-efi \
-c $(PKG_BUILD_DIR)/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/boot$(if 
$(CONFIG_x86_64),x64,ia32).efi \
-   at_keyboard boot chain configfile fat linux ls part_gpt reboot 
serial efi_gop efi_uga
+   at_keyboard boot chain configfile fat linux ls part_gpt reboot 
serial test efi_gop efi_uga
$(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \
-- 
2.39.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH firewall4 1/2] tests: adapt test to new ICMP print logic

2021-10-24 Thread Jo-Philipp Wich
Hi,

merged both patches, thank you!

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH firewall4 1/2] tests: adapt test to new ICMP print logic

2021-10-24 Thread Thomas Weißschuh
Fixes: 35f5120afcf158e445062fdb5072684ed24d91d0

Signed-off-by: Thomas Weißschuh 
---
 tests/03_rules/04_icmp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/03_rules/04_icmp b/tests/03_rules/04_icmp
index 53cee11..834ecc7 100644
--- a/tests/03_rules/04_icmp
+++ b/tests/03_rules/04_icmp
@@ -100,8 +100,8 @@ table inet fw4 {
meta l4proto icmp counter comment "!fw4: ICMP rule #1"
meta nfproto ipv6 meta l4proto ipv6-icmp counter comment "!fw4: 
ICMP rule #2"
meta nfproto ipv6 meta l4proto ipv6-icmp counter comment "!fw4: 
ICMP rule #3"
-   meta nfproto ipv4 icmp type . icmp code 12 . 0 counter comment 
"!fw4: ICMP rule #4"
-   meta nfproto ipv6 icmpv6 type . icmpv6 code 136 . 0 counter 
comment "!fw4: ICMP rule #5"
+   meta nfproto ipv4 icmp type . icmp code { 12 . 0 } counter 
comment "!fw4: ICMP rule #4"
+   meta nfproto ipv6 icmpv6 type . icmpv6 code { 136 . 0 } counter 
comment "!fw4: ICMP rule #5"
}
 
chain handle_reject {

base-commit: 35f5120afcf158e445062fdb5072684ed24d91d0
-- 
2.33.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


test

2021-09-11 Thread Nick Dennis




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 1/2] tests: add blob-buffer overflow test

2021-04-23 Thread Zefir Kurtisi
The blob buffer has no limitation in place
to prevent buflen to exceed maximum size.

This commit adds a test to demonstrate how
a blob increases past the maximum allowd
size of 16MB. It continuously adds chunks
of 64KB and with the 255th one blob_add()
returns a valid attribute pointer but the
blob's buflen does not increase.

The test is used to demonstrate the
failure, which is fixed with a follow-up
commit.

Signed-off-by: Zefir Kurtisi 
---
 tests/test-blob-buffer.c | 32 
 1 file changed, 32 insertions(+)
 create mode 100644 tests/test-blob-buffer.c

diff --git a/tests/test-blob-buffer.c b/tests/test-blob-buffer.c
new file mode 100644
index 000..ee2f8a2
--- /dev/null
+++ b/tests/test-blob-buffer.c
@@ -0,0 +1,32 @@
+#include 
+
+#include "blobmsg.h"
+
+/* chunks of 64KB to be added to blob-buffer */
+#define BUFF_SIZE  0x1
+/* exceed maximum blob buff-length */
+#define BUFF_CHUNKS(((BLOB_ATTR_LEN_MASK + 1) / BUFF_SIZE) + 1)
+
+int main(int argc, char **argv)
+{
+   int i;
+   static struct blob_buf buf;
+   blobmsg_buf_init();
+   int prev_len = buf.buflen;
+
+   for (i = 0; i < BUFF_CHUNKS; i++) {
+   struct blob_attr *attr = blob_new(, 0, BUFF_SIZE);
+   if (!attr) {
+   fprintf(stderr, "SUCCESS: failed to allocate 
attribute\n");
+   break;
+   }
+   fprintf(stderr, "i=%d, len=%d, buff=%p\n", i, buf.buflen, attr);
+   if (prev_len < buf.buflen) {
+   prev_len = buf.buflen;
+   continue;
+   }
+   fprintf(stderr, "ERROR: buffer length did not increase\n");
+   return -1;
+   }
+   return 0;
+}
-- 
2.17.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[IPQ4019] "PHY 0 single test PSGMII issue happen!" - on FRITZ!BOX 7530

2021-04-04 Thread Enrico Mioso

Hello folks!!
I'm seeing these messages on this router, which seems to actually work fine.
reporting them justi n case.


libphy: ipq4019_mdio: probed
ESS reset ok!
ESS reset ok!
PHY 0 single test PSGMII issue happen!
PHY 1 single test PSGMII issue happen!
PHY0 test see issue!
PHY1 test see issue!
ESS reset ok!
libphy: Fixed MDIO Bus: probed


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v1 2/2] libubox: tests: add more blobmsg/json test cases

2021-03-09 Thread Petr Štetiar
Peter Seiderer  [2021-03-09 21:44:21]:

Hi,

>   /* u8 is converted to boolean (true: all values != 0/false: value 0) in 
> json */

ok, makes sense, merged[1], thanks!

1. https://git.openwrt.org/551d75b5662cccd0466b990d58136bdf799a804d

Cheers,

Petr

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v1 2/2] libubox: tests: add more blobmsg/json test cases

2021-03-09 Thread Peter Seiderer
Hello Petr,

On Sun, 7 Mar 2021 11:30:28 +0100, Petr Štetiar  wrote:

> Peter Seiderer  [2021-03-06 11:54:50]:
> 
> Hi,
> 
> nice, just a small nitpicks, these seems fine:
> 
> > +  int8_max: 127
> > +  int8_min: -128  
> 
> ...
> 
> but the outputs bellow looks suspicious:
> 
> > +  [*] blobmsg from json:  
> 
> ...
> 
> > +  int8_max: 1
> > +  int8_min: 1  
> 
> ...
> 
> > +  [*] blobmsg from json/cast_u64:  
> 
> ...
> 
> > +  int8_max: 1
> > +  int8_min: 1  
> 
> ...
> 
> > +  [*] blobmsg from json/cast_s64:  
> 
> ...
> 
> > +  int8_max: 1
> > +  int8_min: 1  

As stated/hidden in the test case source code:

/* u8 is converted to boolean (true: all values != 0/false: value 0) in 
json */

See [1] from the libubox source code...

Regards,
Peter

[1] 
https://git.openwrt.org/?p=project/libubox.git;a=blob;f=blobmsg_json.c;h=dce81e991ef7b83ac4906bca6f875369d3057f36;hb=HEAD#l254


> 
> Cheers,
> 
> Petr
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v1 2/2] libubox: tests: add more blobmsg/json test cases

2021-03-07 Thread Petr Štetiar
Peter Seiderer  [2021-03-06 11:54:50]:

Hi,

nice, just a small nitpicks, these seems fine:

> +  int8_max: 127
> +  int8_min: -128

...

but the outputs bellow looks suspicious:

> +  [*] blobmsg from json:

...

> +  int8_max: 1
> +  int8_min: 1

...

> +  [*] blobmsg from json/cast_u64:

...

> +  int8_max: 1
> +  int8_min: 1

...

> +  [*] blobmsg from json/cast_s64:

...

> +  int8_max: 1
> +  int8_min: 1

Cheers,

Petr

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v1 2/2] libubox: tests: add more blobmsg/json test cases

2021-03-06 Thread Peter Seiderer
 * add mixed int/double tests
 * add blobmsg_cast_u64/blobmsg_cast_s64 tests

Signed-off-by: Peter Seiderer 
---
 tests/cram/test_blobmsg_types.t |  82 +++
 tests/test-blobmsg-types.c  | 371 
 2 files changed, 453 insertions(+)
 create mode 100644 tests/cram/test_blobmsg_types.t
 create mode 100644 tests/test-blobmsg-types.c

diff --git a/tests/cram/test_blobmsg_types.t b/tests/cram/test_blobmsg_types.t
new file mode 100644
index 000..190e1f2
--- /dev/null
+++ b/tests/cram/test_blobmsg_types.t
@@ -0,0 +1,82 @@
+check that blobmsg is producing expected results:
+
+  $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH"
+
+  $ valgrind --quiet --leak-check=full test-blobmsg-types
+  [*] blobmsg dump:
+  string: Hello, world!
+  int64_max: 9223372036854775807
+  int64_min: -9223372036854775808
+  int32_max: 2147483647
+  int32_min: -2147483648
+  int16_max: 32767
+  int16_min: -32768
+  int8_max: 127
+  int8_min: -128
+  double_max: 1.797693e+308
+  double_min: 2.225074e-308
+  [*] blobmsg dump cast_u64:
+  string: Hello, world!
+  int64_max: 9223372036854775807
+  int64_min: 9223372036854775808
+  int32_max: 2147483647
+  int32_min: 2147483648
+  int16_max: 32767
+  int16_min: 32768
+  int8_max: 127
+  int8_min: 128
+  double_max: 1.797693e+308
+  double_min: 2.225074e-308
+  [*] blobmsg dump cast_s64:
+  string: Hello, world!
+  int64_max: 9223372036854775807
+  int64_min: -9223372036854775808
+  int32_max: 2147483647
+  int32_min: -2147483648
+  int16_max: 32767
+  int16_min: -32768
+  int8_max: 127
+  int8_min: -128
+  double_max: 1.797693e+308
+  double_min: 2.225074e-308
+  
+  [*] blobmsg to json: {"string":"Hello, 
world!","int64_max":9223372036854775807,"int64_min":-9223372036854775808,"int32_max":2147483647,"int32_min":-2147483648,"int16_max":32767,"int16_min":-32768,"int8_max":true,"int8_min":true,"double_max":179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.00,"double_min":0.00}
+  
+  [*] blobmsg from json:
+  string: Hello, world!
+  int64_max: 9223372036854775807
+  int64_min: -9223372036854775808
+  int32_max: 2147483647
+  int32_min: -2147483648
+  int16_max: 32767
+  int16_min: -32768
+  int8_max: 1
+  int8_min: 1
+  double_max: 1.797693e+308
+  double_min: 0.00e+00
+  
+  [*] blobmsg from json/cast_u64:
+  string: Hello, world!
+  int64_max: 9223372036854775807
+  int64_min: 9223372036854775808
+  int32_max: 2147483647
+  int32_min: 2147483648
+  int16_max: 32767
+  int16_min: 4294934528
+  int8_max: 1
+  int8_min: 1
+  double_max: 1.797693e+308
+  double_min: 0.00e+00
+  
+  [*] blobmsg from json/cast_s64:
+  string: Hello, world!
+  int64_max: 9223372036854775807
+  int64_min: -9223372036854775808
+  int32_max: 2147483647
+  int32_min: -2147483648
+  int16_max: 32767
+  int16_min: -32768
+  int8_max: 1
+  int8_min: 1
+  double_max: 1.797693e+308
+  double_min: 0.00e+00
diff --git a/tests/test-blobmsg-types.c b/tests/test-blobmsg-types.c
new file mode 100644
index 000..4d77a27
--- /dev/null
+++ b/tests/test-blobmsg-types.c
@@ -0,0 +1,371 @@
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "blobmsg.h"
+#include "blobmsg_json.h"
+
+enum {
+   FOO_STRING,
+   FOO_INT64_MAX,
+   FOO_INT64_MIN,
+   FOO_INT32_MAX,
+   FOO_INT32_MIN,
+   FOO_INT16_MAX,
+   FOO_INT16_MIN,
+   FOO_INT8_MAX,
+   FOO_INT8_MIN,
+   FOO_DOUBLE_MAX,
+   FOO_DOUBLE_MIN,
+   __FOO_MAX
+};
+
+static const struct blobmsg_policy pol[] = {
+   [FOO_STRING] = {
+   .name = "string",
+   .type = BLOBMSG_TYPE_STRING,
+   },
+   [FOO_INT64_MAX] = {
+   .name = "int64_max",
+   .type = BLOBMSG_TYPE_INT64,
+   },
+   [FOO_INT64_MIN] = {
+   .name = "int64_min",
+   .type = BLOBMSG_TYPE_INT64,
+   },
+   [FOO_INT32_MAX] = {
+   .name = "int32_max",
+   .type = BLOBMSG_TYPE_INT32,
+   },
+   [FOO_INT32_MIN] = {
+   .name = "int32_min",
+   .type = BLOBMSG_TYPE_INT32,
+   },
+   [FOO_INT16_MAX] = {
+   .name = "int16_max",
+   .type = BLOBMSG_TYPE_INT16,
+   },
+   [FOO_INT16_MIN] = {
+   .name = "int16_min",
+   .type = BLOBMSG_TYPE_INT16,
+   },
+   [FOO_INT8_MAX] = {
+   .name = "int8_max",
+   .type = BLOBMSG_T

[PATCH v2] generic: platform/mikrotik: fix incorrect test

2020-08-18 Thread Thibaut VARÈNE
The test is meant to check the result of the preceding kmalloc()

Signed-off-by: Thibaut VARÈNE 
---
 .../generic/files/drivers/platform/mikrotik/rb_hardconfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c 
b/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c
index 4559418de7..8861814be4 100644
--- a/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c
+++ b/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c
@@ -480,7 +480,7 @@ static int hc_wlan_data_unpack_lzor(const u8 *inbuf, size_t 
inlen,
/* Temporary buffer same size as the outbuf */
templen = *outlen;
tempbuf = kmalloc(templen, GFP_KERNEL);
-   if (!outbuf)
+   if (!tempbuf)
return -ENOMEM;
 
/* Concatenate into the outbuf */
-- 
2.24.3 (Apple Git-128)


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] generic: platform/mikrotik: fix incorrect test

2020-08-18 Thread Thibaut


> Le 18 août 2020 à 11:26, Adrian Schmutzler  a écrit 
> :
> 
>> -Original Message-
>> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
>> On Behalf Of Thibaut VARÈNE
>> Sent: Dienstag, 18. August 2020 11:02
>> To: openwrt-devel@lists.openwrt.org
>> Cc: Thibaut VARÈNE 
>> Subject: [PATCH] generic: platform/mikrotik: fix incorrect test
> 
> And to be merged, this needs a commit message.

The commit message is the commit title. I didn’t expect this to be a problem, 
as evidenced by 6bdd4c967b or 072c5876c and many other similar commits?

I didn’t think this one-liner warranted a version bump either, since the 
operation of the driver is unchanged under normal circumstances.

Best,
Thibaut
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] generic: platform/mikrotik: fix incorrect test

2020-08-18 Thread Thibaut
Hi,

This patch also targets 19.07: please cherry pick when merged.

Thibaut

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH] generic: platform/mikrotik: fix incorrect test

2020-08-18 Thread Thibaut VARÈNE
Signed-off-by: Thibaut VARÈNE 
---
 .../generic/files/drivers/platform/mikrotik/rb_hardconfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c 
b/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c
index 4559418de7..8861814be4 100644
--- a/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c
+++ b/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c
@@ -480,7 +480,7 @@ static int hc_wlan_data_unpack_lzor(const u8 *inbuf, size_t 
inlen,
/* Temporary buffer same size as the outbuf */
templen = *outlen;
tempbuf = kmalloc(templen, GFP_KERNEL);
-   if (!outbuf)
+   if (!tempbuf)
return -ENOMEM;
 
/* Concatenate into the outbuf */
-- 
2.24.3 (Apple Git-128)


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


RE: [PATCH] generic: platform/mikrotik: fix incorrect test

2020-08-18 Thread Adrian Schmutzler
> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Thibaut VARÈNE
> Sent: Dienstag, 18. August 2020 11:02
> To: openwrt-devel@lists.openwrt.org
> Cc: Thibaut VARÈNE 
> Subject: [PATCH] generic: platform/mikrotik: fix incorrect test

And to be merged, this needs a commit message.

Best

Adrian

> 
> Signed-off-by: Thibaut VARÈNE 
> ---
>  .../generic/files/drivers/platform/mikrotik/rb_hardconfig.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git
> a/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c
> b/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c
> index 4559418de7..8861814be4 100644
> --- a/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c
> +++ b/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c
> @@ -480,7 +480,7 @@ static int hc_wlan_data_unpack_lzor(const u8 *inbuf,
> size_t inlen,
>   /* Temporary buffer same size as the outbuf */
>   templen = *outlen;
>   tempbuf = kmalloc(templen, GFP_KERNEL);
> - if (!outbuf)
> + if (!tempbuf)
>   return -ENOMEM;
> 
>   /* Concatenate into the outbuf */
> --
> 2.24.3 (Apple Git-128)
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


RE: [PATCH] generic: platform/mikrotik: fix incorrect test

2020-08-18 Thread Adrian Schmutzler
> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Thibaut VARÈNE
> Sent: Dienstag, 18. August 2020 11:02
> To: openwrt-devel@lists.openwrt.org
> Cc: Thibaut VARÈNE 
> Subject: [PATCH] generic: platform/mikrotik: fix incorrect test
> 
> Signed-off-by: Thibaut VARÈNE 
> ---
>  .../generic/files/drivers/platform/mikrotik/rb_hardconfig.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git
> a/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c
> b/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c
> index 4559418de7..8861814be4 100644
> --- a/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c
> +++ b/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c
> @@ -480,7 +480,7 @@ static int hc_wlan_data_unpack_lzor(const u8 *inbuf,
> size_t inlen,
>   /* Temporary buffer same size as the outbuf */
>   templen = *outlen;
>   tempbuf = kmalloc(templen, GFP_KERNEL);
> - if (!outbuf)
> + if (!tempbuf)

No version bump?

>   return -ENOMEM;
> 
>   /* Concatenate into the outbuf */
> --
> 2.24.3 (Apple Git-128)
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] prereq-build: test for perl's Data::Dumper

2020-04-17 Thread Rosen Penev
On Sun, Mar 29, 2020 at 6:13 PM Rosen Penev  wrote:
>
> Required for installation of autoconf:
>
> make[5]: Entering directory `/openwrt/build_dir/host/autoconf-2.69'
> Making all in bin
> make[6]: Entering directory `/openwrt/build_dir/host/autoconf-2.69/bin'
> autom4te_perllibdir='..'/lib AUTOM4TE_CFG='../lib/autom4te.cfg'
> ../bin/autom4te -B '..'/lib -B '..'/lib --language M4sh --cache
>  '' --melt ./autoconf.as -o autoconf.in
>
> Can't locate Data/Dumper.pm in @INC (@INC contains: ../lib
> /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
> /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
> ../lib/Autom4te/C4che.pm line 33.
> BEGIN failed--compilation aborted at ../lib/Autom4te/C4che.pm line 33.
> Compilation failed in require at ../bin/autom4te line 40.
> BEGIN failed--compilation aborted at ../bin/autom4te line 40.
> make[6]: *** [autoconf.in] Error 2
ping. I know most people do not encounter this issue as they have
autotools installed, but it is needed when autotools are missing on
the host.

I ran into this issue with a fairly barebones CentOS VM.
>
> Signed-off-by: Rosen Penev 
> ---
>  include/prereq-build.mk | 4 
>  1 file changed, 4 insertions(+)
>
> diff --git a/include/prereq-build.mk b/include/prereq-build.mk
> index 830a9eff9a..71d8c3c8e7 100644
> --- a/include/prereq-build.mk
> +++ b/include/prereq-build.mk
> @@ -62,6 +62,10 @@ else
>zlib_link_flags := -lz
>  endif
>
> +$(eval $(call TestHostCommand,perl-data-dumper, \
> +   Please install the Perl Data::Dumper module, \
> +   perl -MData::Dumper -e 1))
> +
>  $(eval $(call TestHostCommand,perl-thread-queue, \
> Please install the Perl Thread::Queue module, \
> perl -MThread::Queue -e 1))
> --
> 2.25.1
>

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] prereq-build: test for perl's Data::Dumper

2020-03-29 Thread Rosen Penev
Required for installation of autoconf:

make[5]: Entering directory `/openwrt/build_dir/host/autoconf-2.69'
Making all in bin
make[6]: Entering directory `/openwrt/build_dir/host/autoconf-2.69/bin'
autom4te_perllibdir='..'/lib AUTOM4TE_CFG='../lib/autom4te.cfg'
../bin/autom4te -B '..'/lib -B '..'/lib --language M4sh --cache
 '' --melt ./autoconf.as -o autoconf.in

Can't locate Data/Dumper.pm in @INC (@INC contains: ../lib
/usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
../lib/Autom4te/C4che.pm line 33.
BEGIN failed--compilation aborted at ../lib/Autom4te/C4che.pm line 33.
Compilation failed in require at ../bin/autom4te line 40.
BEGIN failed--compilation aborted at ../bin/autom4te line 40.
make[6]: *** [autoconf.in] Error 2

Signed-off-by: Rosen Penev 
---
 include/prereq-build.mk | 4 
 1 file changed, 4 insertions(+)

diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index 830a9eff9a..71d8c3c8e7 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -62,6 +62,10 @@ else
   zlib_link_flags := -lz
 endif
 
+$(eval $(call TestHostCommand,perl-data-dumper, \
+   Please install the Perl Data::Dumper module, \
+   perl -MData::Dumper -e 1))
+
 $(eval $(call TestHostCommand,perl-thread-queue, \
Please install the Perl Thread::Queue module, \
perl -MThread::Queue -e 1))
-- 
2.25.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH libubox 2/4] tests: blobmsg/json: add more test cases

2020-01-12 Thread Petr Štetiar
 * add missing test with sanitizers
 * add test case for blobmsg_add_json_from_string
 * add test cases for all numeric types
 * print types for each variable

Signed-off-by: Petr Štetiar 
---
 tests/cram/test_blobmsg.t | 255 +++---
 tests/test-blobmsg.c  |  47 +--
 2 files changed, 275 insertions(+), 27 deletions(-)

diff --git a/tests/cram/test_blobmsg.t b/tests/cram/test_blobmsg.t
index 3a5801a5a0f4..9ab2acf6e2d8 100644
--- a/tests/cram/test_blobmsg.t
+++ b/tests/cram/test_blobmsg.t
@@ -1,32 +1,255 @@
 check that blobmsg is producing expected results:
 
   $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH"
+
   $ valgrind --quiet --leak-check=full test-blobmsg
+  [*] blobmsg dump:
+  Message: Hello, world!
+  List: {
+  0 (i8)
+  100 (i8)
+  -128 (i8)
+  127 (i8)
+  -32768 (i16)
+  32767 (i16)
+  -2147483648 (i32)
+  2147483647 (i32)
+  -9223372036854775808 (i64)
+  9223372036854775807 (i64)
+  133.70 (dbl)
+  }
+  Testdata: {
+  \tdouble : 133.70 (dbl) (esc)
+  \tfoo : 0 (i8) (esc)
+  \tpoo : 100 (i8) (esc)
+  \tmoo-min : -128 (i8) (esc)
+  \tmoo-max : 127 (i8) (esc)
+  \tbar-min : -32768 (i16) (esc)
+  \tbar-max : 32767 (i16) (esc)
+  \tbaz-min : -2147483648 (i32) (esc)
+  \tbaz-max : 2147483647 (i32) (esc)
+  \ttaz-min : -9223372036854775808 (i64) (esc)
+  \ttaz-max : 9223372036854775807 (i64) (esc)
+  \tworld : 2 (str) (esc)
+  }
+  
+  [*] blobmsg to json: {"message":"Hello, 
world!","testdata":{"double":133.70,"foo":false,"poo":true,"moo-min":true,"moo-max":true,"bar-min":32768,"bar-max":32767,"baz-min":-2147483648,"baz-max":2147483647,"taz-min":-9223372036854775808,"taz-max":9223372036854775807,"world":"2"},"list":[false,true,true,true,32768,32767,-2147483648,2147483647,-9223372036854775808,9223372036854775807,133.70]}
+  
+  [*] blobmsg from json:
+  Message: Hello, world!
+  List: {
+  0 (i8)
+  1 (i8)
+  1 (i8)
+  1 (i8)
+  32768 (i32)
+  32767 (i32)
+  -2147483648 (i32)
+  2147483647 (i32)
+  -2147483648 (i32)
+  2147483647 (i32)
+  133.70 (dbl)
+  }
+  Testdata: {
+  \tdouble : 133.70 (dbl) (esc)
+  \tfoo : 0 (i8) (esc)
+  \tpoo : 1 (i8) (esc)
+  \tmoo-min : 1 (i8) (esc)
+  \tmoo-max : 1 (i8) (esc)
+  \tbar-min : 32768 (i32) (esc)
+  \tbar-max : 32767 (i32) (esc)
+  \tbaz-min : -2147483648 (i32) (esc)
+  \tbaz-max : 2147483647 (i32) (esc)
+  \ttaz-min : -2147483648 (i32) (esc)
+  \ttaz-max : 2147483647 (i32) (esc)
+  \tworld : 2 (str) (esc)
+  }
+
+  $ test-blobmsg-san
+  [*] blobmsg dump:
+  Message: Hello, world!
+  List: {
+  0 (i8)
+  100 (i8)
+  -128 (i8)
+  127 (i8)
+  -32768 (i16)
+  32767 (i16)
+  -2147483648 (i32)
+  2147483647 (i32)
+  -9223372036854775808 (i64)
+  9223372036854775807 (i64)
+  133.70 (dbl)
+  }
+  Testdata: {
+  \tdouble : 133.70 (dbl) (esc)
+  \tfoo : 0 (i8) (esc)
+  \tpoo : 100 (i8) (esc)
+  \tmoo-min : -128 (i8) (esc)
+  \tmoo-max : 127 (i8) (esc)
+  \tbar-min : -32768 (i16) (esc)
+  \tbar-max : 32767 (i16) (esc)
+  \tbaz-min : -2147483648 (i32) (esc)
+  \tbaz-max : 2147483647 (i32) (esc)
+  \ttaz-min : -9223372036854775808 (i64) (esc)
+  \ttaz-max : 9223372036854775807 (i64) (esc)
+  \tworld : 2 (str) (esc)
+  }
+  
+  [*] blobmsg to json: {"message":"Hello, 
world!","testdata":{"double":133.70,"foo":false,"poo":true,"moo-min":true,"moo-max":true,"bar-min":32768,"bar-max":32767,"baz-min":-2147483648,"baz-max":2147483647,"taz-min":-9223372036854775808,"taz-max":9223372036854775807,"world":"2"},"list":[false,true,true,true,32768,32767,-2147483648,2147483647,-9223372036854775808,9223372036854775807,133.70]}
+  
+  [*] blobmsg from json:
   Message: Hello, world!
   List: {
-  0
-  1
-  2
-  133.70
+  0 (i8)
+  1 (i8)
+  1 (i8)
+  1 (i8)
+  32768 (i32)
+  32767 (i32)
+  -2147483648 (i32)
+  2147483647 (i32)
+  -2147483648 (i32)
+  2147483647 (i32)
+  133.70 (dbl)
   }
   Testdata: {
-  \tdouble : 133.70 (esc)
-  \thello : 1 (esc)
-  \tworld : 2 (esc)
+  \tdouble : 133.70 (dbl) (esc)
+  \tfoo : 0 (i8) (esc)
+  \tpoo : 1 (i8) (esc)
+  \tmoo-min : 1 (i8) (esc)
+  \tmoo-max : 1 (i8) (esc)
+  \tbar-min : 32768 (i32) (esc)
+  \tbar-max : 32767 (i32) (esc)
+  \tbaz-min : -2147483648 (i32) (esc)
+  \tbaz-max : 2147483647 (i32) (esc)
+  \ttaz-min : -2147483648 (i32) (esc)
+  \ttaz-max : 2147483647 (i32) (esc)
+  \tworld : 2 (str) (esc)
   }
-  json: {"message":"Hello, 
world!","testdata":{"double":133.70,"hello":1,"world":"2"},"list":[0,1,2,133.70]}
 
   $ test-blobmsg-san
+  [*] blobmsg dump:
+  Message: Hello, w

[OpenWrt-Devel] [PATCH libubox 13/20] tests: add test cases for blobmsg parsing

2019-12-19 Thread Petr Štetiar
Increasing test coverage.

Signed-off-by: Petr Štetiar 
---
 tests/cram/test_blobmsg_parse.t | 65 +
 tests/test-blobmsg-parse.c  | 74 +
 2 files changed, 139 insertions(+)
 create mode 100644 tests/cram/test_blobmsg_parse.t
 create mode 100644 tests/test-blobmsg-parse.c

diff --git a/tests/cram/test_blobmsg_parse.t b/tests/cram/test_blobmsg_parse.t
new file mode 100644
index ..37e09ce33f1a
--- /dev/null
+++ b/tests/cram/test_blobmsg_parse.t
@@ -0,0 +1,65 @@
+check that blobmsg_parse is producing expected results:
+
+  $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH"
+  $ export FUZZ_CORPUS="$TESTDIR/../fuzz/corpus"
+
+  $ for blob in $(LC_ALL=C find $FUZZ_CORPUS -type f | sort ); do
+  >   valgrind --quiet --leak-check=full test-blobmsg-parse $blob; \
+  >   test-blobmsg-parse-san $blob; \
+  > done
+  71520a5c4b5ca73903216857abbad54a8002d44a: blobmsg_parse: ... (0)
+  71520a5c4b5ca73903216857abbad54a8002d44a: blobmsg_parse_array: ... (0)
+  71520a5c4b5ca73903216857abbad54a8002d44a: blobmsg_parse: ... (0)
+  71520a5c4b5ca73903216857abbad54a8002d44a: blobmsg_parse_array: ... (0)
+  c1dfd96eea8cc2b62785275bca38ac261256e278: blobmsg_parse: ... (0)
+  c1dfd96eea8cc2b62785275bca38ac261256e278: blobmsg_parse_array: ... (0)
+  c1dfd96eea8cc2b62785275bca38ac261256e278: blobmsg_parse: ... (0)
+  c1dfd96eea8cc2b62785275bca38ac261256e278: blobmsg_parse_array: ... (0)
+  c42ac1c46f1d4e211c735cc7dfad4ff8391110e9: blobmsg_parse: ... (0)
+  c42ac1c46f1d4e211c735cc7dfad4ff8391110e9: blobmsg_parse_array: ... (0)
+  c42ac1c46f1d4e211c735cc7dfad4ff8391110e9: blobmsg_parse: ... (0)
+  c42ac1c46f1d4e211c735cc7dfad4ff8391110e9: blobmsg_parse_array: ... (0)
+  crash-1b8fb1be45db3aff7699100f497fb74138f3df4f: blobmsg_parse: ... (0)
+  crash-1b8fb1be45db3aff7699100f497fb74138f3df4f: blobmsg_parse_array: ... (0)
+  crash-1b8fb1be45db3aff7699100f497fb74138f3df4f: blobmsg_parse: ... (0)
+  crash-1b8fb1be45db3aff7699100f497fb74138f3df4f: blobmsg_parse_array: ... (0)
+  crash-333757b203a44751d3535f24b05f467183a96d09: blobmsg_parse: ... (0)
+  crash-333757b203a44751d3535f24b05f467183a96d09: blobmsg_parse_array: ... (0)
+  crash-333757b203a44751d3535f24b05f467183a96d09: blobmsg_parse: ... (0)
+  crash-333757b203a44751d3535f24b05f467183a96d09: blobmsg_parse_array: ... (0)
+  crash-4c4d2c3c9ade5da9347534e290305c3b9760f627: blobmsg_parse: ... (0)
+  crash-4c4d2c3c9ade5da9347534e290305c3b9760f627: blobmsg_parse_array: ... (-1)
+  crash-4c4d2c3c9ade5da9347534e290305c3b9760f627: blobmsg_parse: ... (0)
+  crash-4c4d2c3c9ade5da9347534e290305c3b9760f627: blobmsg_parse_array: ... (-1)
+  crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b: blobmsg_parse: ... (0)
+  crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b: blobmsg_parse_array: ... (-1)
+  crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b: blobmsg_parse: ... (0)
+  crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b: blobmsg_parse_array: ... (-1)
+  crash-75b146c4e6fac64d3e62236b27c64b50657bab2a: blobmsg_parse: ... (0)
+  crash-75b146c4e6fac64d3e62236b27c64b50657bab2a: blobmsg_parse_array: ... (-1)
+  crash-75b146c4e6fac64d3e62236b27c64b50657bab2a: blobmsg_parse: ... (0)
+  crash-75b146c4e6fac64d3e62236b27c64b50657bab2a: blobmsg_parse_array: ... (-1)
+  crash-813f3e68661da09c26d4a87dbb9d5099e92be50f: blobmsg_parse: ... (0)
+  crash-813f3e68661da09c26d4a87dbb9d5099e92be50f: blobmsg_parse_array: ... (-1)
+  crash-813f3e68661da09c26d4a87dbb9d5099e92be50f: blobmsg_parse: ... (0)
+  crash-813f3e68661da09c26d4a87dbb9d5099e92be50f: blobmsg_parse_array: ... (-1)
+  crash-98595faa58ba01d85ba4fd0b109cd3d490b45795: blobmsg_parse: ... (0)
+  crash-98595faa58ba01d85ba4fd0b109cd3d490b45795: blobmsg_parse_array: ... (0)
+  crash-98595faa58ba01d85ba4fd0b109cd3d490b45795: blobmsg_parse: ... (0)
+  crash-98595faa58ba01d85ba4fd0b109cd3d490b45795: blobmsg_parse_array: ... (0)
+  crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1: blobmsg_parse: ... (0)
+  crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1: blobmsg_parse_array: ... (0)
+  crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1: blobmsg_parse: ... (0)
+  crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1: blobmsg_parse_array: ... (0)
+  crash-df9d1243057b27bbad6211e5a23d1cb699028aa2: blobmsg_parse: ... (0)
+  crash-df9d1243057b27bbad6211e5a23d1cb699028aa2: blobmsg_parse_array: ... (0)
+  crash-df9d1243057b27bbad6211e5a23d1cb699028aa2: blobmsg_parse: ... (0)
+  crash-df9d1243057b27bbad6211e5a23d1cb699028aa2: blobmsg_parse_array: ... (0)
+  crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2: blobmsg_parse: ... (0)
+  crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2: blobmsg_parse_array: ... (-1)
+  crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2: blobmsg_parse: ... (0)
+  crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2: blobmsg_parse_array: ... (-1)
+  valid-blobmsg.bin: blobmsg_parse: MLT (0)
+  valid-blobmsg.bin: blobmsg_parse_array: MLT (0)
+  val

[OpenWrt-Devel] [PATCH libubox 06/20] tests: add test cases for blob parsing

2019-12-19 Thread Petr Štetiar
Increasing test coverage.

Signed-off-by: Petr Štetiar 
---
 tests/cram/inputs/invalid.ucert   | Bin 0 -> 362 bytes
 tests/cram/inputs/key-build.ucert | Bin 0 -> 356 bytes
 tests/cram/test_blob_parse.t  |  76 +
 tests/test-blob-parse.c   | 175 ++
 4 files changed, 251 insertions(+)
 create mode 100644 tests/cram/inputs/invalid.ucert
 create mode 100644 tests/cram/inputs/key-build.ucert
 create mode 100644 tests/cram/test_blob_parse.t
 create mode 100644 tests/test-blob-parse.c

diff --git a/tests/cram/inputs/invalid.ucert b/tests/cram/inputs/invalid.ucert
new file mode 100644
index 
..dbdeb725d490b51fb442ae3c5a5b90a32376f108
GIT binary patch
literal 362
zcmZwDyHbNt5P;!Lp`+9mmXtaa8pj0Uj74IIQG^6@K{AdraLxfvJmkVPPw-31Uf?$C_TsUrr8PYjbt&|wj_P)<(Qp~$*0OhO
zXW{fp_l6esQJNUkNV+UjQQEv4(A7!H#E$FbN4eLYChq8*g9^aM6Tmxc#fStEyaMdO
z%cp1t~8t0WSdiu$x$nVkemUn|OclmH&3KTF`)mRcW&
zjx5I8F=cqI|BJ0B6vY_z0WNxQ
Amp~XIs#+bmp7r6D(2X7dCdj<@`gJN|wF2w-=WI2*4D{^NeTL^k7{gfd*&
r|CMc|6e)FzOyAO7W!fBSQm3h@6O{>;uBdHch+F1Ww   valgrind --quiet --leak-check=full test-blob-parse $blob; \
+  >   test-blob-parse-san $blob; \
+  > done
+  cannot parse cert 71520a5c4b5ca73903216857abbad54a8002d44a
+  cannot parse cert 71520a5c4b5ca73903216857abbad54a8002d44a
+  cannot parse cert c1dfd96eea8cc2b62785275bca38ac261256e278
+  cannot parse cert c1dfd96eea8cc2b62785275bca38ac261256e278
+  cannot parse cert c42ac1c46f1d4e211c735cc7dfad4ff8391110e9
+  cannot parse cert c42ac1c46f1d4e211c735cc7dfad4ff8391110e9
+  cannot parse cert crash-1b8fb1be45db3aff7699100f497fb74138f3df4f
+  cannot parse cert crash-1b8fb1be45db3aff7699100f497fb74138f3df4f
+  cannot parse cert crash-4c4d2c3c9ade5da9347534e290305c3b9760f627
+  cannot parse cert crash-4c4d2c3c9ade5da9347534e290305c3b9760f627
+  cannot parse cert crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b
+  cannot parse cert crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b
+  cannot parse cert crash-75b146c4e6fac64d3e62236b27c64b50657bab2a
+  cannot parse cert crash-75b146c4e6fac64d3e62236b27c64b50657bab2a
+  cannot parse cert crash-813f3e68661da09c26d4a87dbb9d5099e92be50f
+  cannot parse cert crash-813f3e68661da09c26d4a87dbb9d5099e92be50f
+  cannot parse cert crash-98595faa58ba01d85ba4fd0b109cd3d490b45795
+  cannot parse cert crash-98595faa58ba01d85ba4fd0b109cd3d490b45795
+  cannot parse cert crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1
+  cannot parse cert crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1
+  cannot parse cert crash-df9d1243057b27bbad6211e5a23d1cb699028aa2
+  cannot parse cert crash-df9d1243057b27bbad6211e5a23d1cb699028aa2
+  cannot parse cert crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2
+  cannot parse cert crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2
+  cannot parse cert valid-blobmsg.bin
+  cannot parse cert valid-blobmsg.bin
diff --git a/tests/test-blob-parse.c b/tests/test-blob-parse.c
new file mode 100644
index ..6b1fb56485da
--- /dev/null
+++ b/tests/test-blob-parse.c
@@ -0,0 +1,175 @@
+/*
+ * Based on certificate dump functionality from ucert.c:
+ *
+ *  Copyright (C) 2018 Daniel Golle 
+ *  SPDX-License-Identifier: GPL-3.0
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include "blob.h"
+#include "list.h"
+#include "blobmsg_json.h"
+
+#define CERT_BUF_LEN 4096
+
+/*
+ * ucert structure
+ * |   BLOB|
+ * |SIGNATURE|   PAYLOAD   |
+ * | |[ BLOBMSG CONTAINER ]|
+ * | |[[T,i,v,e,f,pubkey ]]|
+ */
+enum cert_attr {
+   CERT_ATTR_SIGNATURE,
+   CERT_ATTR_PAYLOAD,
+   CERT_ATTR_MAX
+};
+
+static const struct blob_attr_info cert_policy[CERT_ATTR_MAX] = {
+   [CERT_ATTR_SIGNATURE] = { .type = BLOB_ATTR_BINARY },
+   [CERT_ATTR_PAYLOAD] = { .type = BLOB_ATTR_NESTED },
+};
+
+enum cert_cont_attr {
+   CERT_CT_ATTR_PAYLOAD,
+   CERT_CT_ATTR_MAX
+};
+
+enum cert_payload_attr {
+   CERT_PL_ATTR_CERTTYPE,
+   CERT_PL_ATTR_CERTID,
+   CERT_PL_ATTR_VALIDFROMTIME,
+   CERT_PL_ATTR_EXPIRETIME,
+   CERT_PL_ATTR_PUBKEY,
+   CERT_PL_ATTR_KEY_FINGERPRINT,
+   CERT_PL_ATTR_MAX
+};
+
+enum certtype_id {
+   CERTTYPE_UNSPEC,
+   CERTTYPE_AUTH,
+   CERTTYPE_REVOKE
+};
+
+/* list to store certificate chain at runtime */
+struct cert_object {
+   struct list_head list;
+   struct blob_attr *cert[CERT_ATTR_MAX];
+};
+
+static int cert_load(const char *certfile, struct list_head *chain)
+{
+   FILE *f;
+   struct blob_attr *certtb[CERT_ATTR_MAX];
+   struct blob_attr *bufpt;
+   struct cert_object *cobj;
+   char filebuf[CERT_BUF_LEN];
+   int ret = 0, pret = 0;
+   size_t len, pos = 0;
+
+   f = fopen(certfile, "r");
+   if (!f)
+   return 1;
+
+   len = fread(, 1, CERT_BUF_LEN - 1, f);
+   if (len < 64)
+   ret

[OpenWrt-Devel] [PATCH libubox 12/20] test: fuzz: add blobmsg_check_attr crashes

2019-12-19 Thread Petr Štetiar
 ==31775==ERROR: AddressSanitizer: SEGV on unknown address 0x604000a7c715
 ==31775==The signal is caused by a READ memory access.
#0 blobmsg_check_attr blobmsg.c:48:6
#1 blobmsg_parse_array blobmsg.c:118:8
#2 fuzz_blobmsg_parse test-blobmsg-parse-fuzzer.c:35:2

Signed-off-by: Petr Štetiar 
---
 .../crash-4c4d2c3c9ade5da9347534e290305c3b9760f627 | Bin 0 -> 17 bytes
 .../crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b | Bin 0 -> 86 bytes
 .../crash-75b146c4e6fac64d3e62236b27c64b50657bab2a | Bin 0 -> 4 bytes
 .../crash-813f3e68661da09c26d4a87dbb9d5099e92be50f | Bin 0 -> 36 bytes
 .../crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2 | Bin 0 -> 66 bytes
 5 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 
tests/fuzz/corpus/crash-4c4d2c3c9ade5da9347534e290305c3b9760f627
 create mode 100644 
tests/fuzz/corpus/crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b
 create mode 100644 
tests/fuzz/corpus/crash-75b146c4e6fac64d3e62236b27c64b50657bab2a
 create mode 100644 
tests/fuzz/corpus/crash-813f3e68661da09c26d4a87dbb9d5099e92be50f
 create mode 100644 
tests/fuzz/corpus/crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2

diff --git a/tests/fuzz/corpus/crash-4c4d2c3c9ade5da9347534e290305c3b9760f627 
b/tests/fuzz/corpus/crash-4c4d2c3c9ade5da9347534e290305c3b9760f627
new file mode 100644
index 
..2ca392f0c6109a4b0d6cf44ed18d69133addd8ca
GIT binary patch
literal 17
NcmZQ(U|@cV3;+h

literal 0
HcmV?d1

diff --git a/tests/fuzz/corpus/crash-75b146c4e6fac64d3e62236b27c64b50657bab2a 
b/tests/fuzz/corpus/crash-75b146c4e6fac64d3e62236b27c64b50657bab2a
new file mode 100644
index 
..39ae859cc00ce0c4b80c5a1d0bf031b6a6310ce0
GIT binary patch
literal 4
LcmZQ(U|<3O01^NO

literal 0
HcmV?d1

diff --git a/tests/fuzz/corpus/crash-813f3e68661da09c26d4a87dbb9d5099e92be50f 
b/tests/fuzz/corpus/crash-813f3e68661da09c26d4a87dbb9d5099e92be50f
new file mode 100644
index 
..62338ff4f0801529d0f6598c02bfbb9c57b5533c
GIT binary patch
literal 36
QcmZQ(U|{}_7cese01OQs?*IS*

literal 0
HcmV?d1

diff --git a/tests/fuzz/corpus/crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2 
b/tests/fuzz/corpus/crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2
new file mode 100644
index 
..92a30d23706ee628d4a076fcbe0b7613650c2039
GIT binary patch
literal 66
QcmZQ(U|{}F0bphZ0GOFO(EtDd

literal 0
HcmV?d1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH libubox 07/20] test: fuzz: add blob_parse crashes

2019-12-19 Thread Petr Štetiar
==5872==ERROR: AddressSanitizer: SEGV on unknown address 0x6020004100b4
==5872==The signal is caused by a READ memory access.
#0 blob_data blob.h
#1 blob_parse blob.c:228:2

Signed-off-by: Petr Štetiar 
---
 .../crash-1b8fb1be45db3aff7699100f497fb74138f3df4f | Bin 0 -> 6 bytes
 .../crash-98595faa58ba01d85ba4fd0b109cd3d490b45795 | Bin 0 -> 6 bytes
 .../crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1 |   1 +
 .../crash-df9d1243057b27bbad6211e5a23d1cb699028aa2 | Bin 0 -> 16 bytes
 4 files changed, 1 insertion(+)
 create mode 100644 
tests/fuzz/corpus/crash-1b8fb1be45db3aff7699100f497fb74138f3df4f
 create mode 100644 
tests/fuzz/corpus/crash-98595faa58ba01d85ba4fd0b109cd3d490b45795
 create mode 100644 
tests/fuzz/corpus/crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1
 create mode 100644 
tests/fuzz/corpus/crash-df9d1243057b27bbad6211e5a23d1cb699028aa2

diff --git a/tests/fuzz/corpus/crash-1b8fb1be45db3aff7699100f497fb74138f3df4f 
b/tests/fuzz/corpus/crash-1b8fb1be45db3aff7699100f497fb74138f3df4f
new file mode 100644
index 
..407114eb1a9fc2c82f40cac9948c75ac23948385
GIT binary patch
literal 6
Lcmd;L00Kt<0D}Nb

literal 0
HcmV?d1

diff --git a/tests/fuzz/corpus/crash-98595faa58ba01d85ba4fd0b109cd3d490b45795 
b/tests/fuzz/corpus/crash-98595faa58ba01d85ba4fd0b109cd3d490b45795
new file mode 100644
index 
..530ae8f6c1f7b9fa3ed86d1bf66b7e0a6d8b7485
GIT binary patch
literal 6
Ncmd<$;^Jap0{{TP051Rl

literal 0
HcmV?d1

diff --git a/tests/fuzz/corpus/crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1 
b/tests/fuzz/corpus/crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1
new file mode 100644
index ..46b749ee7968
--- /dev/null
+++ b/tests/fuzz/corpus/crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1
@@ -0,0 +1 @@
+�
diff --git a/tests/fuzz/corpus/crash-df9d1243057b27bbad6211e5a23d1cb699028aa2 
b/tests/fuzz/corpus/crash-df9d1243057b27bbad6211e5a23d1cb699028aa2
new file mode 100644
index 
..f6899b51bcb4283949208b7937e9a4ce3a7ef13c
GIT binary patch
literal 16
RcmZQzVBln8U;rWr4FCY<02=@R

literal 0
HcmV?d1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] test

2019-12-19 Thread ole . m . janssen


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] test

2019-12-19 Thread Edgar Soldin


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH uci 3/5] tests: cram: Lua: add test case for uci_get_errorstr

2019-12-07 Thread Petr Štetiar
In order to extend test coverage and help testing refactoring.

Signed-off-by: Petr Štetiar 
---
 tests/cram/config/broken | 1 +
 tests/cram/lua/basic.lua | 2 ++
 tests/cram/test_ucilua.t | 1 +
 3 files changed, 4 insertions(+)
 create mode 100644 tests/cram/config/broken

diff --git a/tests/cram/config/broken b/tests/cram/config/broken
new file mode 100644
index ..d2ecc0158e68
--- /dev/null
+++ b/tests/cram/config/broken
@@ -0,0 +1 @@
+config alias' 'a'
diff --git a/tests/cram/lua/basic.lua b/tests/cram/lua/basic.lua
index ceb706f6973e..f0052644c00e 100644
--- a/tests/cram/lua/basic.lua
+++ b/tests/cram/lua/basic.lua
@@ -42,3 +42,5 @@ local t = c:get("network", "lan", "dns")
 A(#t == 2)
 A(t[1] == "ns1.king.banik.cz")
 A(t[2] == "ns2.openwrt.org")
+
+print(c:get_all("broken"))
diff --git a/tests/cram/test_ucilua.t b/tests/cram/test_ucilua.t
index 1544e23c1bf4..cfe1f2e0e360 100644
--- a/tests/cram/test_ucilua.t
+++ b/tests/cram/test_ucilua.t
@@ -56,3 +56,4 @@ run basic Lua tests:
   proto: dhcp
   .anonymous: false
   aliases: c d
+  nil\tuci: Parse error (EOF with unterminated ') at line 1, byte 18 (esc)

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH uci 01/18] test: move shunit2 tests under standalone subdirectory

2019-11-04 Thread Petr Štetiar
So we could start adding other tests as well. While at it rename the
parent directory from test to the more common tests name.

Signed-off-by: Petr Štetiar 
---
 .gitignore  | 2 +-
 {test => tests/shunit2}/Makefile| 0
 {test => tests/shunit2}/README  | 0
 {test => tests/shunit2}/config/network      | 0
 {test => tests/shunit2}/references/add_list_changes.result  | 0
 {test => tests/shunit2}/references/add_list_config.result   | 0
 {test => tests/shunit2}/references/add_list_show.result | 0
 {test => tests/shunit2}/references/add_section.result   | 0
 {test => tests/shunit2}/references/batch_comments.result| 0
 {test => tests/shunit2}/references/batch_set.result | 0
 .../shunit2}/references/cli.options.delta.commit.result | 0
 .../shunit2}/references/cli.options.delta.export.result | 0
 {test => tests/shunit2}/references/del_list_config.result   | 0
 .../shunit2}/references/del_list_multiline_config.result| 0
 {test => tests/shunit2}/references/export.data  | 0
 {test => tests/shunit2}/references/export.result| 0
 {test => tests/shunit2}/references/get.data | 0
 {test => tests/shunit2}/references/get_multiline.data   | 0
 {test => tests/shunit2}/references/get_parsing.data | 0
 {test => tests/shunit2}/references/import.data  | 0
 {test => tests/shunit2}/references/import.result| 0
 {test => tests/shunit2}/references/revert_option.result | 0
 .../shunit2}/references/revert_option_multiline.result  | 0
 {test => tests/shunit2}/references/revert_section.result| 0
 {test => tests/shunit2}/references/set_existing_option.data | 0
 {test => tests/shunit2}/references/set_existing_option.result   | 0
 .../shunit2}/references/set_existing_option_multiline.result| 0
 {test => tests/shunit2}/references/set_named_section.result | 0
 {test => tests/shunit2}/references/set_nonexisting_option.data  | 0
 .../shunit2}/references/set_nonexisting_option.result   | 0
 .../shunit2}/references/set_nonexisting_option_multiline.result | 0
 {test => tests/shunit2}/references/set_parsing.data | 0
 {test => tests/shunit2}/references/set_parsing_multiline.data   | 0
 {test => tests/shunit2}/references/show_parsing.data| 0
 {test => tests/shunit2}/references/show_parsing_multiline.data  | 0
 .../shunit2}/references/show_parsing_multiline_option.result| 0
 .../shunit2}/references/show_parsing_multiline_package.result   | 0
 .../shunit2}/references/show_parsing_multiline_section.result   | 0
 {test => tests/shunit2}/references/ucimap_example_1.result  | 0
 {test => tests/shunit2}/references/ucimap_example_2.result  | 0
 {test => tests/shunit2}/shunit2/shunit2     | 0
 {test => tests/shunit2}/tests.d/000_import  | 0
 {test => tests/shunit2}/tests.d/010_export  | 0
 {test => tests/shunit2}/tests.d/020_get | 0
 {test => tests/shunit2}/tests.d/030_set     | 0
 {test => tests/shunit2}/tests.d/040_add | 0
 {test => tests/shunit2}/tests.d/050_show| 0
 {test => tests/shunit2}/tests.d/060_batch   | 0
 {test => tests/shunit2}/tests.d/070_revert  | 0
 {test => tests/shunit2}/tests.d/080_list| 0
 {test => tests/shunit2}/tests.d/090_cli_options | 0
 {test => tests/shunit2}/tests.d/100_changes | 0
 {test => tests/shunit2}/tests.sh| 0
 53 files changed, 1 insertion(+), 1 deletion(-)
 rename {test => tests/shunit2}/Makefile (100%)
 rename {test => tests/shunit2}/README (100%)
 rename {test => tests/shunit2}/config/network (100%)
 rename {test => tests/shunit2}/references/add_list_changes.result (100%)
 rename {test => tests/shunit2}/references/add_list_config.result (100%)
 rename {test => tests/shunit2}/references/add_list_show.result (100%)
 rename {test => tests/shunit2}/references/add_section.result (100%)
 rename {test => tests/shunit2}/references/batch_comments.result (100%)
 rename {test => tests/shunit2}/references/batch_set.result (100%)
 rename {test => tests/shunit2}/references/cli.options.delta.commit.result 
(100%)
 rename {test => tests/shunit2}/references/cli.options.delta.export.result 
(100%)
 rename {test => tests/shunit2}/references/del_list_config.result (100%)
 rename {test => tests/shunit2}/references/del_list_multiline_config.result 
(100%)
 rename {test => tests/shunit2}/references/export.data (100

Re: [OpenWrt-Devel] [PATCH] uci: test: use valgrind to detect memory corruptions

2019-05-17 Thread Sven Eckelmann
On Friday, 17 May 2019 11:44:25 CEST Charlemagne Lasse wrote:
> uci is currently a highly problematic software and its library & lua
> bindings cannot be used without corrupting or leaking memory

heap-use-after-free - yes. But I cannot find the memory leak report/test. This 
is what I am currently searching for in some downstream project.

The test scripts work fine after adding 
https://patchwork.ozlabs.org/patch/1100999/

#
# Performing tests
#
test_import
test_export
test_get_parsing
test_get_section_index_parsing
test_get_option
test_get_option_multiline
test_get_section
test_set_parsing
test_set_named_section
test_set_nonexisting_option
test_set_nonexisting_option_multiline
test_set_existing_option
test_set_existing_option_multiline
test_add_section
test_get_parsing
test_get_parsing_multiline_package
test_get_parsing_multiline_section
test_get_parsing_multiline_option
test_batch_set
test_batch_comments
test_revert_section
test_revert_option
test_revert_option_multiline
test_revert_option_long
test_add_list_config
test_add_list_get
test_add_list_show
test_add_list_changes
test_del_list
test_del_list_multiline
test_add_delta
test_changes_tailing_parts
test_changes_missing_value

    #
# Test report
#
tests passed:   112 100%
tests failed: 0   0%
tests skipped:0   0%
tests total:112 100%

> To notice such problems faster, start the uci testsuite with the
> valgrind memory checker.

Patch doesn't apply (adding it manually works).

Kind regards,
Sven

signature.asc
Description: This is a digitally signed message part.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] uci: test: use valgrind to detect memory corruptions

2019-05-17 Thread Charlemagne Lasse
uci is currently a highly problematic software and its library & lua
bindings cannot be used without corrupting or leaking memory in the host
process. Every long running process will suffer. The only way to use it
with an acceptable risk is by using the cli interface which throws its
virtual memory region away after its finished.

To notice such problems faster, start the uci testsuite with the
valgrind memory checker.

Signed-off-by: Charlemagne Lasse 
---
Bug report: https://bugs.openwrt.org/index.php?do=details_id=2288

 test/tests.sh | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/tests.sh b/test/tests.sh
index ee72c31..5312d41 100644
--- a/test/tests.sh
+++ b/test/tests.sh
@@ -11,8 +11,10 @@ UCI_BIN="../uci"
  echo "uci is not present." >&2
  return 1
 }
-UCI="${UCI_BIN} -c ${CONFIG_DIR} -p ${CHANGES_DIR}"
-UCI_Q="${UCI_BIN} -c ${CONFIG_DIR} -p ${CHANGES_DIR} -q"
+CHECKS="--num-callers=25 --track-origins=yes --leak-check=full"
+VALGRIND="valgrind -q --tool=memcheck --error-exitcode=126 ${CHECKS}"
+UCI="${VALGRIND} ${UCI_BIN} -c ${CONFIG_DIR} -p ${CHANGES_DIR}"
+UCI_Q="${VALGRIND} ${UCI_BIN} -c ${CONFIG_DIR} -p ${CHANGES_DIR} -q"

 REF_DIR="./references"
 SCRIPTS_DIR="./tests.d"
-- 
2.11.0

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] x86: image: add test module to bootloader

2019-01-13 Thread Tomasz Maciej Nowak
It was previously added in 546fced, which was part of "intel-microcode:
load as early as possible" series.
Unfortunately the conditionals added to GRUB config caused error on boot,
because on sysupgrade, bootloader is not updated and is left with old
features/modules. Since this module is needed for early microcode load
and transition to this needs to be done step by step, enable the test
module now, so that every newly created image has it already embedded.

Signed-off-by: Tomasz Maciej Nowak 
---
 target/linux/x86/image/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
index dbf8a8594b..f8c3700d32 100644
--- a/target/linux/x86/image/Makefile
+++ b/target/linux/x86/image/Makefile
@@ -9,8 +9,8 @@ include $(INCLUDE_DIR)/image.mk
 
 export PATH=$(TARGET_PATH):/sbin
 
-GRUB2_MODULES = biosdisk boot chain configfile ext2 linux ls part_msdos reboot 
serial vga
-GRUB2_MODULES_ISO = biosdisk boot chain configfile iso9660 linux ls part_msdos 
reboot serial vga
+GRUB2_MODULES = biosdisk boot chain configfile ext2 linux ls part_msdos reboot 
serial test vga
+GRUB2_MODULES_ISO = biosdisk boot chain configfile iso9660 linux ls part_msdos 
reboot serial test vga
 GRUB_TERMINALS =
 GRUB_SERIAL_CONFIG =
 GRUB_TERMINAL_CONFIG =
-- 
2.20.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ar71xx with kernel 4.14 - a few test results

2018-08-23 Thread Tom Psyborg
OK, which AP and client devices you used while doing that test?

On 23 August 2018 at 16:08, Dirk Brenken  wrote:

>
> Hi Tom,
>
> I haven't run any special/formal speed tests, just one speedtest.net
> measurement with "usual" 209 Mbps Download and 9.9 Mbps Upload
> (Unitymedia cable connect) via 2.4G - so nothing negative to report
> with kernel 4.14 at this stage.
>
> best regards
> Dirk
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ar71xx with kernel 4.14 - a few test results

2018-08-23 Thread Dmitry Tunin
> A bit off-topic, but what does OF stand for ?
> (that legacy code does not use DT is known).
>

OF stands for Open Firmware.
It doesn't use the DT, but the code is still there in many cases. It
is not cut out by prerocessor in many cases.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ar71xx with kernel 4.14 - a few test results

2018-08-23 Thread Paul Oranje
Op 23 aug. 2018, om 16:15 heeft Dmitry Tunin  het 
volgende geschreven:
> I think the kernel became so big because of the extra code related to
> building both OF and legacy code in many palaces.

A bit off-topic, but what does OF stand for ?
(that legacy code does not use DT is known).


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ar71xx with kernel 4.14 - a few test results

2018-08-23 Thread Dmitry Tunin
> There are other shortcomings along with upgraded kernel e.g. the
> kernel is getting so big that we may not be able to use 4M flash with
> even just basic functions of a router in a near future.
> (I remember that someone successfully fit USB support and Samba into
> 4M flash using OpenWrt Backfire 10.04 and back to those days there are
> some routers running Linux with only 16M ram.)

I think the kernel became so big because of the extra code related to
building both OF and legacy code in many palaces.
It should shrink a bit in a while.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ar71xx with kernel 4.14 - a few test results

2018-08-23 Thread Dirk Brenken
On Do, 2018-08-23 at 14:36 +0200, Tom Psyborg wrote:
> Hi Dirk
> 
> You say: "works quite fine, both radios are available,
>  no issues at all"
> 
> but no feedback on how it actually performs...
> 
> From my test I got throughput of 215Mbps on 2.4GHz wifi with 4.9
> After upgraded to 4.14 the throughput dropped to 185-190Mbps. same
> device same settings and testing conditions.
> 
> On 23/08/2018, John Crispin  wrote:
> 
> 
> On 23/08/18 11:34, Dirk Brenken wrote:
> Hi,
> 
> I've tested two router with latest master & kernel 4.14
> (OpenWrt SNAPSHOT, r7906-7e73e9128f)
> 
> - TP-Link RE-450v1 => works quite fine, both radios are available,
> no issues at all
> 
> - GL-AR750 => 2,4G works OK, 5G is no longer available, e.g. default
> wifi configuration via 'wifi config' kernel 4.9 vs. kernel 4.14:
> 
> kernel 4.9:
> 
> config wifi-device 'radio0'
>  option type 'mac80211'
>  option channel '36'
>  option hwmode '11a'
>  option path 'pci:00/:00:00.0'
>  option htmode 'VHT80'
>  option disabled '1'
> 
> config wifi-iface 'default_radio0'
>  option device 'radio0'
>  option network 'lan'
>  option mode 'ap'
>  option ssid 'OpenWrt'
>  option encryption 'none'
> 
> config wifi-device 'radio1'
>  option type 'mac80211'
>  option channel '11'
>  option hwmode '11g'
>  option path 'platform/qca953x_wmac'
>  option htmode 'HT20'
>  option disabled '1'
> 
> config wifi-iface 'default_radio1'
>  option device 'radio1'
>  option network 'lan'
>  option mode 'ap'
>  option ssid 'OpenWrt'
>  option encryption 'none'
> 
> 
> kernel 4.14:
> 
> config wifi-device 'radio0'
>  option type 'mac80211'
>  option channel '11'
>  option hwmode '11g'
>  option path 'platform/qca953x_wmac'
>  option htmode 'HT20'
>  option disabled '1'
> 
> config wifi-iface 'default_radio0'
>  option device 'radio0'
>  option network 'lan'
>  option mode 'ap'
>  option ssid 'OpenWrt'
>  option encryption 'none'
> 
> Best regards
> Dirk
> 
> 
> 
> please mail me the v4.9 and v4.14 bootlogs
>  John
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 

Hi Tom,

I haven't run any special/formal speed tests, just one speedtest.net
measurement with "usual" 209 Mbps Download and 9.9 Mbps Upload
(Unitymedia cable connect) via 2.4G - so nothing negative to report
with kernel 4.14 at this stage.

best regards
Dirk


signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ar71xx with kernel 4.14 - a few test results

2018-08-23 Thread Chuanhong Guo
Hi!
Tom Psyborg  于2018年8月23日周四 下午8:36写道:
>
> Hi Dirk
>
> You say: "works quite fine, both radios are available,
>  no issues at all"
>
> but no feedback on how it actually performs...
>
> From my test I got throughput of 215Mbps on 2.4GHz wifi with 4.9
> After upgraded to 4.14 the throughput dropped to 185-190Mbps. same
> device same settings and testing conditions.
I personally think the performance is expected to be slightly worse
because the newer kernel is bigger and more complicated.
Qualcomm Atheros addressed some performance loss in their QSDK5.3
release manual as "Limitations" where in this version they upgraded
kernel from 3.14 to 4.4. And I experienced a significant decreasing in
Samba writing speed on IPQ4019 after this kernel bump in QSDK.
There are other shortcomings along with upgraded kernel e.g. the
kernel is getting so big that we may not be able to use 4M flash with
even just basic functions of a router in a near future.
(I remember that someone successfully fit USB support and Samba into
4M flash using OpenWrt Backfire 10.04 and back to those days there are
some routers running Linux with only 16M ram.)
I guess the reason why OpenWrt still keeps bumping kernels is that
it's not realistic to maintain so many kernel versions forever. My
suggestion is that if you really care so much about the performance
loss caused by bumping kernels you can just keep using an older stable
release.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ar71xx with kernel 4.14 - a few test results

2018-08-23 Thread Tom Psyborg
Hi Dirk

You say: "works quite fine, both radios are available,
 no issues at all"

but no feedback on how it actually performs...

From my test I got throughput of 215Mbps on 2.4GHz wifi with 4.9
After upgraded to 4.14 the throughput dropped to 185-190Mbps. same
device same settings and testing conditions.

On 23/08/2018, John Crispin  wrote:
>
>
> On 23/08/18 11:34, Dirk Brenken wrote:
>> Hi,
>>
>> I've tested two router with latest master & kernel 4.14
>> (OpenWrt SNAPSHOT, r7906-7e73e9128f)
>>
>> - TP-Link RE-450v1 => works quite fine, both radios are available,
>> no issues at all
>>
>> - GL-AR750 => 2,4G works OK, 5G is no longer available, e.g. default
>> wifi configuration via 'wifi config' kernel 4.9 vs. kernel 4.14:
>>
>> kernel 4.9:
>>
>> config wifi-device 'radio0'
>>  option type 'mac80211'
>>  option channel '36'
>>  option hwmode '11a'
>>  option path 'pci:00/:00:00.0'
>>  option htmode 'VHT80'
>>  option disabled '1'
>>
>> config wifi-iface 'default_radio0'
>>  option device 'radio0'
>>  option network 'lan'
>>  option mode 'ap'
>>  option ssid 'OpenWrt'
>>  option encryption 'none'
>>
>> config wifi-device 'radio1'
>>  option type 'mac80211'
>>  option channel '11'
>>  option hwmode '11g'
>>  option path 'platform/qca953x_wmac'
>>  option htmode 'HT20'
>>  option disabled '1'
>>
>> config wifi-iface 'default_radio1'
>>  option device 'radio1'
>>  option network 'lan'
>>  option mode 'ap'
>>  option ssid 'OpenWrt'
>>  option encryption 'none'
>>
>>
>> kernel 4.14:
>>
>> config wifi-device 'radio0'
>>  option type 'mac80211'
>>  option channel '11'
>>  option hwmode '11g'
>>  option path 'platform/qca953x_wmac'
>>  option htmode 'HT20'
>>  option disabled '1'
>>
>> config wifi-iface 'default_radio0'
>>  option device 'radio0'
>>  option network 'lan'
>>  option mode 'ap'
>>  option ssid 'OpenWrt'
>>  option encryption 'none'
>>
>> Best regards
>> Dirk
>>
>>
>
> please mail me the v4.9 and v4.14 bootlogs
>      John
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ar71xx with kernel 4.14 - a few test results

2018-08-23 Thread John Crispin



On 23/08/18 11:34, Dirk Brenken wrote:

Hi,

I've tested two router with latest master & kernel 4.14
(OpenWrt SNAPSHOT, r7906-7e73e9128f)

- TP-Link RE-450v1 => works quite fine, both radios are available,
no issues at all

- GL-AR750 => 2,4G works OK, 5G is no longer available, e.g. default
wifi configuration via 'wifi config' kernel 4.9 vs. kernel 4.14:

kernel 4.9:

config wifi-device 'radio0'
 option type 'mac80211'
 option channel '36'
 option hwmode '11a'
 option path 'pci:00/:00:00.0'
 option htmode 'VHT80'
 option disabled '1'

config wifi-iface 'default_radio0'
 option device 'radio0'
 option network 'lan'
 option mode 'ap'
 option ssid 'OpenWrt'
 option encryption 'none'

config wifi-device 'radio1'
 option type 'mac80211'
 option channel '11'
 option hwmode '11g'
 option path 'platform/qca953x_wmac'
 option htmode 'HT20'
 option disabled '1'

config wifi-iface 'default_radio1'
 option device 'radio1'
 option network 'lan'
 option mode 'ap'
 option ssid 'OpenWrt'
 option encryption 'none'


kernel 4.14:

config wifi-device 'radio0'
 option type 'mac80211'
 option channel '11'
 option hwmode '11g'
 option path 'platform/qca953x_wmac'
 option htmode 'HT20'
 option disabled '1'

config wifi-iface 'default_radio0'
 option device 'radio0'
 option network 'lan'
 option mode 'ap'
 option ssid 'OpenWrt'
 option encryption 'none'

Best regards
Dirk




please mail me the v4.9 and v4.14 bootlogs
    John

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] ar71xx with kernel 4.14 - a few test results

2018-08-23 Thread Dirk Brenken
Hi,

I've tested two router with latest master & kernel 4.14 
(OpenWrt SNAPSHOT, r7906-7e73e9128f)

- TP-Link RE-450v1 => works quite fine, both radios are available,
no issues at all

- GL-AR750 => 2,4G works OK, 5G is no longer available, e.g. default
wifi configuration via 'wifi config' kernel 4.9 vs. kernel 4.14:

kernel 4.9:

config wifi-device 'radio0'
option type 'mac80211'
option channel '36'
option hwmode '11a'
option path 'pci:00/:00:00.0'
option htmode 'VHT80'
option disabled '1'

config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'

config wifi-device 'radio1'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/qca953x_wmac'
option htmode 'HT20'
option disabled '1'

config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'


kernel 4.14:

config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/qca953x_wmac'
option htmode 'HT20'
option disabled '1'

config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'

Best regards
Dirk


signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] automated hardware test setup

2018-08-13 Thread Alexander Couzens
Hi,

I've won the prototype fund to work for the next 6 months on building
up an automated hardware testing infrastructure [0].

I'll use LAVA [1] for it. The rough idea is to bootstrap an
infrastructure for hw tests which also allow the community to
contribute.

Documentation is part of project which will cover the setup to
allow replicating the whole setup or parts of it.

It's possible to contribute to the setup by adding tests or
devices.

To get the project started, I'll start integrating 1 or 2 devices of 
an architecture. While write test cases.
Later on I'll create a dashboard of the test cases and overview of
the tests. There should be even statistics over the performance of
the devices while OpenWrt develops, e.g: iperf or nat performance.

So far I've the following architectures in mind:
ar71xx/ath79
ramips
x86
lantiq

Feel free to give me feedback or test cases, you like to see.

Best,
lynxis

[0] (german) 
https://prototypefund.de/project/automatisches-hardware-testsystem-fuer-openwrt/
[1] (software) https://validation.linaro.org/
[2] (instance) https://lava.fe80.eu/
[3] (code) https://code.fe80.eu/openwrt-lava/
-- 
Alexander Couzens

mail: lyn...@fe80.eu
jabber: lyn...@fe80.eu
mobile: +4915123277221
gpg: 390D CF78 8BF9 AA50 4F8F  F1E2 C29E 9DA6 A0DF 8604


pgpdEmgLPtyCX.pgp
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


test

2018-05-17 Thread David Woodhouse
test

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [LEDE-DEV] Test results of OpenWrt 15.05.1 according to BSI test concept for home routers

2017-04-27 Thread Nemesis
On 04/26/2017 10:23 PM, Eric Schultz wrote:
> On 04/08/2017 11:38 AM, Hauke Mehrtens wrote:
> 
>> The German Bundesamt für Sicherheit in der Informationstechnik (short:
>> BSI, English: Federal Office for Information Security) published a
>> "Testkonzept für Breitband-Router (DSL-, Kabel-, SOHO-, CE-, CPE-Router,
>> IADs)" (English: Test concept for broadband routers). This test concept
>> is only available in German and most chapters are published in the
>> public by the BSI, chapter 4 and 5 are only available after signing a
>> NDA (Traffic Light Protocol) with the BSI:
>> https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Cyber-Sicherheit/Themen/Testkonzept-Breitbandrouter.pdf?__blob=publicationFile=5
>>
>> Some unnamed organization tested OpenWrt 15.05.1 on a TP-Link  TL-WR841N
>> V10.0 according to this test concept. Because I commented on the first
>> public draft of the test concept and said that I am active in the
>> OpenWrt project, the organization contacted me to check if their test
>> results are correct and provided me with the full test report under NDA.
>>
>>
>> OpenWrt 15.05.1 failed this test and LEDE will probably also fail this
>> test, because we failed on section 4.5.1 "Firewall-Bypass", which is a
>> criterion for exclusion (Ausschlusskriterium), see details below.
>>
>> The test concept focus on "normal" routers and only tests the web GUI
>> and also looks mostly on features normal home routers have. We are
>> missing some functionality like individual default password, for the web
>> GUI and the Wifi, the logging is not very good and so on. The tests
>> regarding DNS are interesting and more advanced, if someone wants to
>> look into that it would be very nice.
>>
>> The main problem is in section 4.5.1 "Firewall-Bypass".
>> OpenWrt and LEDE implement RFC4890 section 4.3.1:
>> ---
>> 4.3.1.  Traffic That Must Not Be Dropped
>>
>>Error messages that are essential to the establishment and
>>maintenance of communications:
>>
>>o  Destination Unreachable (Type 1) - All codes
>>o  Packet Too Big (Type 2)
>>o  Time Exceeded (Type 3) - Code 0 only
>>o  Parameter Problem (Type 4) - Codes 1 and 2 only
>>
>>Appendix A.4 suggests some more specific checks that could be
>>performed on Parameter Problem messages if a firewall has the
>>necessary packet inspection capabilities.
>>
>>Connectivity checking messages:
>>
>>o  Echo Request (Type 128)
>>o  Echo Response (Type 129)
>> ---
>>
>> The BSI used RFC6092 (Recommended Simple Security Capabilities in
>> Customer Premises Equipment (CPE) for Providing Residential IPv6
>> Internet Service) with this section as the base for the test:
>> ---
>> 3.2.1.  Internet Control and Management
>>
>>Recommendations for filtering ICMPv6 messages in firewall devices are
>>described separately in [RFC4890] and apply to residential gateways,
>>with the additional recommendation that incoming "Destination
>>Unreachable" and "Packet Too Big" error messages that don't match any
>>filtering state should be dropped.
>>
>>REC-10: IPv6 gateways SHOULD NOT forward ICMPv6 "Destination
>>Unreachable" and "Packet Too Big" messages containing IP headers that
>>do not match generic upper-layer transport state records.
>> ---
>>
>>
>> Attached are the results of this test of OpenWrt 15.05.1. The
>> information on how the tests from chapter 4 and 5 are done is redacted
>> from the document, if you want to work on these problems and would like
>> to get more details about the problems from chapter 4 and 5, please
>> contact me. I can also help you with translating the problem from German
>> to English. ;-)
>>
>> The "sensitive" informations are under the Traffic Light Protocol
>> classification "TLP AMBER", see these German information about the NDA:
>> https://mip.bsi.bund.de/Anlage_1_TLP-Merkblatt.pdf
>>
>>
>> I commented on the tests itself, because they are missing many important
>> stuff to test, most of the security problem of IoT devices and home
>> routers one hears about in the media are not covered here at all.
>>
>>
>> 

Re: [OpenWrt-Devel] Test results of OpenWrt 15.05.1 according to BSI test concept for home routers

2017-04-26 Thread Eric Schultz
On 04/08/2017 11:38 AM, Hauke Mehrtens wrote:

> The German Bundesamt für Sicherheit in der Informationstechnik (short:
> BSI, English: Federal Office for Information Security) published a
> "Testkonzept für Breitband-Router (DSL-, Kabel-, SOHO-, CE-, CPE-Router,
> IADs)" (English: Test concept for broadband routers). This test concept
> is only available in German and most chapters are published in the
> public by the BSI, chapter 4 and 5 are only available after signing a
> NDA (Traffic Light Protocol) with the BSI:
> https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Cyber-Sicherheit/Themen/Testkonzept-Breitbandrouter.pdf?__blob=publicationFile=5
>
> Some unnamed organization tested OpenWrt 15.05.1 on a TP-Link  TL-WR841N
> V10.0 according to this test concept. Because I commented on the first
> public draft of the test concept and said that I am active in the
> OpenWrt project, the organization contacted me to check if their test
> results are correct and provided me with the full test report under NDA.
>
>
> OpenWrt 15.05.1 failed this test and LEDE will probably also fail this
> test, because we failed on section 4.5.1 "Firewall-Bypass", which is a
> criterion for exclusion (Ausschlusskriterium), see details below.
>
> The test concept focus on "normal" routers and only tests the web GUI
> and also looks mostly on features normal home routers have. We are
> missing some functionality like individual default password, for the web
> GUI and the Wifi, the logging is not very good and so on. The tests
> regarding DNS are interesting and more advanced, if someone wants to
> look into that it would be very nice.
>
> The main problem is in section 4.5.1 "Firewall-Bypass".
> OpenWrt and LEDE implement RFC4890 section 4.3.1:
> ---
> 4.3.1.  Traffic That Must Not Be Dropped
>
>Error messages that are essential to the establishment and
>maintenance of communications:
>
>o  Destination Unreachable (Type 1) - All codes
>o  Packet Too Big (Type 2)
>o  Time Exceeded (Type 3) - Code 0 only
>o  Parameter Problem (Type 4) - Codes 1 and 2 only
>
>Appendix A.4 suggests some more specific checks that could be
>performed on Parameter Problem messages if a firewall has the
>necessary packet inspection capabilities.
>
>Connectivity checking messages:
>
>o  Echo Request (Type 128)
>o  Echo Response (Type 129)
> ---
>
> The BSI used RFC6092 (Recommended Simple Security Capabilities in
> Customer Premises Equipment (CPE) for Providing Residential IPv6
> Internet Service) with this section as the base for the test:
> ---
> 3.2.1.  Internet Control and Management
>
>Recommendations for filtering ICMPv6 messages in firewall devices are
>described separately in [RFC4890] and apply to residential gateways,
>with the additional recommendation that incoming "Destination
>Unreachable" and "Packet Too Big" error messages that don't match any
>filtering state should be dropped.
>
>REC-10: IPv6 gateways SHOULD NOT forward ICMPv6 "Destination
>Unreachable" and "Packet Too Big" messages containing IP headers that
>do not match generic upper-layer transport state records.
> ---
>
>
> Attached are the results of this test of OpenWrt 15.05.1. The
> information on how the tests from chapter 4 and 5 are done is redacted
> from the document, if you want to work on these problems and would like
> to get more details about the problems from chapter 4 and 5, please
> contact me. I can also help you with translating the problem from German
> to English. ;-)
>
> The "sensitive" informations are under the Traffic Light Protocol
> classification "TLP AMBER", see these German information about the NDA:
> https://mip.bsi.bund.de/Anlage_1_TLP-Merkblatt.pdf
>
>
> I commented on the tests itself, because they are missing many important
> stuff to test, most of the security problem of IoT devices and home
> routers one hears about in the media are not covered here at all.
>
>
> History:
> 20.10.2015: I read this article https://heise.de/-2851354 and wrote some
> comments to the BSI based on the first public draft. In this mail I
> mentioned that I am activate in the OpenWrt project.
> 23.10.2015: The BSI answered me and offered me the full draft when I
> would sign an NDA, I did so and got the full document, but did not
> comment on it again.
> 23.2.2

Re: [OpenWrt-Devel] [PATCH 3/3] lantiq: ltq-deu: Remove the "DEU test manager"

2016-01-17 Thread Felix Fietkau
On 2016-01-11 15:25, Martin Blumenstingl wrote:
> Remove the "DEU test manager" code which has not been used for more than
> two years (as the kernel module is not installed anymore since
> aa65888e08ec7279cfecc24c5bfe71cf9a016b91).
> This fixes compilation on kernel 4.3 (which removes
> aead_request_set_assoc) and newer.
> 
> Signed-off-by: Martin Blumenstingl <martin.blumensti...@googlemail.com>
> ---
This patch doesn't apply for me.

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] lantiq: ltq-deu: Remove the "DEU test manager"

2016-01-11 Thread Martin Blumenstingl
Remove the "DEU test manager" code which has not been used for more than
two years (as the kernel module is not installed anymore since
aa65888e08ec7279cfecc24c5bfe71cf9a016b91).
This fixes compilation on kernel 4.3 (which removes
aead_request_set_assoc) and newer.

Signed-off-by: Martin Blumenstingl <martin.blumensti...@googlemail.com>
---
 package/kernel/lantiq/ltq-deu/src/Makefile |2 -
 .../kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c| 3961 
 2 files changed, 3963 deletions(-)
 delete mode 100644 package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c

diff --git a/package/kernel/lantiq/ltq-deu/src/Makefile 
b/package/kernel/lantiq/ltq-deu/src/Makefile
index f6cb9c9..555f0f6 100644
--- a/package/kernel/lantiq/ltq-deu/src/Makefile
+++ b/package/kernel/lantiq/ltq-deu/src/Makefile
@@ -22,5 +22,3 @@ ifeq ($(BUILD_VARIANT),vr9)
   ltq_deu_vr9-objs = ifxmips_deu.o ifxmips_deu_vr9.o ifxmips_des.o 
ifxmips_aes.o ifxmips_arc4.o \
ifxmips_sha1.o ifxmips_md5.o ifxmips_sha1_hmac.o 
ifxmips_md5_hmac.o
 endif
-
-obj-m += ltq_deu_testmgr.o
diff --git a/package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c 
b/package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c
deleted file mode 100644
index 054cac3..000
--- a/package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c
+++ /dev/null
@@ -1,3961 +0,0 @@
-/*
- * Algorithm testing framework and tests.
- *
- * Copyright (c) 2002 James Morris <jmor...@intercode.com.au>
- * Copyright (c) 2002 Jean-Francois Dive <j...@linuxbe.org>
- * Copyright (c) 2007 Nokia Siemens Networks
- * Copyright (c) 2008 Herbert Xu <herb...@gondor.apana.org.au>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "internal.h"
-#include "ifxmips_testmgr.h"
-#include "ifxmips_tcrypt.h"
-#include "ifxmips_deu.h"
-
-/* changes for LQ ablkcipher speedtest */
-#include 
-#include 
-#include 
-
-/*
- * Need slab memory for testing (size in number of pages).
- */
-#define XBUFSIZE   8
-
-/*
- * Indexes into the xbuf to simulate cross-page access.
- */
-#define IDX1   32
-#define IDX2   32400
-#define IDX3   1
-#define IDX4   8193
-#define IDX5   2
-#define IDX6   17101
-#define IDX7   27333
-#define IDX8   3000
-
-/*
-* Used by test_cipher()
-*/
-#define ENCRYPT 1
-#define DECRYPT 0
-
-/*
- * Need slab memory for testing (size in number of pages).
- */
-#define TVMEMSIZE  4
-
-/*
-* Used by test_cipher_speed()
-*/
-#define ENCRYPT 1
-#define DECRYPT 0
-
-/*
- * Used by test_cipher_speed()
- */
-
-#ifndef INIT_COMPLETION
-#define INIT_COMPLETION(a) reinit_completion()
-#endif
-
-
-static unsigned int sec;
-
-static char *alg = NULL;
-static u32 type;
-static u32 mask;
-static int mode;
-static char *tvmem[TVMEMSIZE];
-
-static char *check[] = {
-   "des", "md5", "des3_ede", "rot13", "sha1", "sha224", "sha256",
-   "blowfish", "twofish", "serpent", "sha384", "sha512", "md4", "aes",
-   "cast6", "arc4", "michael_mic", "deflate", "crc32c", "tea", "xtea",
-   "khazad", "wp512", "wp384", "wp256", "tnepres", "xeta",  "fcrypt",
-   "camellia", "seed", "salsa20", "rmd128", "rmd160", "rmd256", "rmd320",
-   "lzo", "cts", "zlib", NULL
-};
-struct tcrypt_result {
-   struct completion completion;
-   int err;
-};
-
-struct aead_test_suite {
-   struct {
-   struct aead_testvec *vecs;
-   unsigned int count;
-   } enc, dec;
-};
-
-struct cipher_test_suite {
-   struct {
-   struct cipher_testvec *vecs;
-   unsigned int count;
-   } enc, dec;
-};
-
-struct comp_test_suite {
-   struct {
-   struct comp_testvec *vecs;
-   unsigned int count;
-   } comp, decomp;
-};
-
-struct pcomp_test_suite {
-   struct {
-   struct pcomp_testvec *vecs;
-   unsigned int count;
-   } comp, decomp;
-};
-
-struct hash_test_suite {
-   struct hash_testvec *vecs;
-   unsigned int count;
-};
-
-struct cprng_test_suite {
-   struct cprng_testvec *vecs;
-   unsigned int count;
-};
-
-struct alg_test_desc {
-   const char *alg;
-

[OpenWrt-Devel] Just open-sourced our OpenWrt Router test framework

2015-08-25 Thread Michael Anderson
Hi,

The lawyers of company I work for, Qualcomm, finally agreed to let me post
our project to github:

https://github.com/qca/boardfarm

Long story short, our team needed an automated way to flash/sysupgrade new
daily builds of openwrt-based software onto various devices, run tests, and
report results.  We needed to use it with continuous integration software
like Jenkins so that we could test new code changes to router software
before they are merged.

So, we started this project two years ago, it's grown quite a bit, and it's
been fantastic at catching kernel panics, memory leaks, networking
problems, and more.  We run it on dozens of different boards every day.
It's all written in Python, including the tests.  There's more details at
the above link.

I also included a document on how to setup a single router test station
https://github.com/qca/boardfarm/blob/master/docs/BOARD_FARM.md. That's
just an example using inexpensive computers, but any linux computers will
do.


Anyway, just wanted to let people know this exists in case there's some
interest.  We continue to work on this and improve this.  We actually have
server racks filled with many devices for running these tests.

Michael Anderson, Ph.D.
Snr Engineer
1-512-532-3029
AUS.B-340N
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Broken GCC 4.9 (and 5.2) on ARM - asking for review/test

2015-08-21 Thread John Szakmeister
On Thu, Aug 20, 2015 at 6:57 AM, Jonas Gorski j...@openwrt.org wrote:
 Hi,

 On Thu, Aug 20, 2015 at 11:40 AM, Dirk Neukirchen dirkneukirc...@web.de 
 wrote:
 GCC 4.9 was marked BROKEN with r46089. Recently GCC 5.2 was added (marked as 
 broken too)

 commit msg:  toolchain: mark gcc 4.9 as broken, it miscompiles some code 
 especially on ARM

 Looking through some GCC 5 serious regressions I found:

 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932

 I cannot replicate the ARM issue because of missing details and I dont have 
 ARM hw where it occurs (arch: malta seems fine)
  - but there was an open ticket from a dev on github regarding the boot 
 problem, which might be a symptom of code miscompile

 https://github.com/wongsyrone/openwrt-1/issues/44

 According to his tests GCC4.9 and GCC5.2 now work with this 2 changes:

 adding -fno-ipa-sra to Kernel/CPU CFLAGS

 https://github.com/wongsyrone/openwrt-1/commit/35308f2435ec75192324d68817e7702e3b257e71
 https://github.com/wongsyrone/openwrt-1/commit/93c0a5173414cfa7684547de3c3a1f3dc4240383

 Readin the bug ticket, it seems that

 https://gcc.gnu.org/bugzilla/attachment.cgi?id=35775action=diff

 should fix the issue at the root cause, but with the disadvantage of
 breaking some testcases relying on the (mis-?)behaviour, which sounds
 like the blocker for this change.

 So I wonder if adding that wouldn't be a better solution.

I don't think that's the only bug affecting ARM.  At least for us,
against an ARM11, we found that there is some other optimization that
results in broken code generation (numbers where being converted to
unsigned, and the optimization failed to convert them back to signed
correctly).  We reported it several months ago, but haven't heard
anything.  I'm not sure what else it broke, but the kernel logging was
the most noticeable.

-John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Broken GCC 4.9 (and 5.2) on ARM - asking for review/test

2015-08-20 Thread Dirk Neukirchen
GCC 4.9 was marked BROKEN with r46089. Recently GCC 5.2 was added (marked as 
broken too)

commit msg:  toolchain: mark gcc 4.9 as broken, it miscompiles some code 
especially on ARM

Looking through some GCC 5 serious regressions I found:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932

I cannot replicate the ARM issue because of missing details and I dont have ARM 
hw where it occurs (arch: malta seems fine)
 - but there was an open ticket from a dev on github regarding the boot 
problem, which might be a symptom of code miscompile

https://github.com/wongsyrone/openwrt-1/issues/44

According to his tests GCC4.9 and GCC5.2 now work with this 2 changes:

adding -fno-ipa-sra to Kernel/CPU CFLAGS

https://github.com/wongsyrone/openwrt-1/commit/35308f2435ec75192324d68817e7702e3b257e71
https://github.com/wongsyrone/openwrt-1/commit/93c0a5173414cfa7684547de3c3a1f3dc4240383
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Broken GCC 4.9 (and 5.2) on ARM - asking for review/test

2015-08-20 Thread Jonas Gorski
Hi,

On Thu, Aug 20, 2015 at 11:40 AM, Dirk Neukirchen dirkneukirc...@web.de wrote:
 GCC 4.9 was marked BROKEN with r46089. Recently GCC 5.2 was added (marked as 
 broken too)

 commit msg:  toolchain: mark gcc 4.9 as broken, it miscompiles some code 
 especially on ARM

 Looking through some GCC 5 serious regressions I found:

 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932

 I cannot replicate the ARM issue because of missing details and I dont have 
 ARM hw where it occurs (arch: malta seems fine)
  - but there was an open ticket from a dev on github regarding the boot 
 problem, which might be a symptom of code miscompile

 https://github.com/wongsyrone/openwrt-1/issues/44

 According to his tests GCC4.9 and GCC5.2 now work with this 2 changes:

 adding -fno-ipa-sra to Kernel/CPU CFLAGS

 https://github.com/wongsyrone/openwrt-1/commit/35308f2435ec75192324d68817e7702e3b257e71
 https://github.com/wongsyrone/openwrt-1/commit/93c0a5173414cfa7684547de3c3a1f3dc4240383

Readin the bug ticket, it seems that

https://gcc.gnu.org/bugzilla/attachment.cgi?id=35775action=diff

should fix the issue at the root cause, but with the disadvantage of
breaking some testcases relying on the (mis-?)behaviour, which sounds
like the blocker for this change.

So I wonder if adding that wouldn't be a better solution.


Jonas
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] prereq-build: use HOST* variables to test host compiler

2015-07-21 Thread Lawrence D'Anna
We might need HOST_CPPFLAGS and HOST_LDFLAGS to find libraries.
---
 include/prereq-build.mk | 28 +---
 1 file changed, 9 insertions(+), 19 deletions(-)

diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index 53eac37..6c8cbf1 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -26,49 +26,39 @@ $(eval $(call TestHostCommand,case-sensitive-fs, \
 
 $(eval $(call SetupHostCommand,gcc, \
Please install the GNU C Compiler (gcc), \
-   $(CC) --version | grep gcc, \
-   gcc --version | grep gcc, \
-   gcc49 --version | grep gcc, \
-   gcc48 --version | grep gcc, \
-   gcc47 --version | grep gcc, \
-   gcc46 --version | grep gcc, \
-   gcc --version | grep Apple.LLVM ))
+   $(HOSTCC) --version | grep gcc, \
+   $(HOSTCC) --version | grep Apple.LLVM ))
 
 $(eval $(call TestHostCommand,working-gcc, \
Please reinstall the GNU C Compiler - it appears to be broken, \
echo 'int main(int argc, char **argv) { return 0; }' | \
-   gcc -x c -o $(TMP_DIR)/a.out -))
+   $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -x c -o 
$(TMP_DIR)/a.out -))
 
 $(eval $(call SetupHostCommand,g++, \
Please install the GNU C++ Compiler (g++), \
-   $(CXX) --version | grep g++, \
-   g++ --version | grep g++, \
-   g++49 --version | grep g++, \
-   g++48 --version | grep g++, \
-   g++47 --version | grep g++, \
-   g++46 --version | grep g++, \
-   g++ --version | grep Apple.LLVM ))
+   $(HOSTCXX) --version | grep g++, \
+   $(HOSTCXX) --version | grep Apple.LLVM ))
 
 $(eval $(call TestHostCommand,working-g++, \
Please reinstall the GNU C++ Compiler - it appears to be broken, \
echo 'int main(int argc, char **argv) { return 0; }' | \
-   g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++  \
+   $(HOSTCXX) $(HOST_CFLAGS) $(HOST_LDFLAGS) -x c++ -o 
$(TMP_DIR)/a.out - -lstdc++  \
$(TMP_DIR)/a.out))
 
 $(eval $(call TestHostCommand,ncurses, \
Please install ncurses. (Missing libncurses.so or ncurses.h), \
echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \
-   gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses))
+   $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -include ncurses.h -x 
c -o $(TMP_DIR)/a.out - -lncurses))
 
 $(eval $(call TestHostCommand,zlib, \
Please install zlib. (Missing libz.so or zlib.h), \
echo 'int main(int argc, char **argv) { gzdopen(0, rb); return 0; }' 
| \
-   gcc -include zlib.h -x c -o $(TMP_DIR)/a.out - -lz))
+   $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -include zlib.h -x c 
-o $(TMP_DIR)/a.out - -lz))
 
 $(eval $(call TestHostCommand,libssl, \
Please install the openssl library (with development headers), \
echo 'int main(int argc, char **argv) { SSL_library_init(); return 0; 
}' | \
-   gcc -include openssl/ssl.h -x c -o $(TMP_DIR)/a.out - -lcrypto 
-lssl))
+   $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -include openssl/ssl.h 
-x c -o $(TMP_DIR)/a.out - -lcrypto -lssl))
 
 
 $(eval $(call SetupHostCommand,tar,Please install GNU 'tar', \
-- 
2.3.8 (Apple Git-58)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWrt Specific Linux Test Project Required

2015-06-11 Thread Dirk Neukirchen
On 11.06.2015 14:16, Anindya Sundar Gayen wrote:
 Linux Test Project

I never heard of that before. Can you clarify ?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWrt Specific Linux Test Project Required

2015-06-11 Thread Anindya Sundar Gayen
Dear Team,


Can you please specify where I `ll get the OpenWrt 14.07 specific Linux 
Test Project.



Thanks  regards,
Anindya Sundar Gayen
Contact | 7842753740
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] OpenWrt Specific Linux Test Project Required

2015-06-04 Thread Anindya Sundar Gayen
Dear Team,


Can you please specify where I `ll get the OpenWrt 14.07 specific Linux 
Test Project.



Thanks  regards,
Anindya Sundar Gayen
Contact | 7842753740
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/4] tests: add test case for parsing long option values.

2015-05-25 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/tests.d/070_revert |   19 +++
 1 file changed, 19 insertions(+)

diff --git a/test/tests.d/070_revert b/test/tests.d/070_revert
index 6035f6f..fc9f5f3 100644
--- a/test/tests.d/070_revert
+++ b/test/tests.d/070_revert
@@ -26,3 +26,22 @@ test_revert_option_multiline()
${UCI} revert revert.SEC0.option1
assertSameFile ${REF_DIR}/revert_option_multiline.result 
$CHANGES_DIR/revert
 }
+
+test_revert_option_long()
+{
+   local val=$(head -c 8192  /dev/zero | tr '\0' 'a')
+   local res
+
+   touch ${CONFIG_DIR}/p
+
+   ${UCI} set p.s=sec
+   ${UCI} set p.s.o=$val
+
+   res=$(${UCI} changes)
+   assertEquals p.s='sec'
+p.s.o='$val' $res
+
+   ${UCI} revert p
+   res=$(${UCI} changes)
+   assertEquals  $res
+}
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] tests: add test coverage for comment lines within batch commands.

2015-04-09 Thread yszhou4tech
From: Yousong Zhou yszhou4t...@gmail.com


Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/references/batch_comments.result |9 +
 test/tests.d/060_batch|   26 ++
 2 files changed, 35 insertions(+)
 create mode 100644 test/references/batch_comments.result

diff --git a/test/references/batch_comments.result 
b/test/references/batch_comments.result
new file mode 100644
index 000..c726bad
--- /dev/null
+++ b/test/references/batch_comments.result
@@ -0,0 +1,9 @@
+
+config section 'SEC0'
+   option option0 'value0'
+   option option1 'Hello,
+  World'
+
+config section 'SEC1'
+   option option0 'value1'
+
diff --git a/test/tests.d/060_batch b/test/tests.d/060_batch
index 49d15e4..40f473b 100644
--- a/test/tests.d/060_batch
+++ b/test/tests.d/060_batch
@@ -15,3 +15,29 @@ EOF
assertSameFile ${REF_DIR}/batch_set.result ${CONFIG_DIR}/batch_set
 }
 
+test_batch_comments()
+{
+   touch ${CONFIG_DIR}/batch_comments
+
+${UCI} batch EOF
+# first line comment
+set batch_comments.SEC0='section'
+set batch_comments.SEC0.option0='value0'
+
+# two consecutive blank lines
+# two consecutive blank lines
+
+
+set batch_comments.SEC0.option1='Hello,
+'  World\
+set batch_comments.SEC1='section'
+set batch_comments.SEC1.option0=value1
+
+# comment line starts with spaces.
+
+commit
+# last line comment
+EOF
+
+   assertSameFile ${REF_DIR}/batch_comments.result 
${CONFIG_DIR}/batch_comments
+}
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] tests: add test coverage for uci export with -P option.

2015-04-01 Thread Yousong Zhou
 - With uci -P xxx/ export, changes in xxx/ should be applied last.
 - With uci -p xxx/ commit, changes in xxx/ should be applied before
   ctx-savedir.

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/references/cli.options.delta.commit.result |5 +
 test/references/cli.options.delta.export.result |5 +
 test/references/options.delta.result|5 -
 test/tests.d/090_cli_options|   16 
 4 files changed, 22 insertions(+), 9 deletions(-)
 create mode 100644 test/references/cli.options.delta.commit.result
 create mode 100644 test/references/cli.options.delta.export.result
 delete mode 100644 test/references/options.delta.result

diff --git a/test/references/cli.options.delta.commit.result 
b/test/references/cli.options.delta.commit.result
new file mode 100644
index 000..3119b6f
--- /dev/null
+++ b/test/references/cli.options.delta.commit.result
@@ -0,0 +1,5 @@
+
+config sectype 'sec0'
+   list li0 '1'
+   list li0 '0'
+
diff --git a/test/references/cli.options.delta.export.result 
b/test/references/cli.options.delta.export.result
new file mode 100644
index 000..5aa71ce
--- /dev/null
+++ b/test/references/cli.options.delta.export.result
@@ -0,0 +1,5 @@
+package delta
+
+config sectype 'sec0'
+   list li0 '0'
+   list li0 '1'
diff --git a/test/references/options.delta.result 
b/test/references/options.delta.result
deleted file mode 100644
index 3119b6f..000
--- a/test/references/options.delta.result
+++ /dev/null
@@ -1,5 +0,0 @@
-
-config sectype 'sec0'
-   list li0 '1'
-   list li0 '0'
-
diff --git a/test/tests.d/090_cli_options b/test/tests.d/090_cli_options
index 52052a3..55920a2 100644
--- a/test/tests.d/090_cli_options
+++ b/test/tests.d/090_cli_options
@@ -1,6 +1,7 @@
 test_add_delta() {
local new_savedir=$TMP_DIR/new_savedir
local config_delta=$CONFIG_DIR/delta
+   local cmdoutput
 
# add normal changes
touch $config_delta
@@ -16,11 +17,18 @@ test_add_delta() {
assertEquals delta.sec0='sectype'
 delta.sec0.li0+='0' $($UCI changes)
 
-   # check combined changes.  order matters here.
+   # check combined changes.  Order matters here.
+   cmdoutput=$($UCI -P $new_savedir changes)
+   assertTrue $?
assertEquals delta.sec0='sectype'
-delta.sec0.li0+='1'
+delta.sec0.li0+='0'
 delta.sec0='sectype'
-delta.sec0.li0+='0' $($UCI -P $new_savedir changes)
+delta.sec0.li0+='1' $cmdoutput
+
+   # check combined export.  Order matters here.
+   cmdoutput=$($UCI -P $new_savedir export)
+   assertTrue $?
+   assertEquals $(cat $REF_DIR/cli.options.delta.export.result) 
$cmdoutput
 
# check CLI_FLAG_NOCOMMIT with -P option.
$UCI -P $new_savedir commit
@@ -30,7 +38,7 @@ delta.sec0.li0+='0' $($UCI -P $new_savedir changes)
# check normal commit.
$UCI -p $new_savedir commit
assertTrue $?
-   assertSameFile $REF_DIR/options.delta.result $config_delta
+   assertSameFile $REF_DIR/cli.options.delta.commit.result 
$config_delta
 
rm -rf $new_savedir
rm -f $config_delta
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] tests: add test cases for -P and -p options.

2015-03-31 Thread Yousong Zhou
---
 test/references/options.delta.result |5 +
 test/tests.d/090_cli_options |   38 ++
 2 files changed, 43 insertions(+)
 create mode 100644 test/references/options.delta.result
 create mode 100644 test/tests.d/090_cli_options

diff --git a/test/references/options.delta.result 
b/test/references/options.delta.result
new file mode 100644
index 000..3119b6f
--- /dev/null
+++ b/test/references/options.delta.result
@@ -0,0 +1,5 @@
+
+config sectype 'sec0'
+   list li0 '1'
+   list li0 '0'
+
diff --git a/test/tests.d/090_cli_options b/test/tests.d/090_cli_options
new file mode 100644
index 000..52052a3
--- /dev/null
+++ b/test/tests.d/090_cli_options
@@ -0,0 +1,38 @@
+test_add_delta() {
+   local new_savedir=$TMP_DIR/new_savedir
+   local config_delta=$CONFIG_DIR/delta
+
+   # add normal changes
+   touch $config_delta
+   $UCI set delta.sec0=sectype
+   $UCI add_list delta.sec0.li0=0
+
+   # save new changes in $new_savedir
+   mkdir -p $new_savedir
+   touch $new_savedir/delta
+   $UCI -P $new_savedir set delta.sec0=sectype
+   $UCI -P $new_savedir add_list delta.sec0.li0=1
+
+   assertEquals delta.sec0='sectype'
+delta.sec0.li0+='0' $($UCI changes)
+
+   # check combined changes.  order matters here.
+   assertEquals delta.sec0='sectype'
+delta.sec0.li0+='1'
+delta.sec0='sectype'
+delta.sec0.li0+='0' $($UCI -P $new_savedir changes)
+
+   # check CLI_FLAG_NOCOMMIT with -P option.
+   $UCI -P $new_savedir commit
+   assertTrue $?
+   assertEquals  $(cat $config_delta)
+
+   # check normal commit.
+   $UCI -p $new_savedir commit
+   assertTrue $?
+   assertSameFile $REF_DIR/options.delta.result $config_delta
+
+   rm -rf $new_savedir
+   rm -f $config_delta
+}
+
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 1/3] testenv: test for exit status of uci export.

2015-03-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/tests.d/010_export |8 
 1 file changed, 8 insertions(+)

diff --git a/test/tests.d/010_export b/test/tests.d/010_export
index 259f988..584bcc8 100644
--- a/test/tests.d/010_export
+++ b/test/tests.d/010_export
@@ -1,6 +1,14 @@
 test_export ()
 {
cp ${REF_DIR}/export.data ${CONFIG_DIR}/export
+
+   ${UCI_Q} export nilpackage
+   assertFalse $?
+
+   ${UCI_Q} export export 1/dev/null 21
+   assertTrue $?
+
${UCI} export  ${TMP_DIR}/export.result
+   assertTrue $?
assertSameFile ${REF_DIR}/export.result ${TMP_DIR}/export.result
 }
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] testenv: test for exit status of uci export.

2015-03-07 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/tests.d/010_export |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/test/tests.d/010_export b/test/tests.d/010_export
index 259f988..beb0f6c 100644
--- a/test/tests.d/010_export
+++ b/test/tests.d/010_export
@@ -1,6 +1,14 @@
 test_export ()
 {
cp ${REF_DIR}/export.data ${CONFIG_DIR}/export
+
+   ${UCI_Q} export nilpackage
+   assertFalse $?
+
+   ${UCI_Q} export export 1/dev/null 21
+   assertTrue $?
+
${UCI} export  ${TMP_DIR}/export.result
-   assertSameFile ${REF_DIR}/export.result ${TMP_DIR}/export.result
+   assertTrue $?
+   #assertSameFile ${REF_DIR}/export.result ${TMP_DIR}/export.result
 }
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] looking for at91 test hardware

2015-02-16 Thread Owen Kirby

John,

I have been working with the AT91 target with a few boards, one of which 
is our own custom Q70 board (http://www.exegin.com/pdf/q70_v01.pdf - if 
you will pardon the crummy datasheet), and I have also been testing the 
generic AT91 images on the Atmel AT91SAM9G20-EK.


We don't have any boards with the ATSAMA5D3, but if you would like I 
would be more than happy to send you a couple of the Atmel eval boards 
and some of our Q70 units to test images on.


Cheers,
Owen

On 15-02-15 11:42 PM, John Crispin wrote:

Hi,

does anyone have one of these -
http://www.atmel.com/tools/ATSAMA5D3-XPLD.aspx
that he wants to donate so that i have something to test at91 images on

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] looking for at91 test hardware

2015-02-16 Thread Nicolas FERRE
John Crispin blogic at openwrt.org writes:

 
 Hi,
 
 does anyone have one of these -
 http://www.atmel.com/tools/ATSAMA5D3-XPLD.aspx
 that he wants to donate so that i have something to test at91 images on

Hi Josh,

Of course, I can surely do something for you ;-)

Let's arrange the shipment in private.
(Thanks to Maxime Ripard for the heads-up).

Bye,
-- 
Nicolas FERRE
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] looking for at91 test hardware

2015-02-16 Thread John Crispin


On 16/02/2015 11:52, Nicolas FERRE wrote:
 John Crispin blogic at openwrt.org writes:
 

 Hi,

 does anyone have one of these -
 http://www.atmel.com/tools/ATSAMA5D3-XPLD.aspx
 that he wants to donate so that i have something to test at91 images on
 
 Hi Josh,
 
 Of course, I can surely do something for you ;-)
 
 Let's arrange the shipment in private.
 (Thanks to Maxime Ripard for the heads-up).
 
 Bye,
 


Hi Nicolas,

Oh Wow, that is something i did not expect. i am currently updating all
targets in openwrt to v3.18 and while doing so i noticed that i do not
own any recent AT91 hardware. I previously used an acmesystems board but
gave it away a while ago for an art installation.

totally awesome, put a big smile on my face

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Please test ep93xx with kernel 3.14

2014-12-29 Thread Hauke Mehrtens
I added support for kernel 3.14 for the ep93xx target [0] in trunk, but
I do not have any hardware to test this, the commit was only compile tested.

If you have some hardware that is supported by the ep93xx target please
build an image with kernel 3.14 and test it on your device. If this
image boots and basically works on your device please report back, if it
does not work please also report back. If anything else which worked
with the old kernel does not work any more please also inform us.

To build the ep93xx target with kernel 3.14 replace
KERNEL_PATCHVER:=3.8 with KERNEL_PATCHVER:=3.14 in the file
target/linux/ep93xx/Makefile and build the ep93xx target.


Hauke

[0]: https://dev.openwrt.org/changeset/43795
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Please test mpc52xx with kernel 3.14

2014-12-29 Thread Hauke Mehrtens
I added support for kernel 3.14 for the mpc52xx target [0] in trunk, but
I do not have any hardware to test this, the commit was only compile tested.

If you have some hardware that is supported by the mpc52xx target please
build an image with kernel 3.14 and test it on your device. If this
image boots and basically works on your device please report back, if it
does not work please also report back. If anything else which worked
with the old kernel does not work any more please also inform us.

To build the mpc52xx target with kernel 3.14 replace
KERNEL_PATCHVER:=3.8 with KERNEL_PATCHVER:=3.14 in the file
target/linux/mpc52xx/Makefile and build the mpc52xx target.


Hauke

[0]: https://dev.openwrt.org/changeset/43796
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Please test mpc83xx with kernel 3.14

2014-12-29 Thread Hauke Mehrtens
I added support for kernel 3.14 for the mpc83xx target [0] in trunk, but
I do not have any hardware to test this, the commit was only compile tested.

If you have some hardware that is supported by the mpc83xx target please
build an image with kernel 3.14 and test it on your device. If this
image boots and basically works on your device please report back, if it
does not work please also report back. If anything else which worked
with the old kernel does not work any more please also inform us.

To build the mpc83xx target with kernel 3.14 replace
KERNEL_PATCHVER:=3.8 with KERNEL_PATCHVER:=3.14 in the file
target/linux/mpc83xx/Makefile and build the mpc83xx target.


Hauke

[0]: https://dev.openwrt.org/changeset/43797
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 02/16] Fix memory leaks found by using valgrind on test cases.

2014-12-17 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 cli.c  |8 ++--
 list.c |2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/cli.c b/cli.c
index 6fbbfe9..554 100644
--- a/cli.c
+++ b/cli.c
@@ -360,6 +360,7 @@ static int uci_do_package_cmd(int cmd, int argc, char 
**argv)
 {
char **configs = NULL;
char **p;
+   int ret = 1;
 
if (argc  2)
return 255;
@@ -369,14 +370,17 @@ static int uci_do_package_cmd(int cmd, int argc, char 
**argv)
 
if ((uci_list_configs(ctx, configs) != UCI_OK) || !configs) {
cli_perror();
-   return 1;
+   goto out;
}
 
for (p = configs; *p; p++) {
package_cmd(cmd, *p);
}
 
-   return 0;
+   ret = 0;
+out:
+   free(configs);
+   return ret;
 }
 
 static int uci_do_add(int argc, char **argv)
diff --git a/list.c b/list.c
index faf4494..0d00f81 100644
--- a/list.c
+++ b/list.c
@@ -346,7 +346,7 @@ uci_lookup_ext_section(struct uci_context *ctx, struct 
uci_ptr *ptr)
goto done;
 
 error:
-   e = NULL;
+   free(section);
memset(ptr, 0, sizeof(struct uci_ptr));
UCI_THROW(ctx, UCI_ERR_INVAL);
 done:
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 07/16] tests: add more test coverage for `uci show' command.

2014-12-17 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/references/show_parsing_multiline.data|   20 +
 .../show_parsing_multiline_option.result   |   12 
 .../show_parsing_multiline_package.result  |   18 
 .../show_parsing_multiline_section.result  |   16 ++
 test/tests.d/050_show  |   31 
 5 files changed, 97 insertions(+)
 create mode 100644 test/references/show_parsing_multiline.data
 create mode 100644 test/references/show_parsing_multiline_option.result
 create mode 100644 test/references/show_parsing_multiline_package.result
 create mode 100644 test/references/show_parsing_multiline_section.result

diff --git a/test/references/show_parsing_multiline.data 
b/test/references/show_parsing_multiline.data
new file mode 100644
index 000..670e809
--- /dev/null
+++ b/test/references/show_parsing_multiline.data
@@ -0,0 +1,20 @@
+config main
+option version  1.4.1
+
+config sockd 'instance0'
+option enabled  1
+list internal_network   vpn
+list external_network   wan
+
+option extra_config '
+   user.unprivileged: nobody
+   client pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   session.max: 64
+   log: error
+   }
+
+   socks pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   log: connect
+   } '
diff --git a/test/references/show_parsing_multiline_option.result 
b/test/references/show_parsing_multiline_option.result
new file mode 100644
index 000..6f7aacf
--- /dev/null
+++ b/test/references/show_parsing_multiline_option.result
@@ -0,0 +1,12 @@
+sockd.instance0.extra_config='
+   user.unprivileged: nobody
+   client pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   session.max: 64
+   log: error
+   }
+
+   socks pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   log: connect
+   } '
diff --git a/test/references/show_parsing_multiline_package.result 
b/test/references/show_parsing_multiline_package.result
new file mode 100644
index 000..218082d
--- /dev/null
+++ b/test/references/show_parsing_multiline_package.result
@@ -0,0 +1,18 @@
+sockd.@main[0]=main
+sockd.@main[0].version='1.4.1'
+sockd.instance0=sockd
+sockd.instance0.enabled='1'
+sockd.instance0.internal_network='vpn'
+sockd.instance0.external_network='wan'
+sockd.instance0.extra_config='
+   user.unprivileged: nobody
+   client pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   session.max: 64
+   log: error
+   }
+
+   socks pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   log: connect
+   } '
diff --git a/test/references/show_parsing_multiline_section.result 
b/test/references/show_parsing_multiline_section.result
new file mode 100644
index 000..0506ac3
--- /dev/null
+++ b/test/references/show_parsing_multiline_section.result
@@ -0,0 +1,16 @@
+sockd.instance0=sockd
+sockd.instance0.enabled='1'
+sockd.instance0.internal_network='vpn'
+sockd.instance0.external_network='wan'
+sockd.instance0.extra_config='
+   user.unprivileged: nobody
+   client pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   session.max: 64
+   log: error
+   }
+
+   socks pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   log: connect
+   } '
diff --git a/test/tests.d/050_show b/test/tests.d/050_show
index 7d7e160..ce0eafc 100644
--- a/test/tests.d/050_show
+++ b/test/tests.d/050_show
@@ -9,3 +9,34 @@ test_get_parsing()
assertFailWithNoReturn ${UCI_Q} show test.section.opt.val.qsdf.qsd
assertFailWithNoReturn ${UCI_Q} show test.section.opt.valqsqsd
 }
+
+prepare_get_parsing_multiline() {
+   cp ${REF_DIR}/show_parsing_multiline.data ${CONFIG_DIR}/sockd
+}
+
+test_get_parsing_multiline_package()
+{
+   prepare_get_parsing_multiline
+
+   value=$(${UCI_Q} show sockd)
+   value_ref=$(cat ${REF_DIR}/show_parsing_multiline_package.result)
+   assertEquals $value_ref $value
+}
+
+test_get_parsing_multiline_section()
+{
+   prepare_get_parsing_multiline
+
+   value=$(${UCI_Q} show sockd.instance0)
+   value_ref=$(cat ${REF_DIR}/show_parsing_multiline_section.result)
+   assertEquals $value_ref $value
+}
+
+test_get_parsing_multiline_option()
+{
+   prepare_get_parsing_multiline
+
+   value=$(${UCI_Q} show sockd.instance0.extra_config)
+   value_ref=$(cat ${REF_DIR}/show_parsing_multiline_option.result)
+   assertEquals $value_ref $value
+}
-- 
1.7.10.4

[OpenWrt-Devel] [PATCH v2 08/16] tests: add test coverage for `uci batch' command.

2014-12-17 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/references/batch_set.result |9 +
 test/tests.d/060_batch   |   17 +
 2 files changed, 26 insertions(+)
 create mode 100644 test/references/batch_set.result
 create mode 100644 test/tests.d/060_batch

diff --git a/test/references/batch_set.result b/test/references/batch_set.result
new file mode 100644
index 000..c726bad
--- /dev/null
+++ b/test/references/batch_set.result
@@ -0,0 +1,9 @@
+
+config section 'SEC0'
+   option option0 'value0'
+   option option1 'Hello,
+  World'
+
+config section 'SEC1'
+   option option0 'value1'
+
diff --git a/test/tests.d/060_batch b/test/tests.d/060_batch
new file mode 100644
index 000..49d15e4
--- /dev/null
+++ b/test/tests.d/060_batch
@@ -0,0 +1,17 @@
+test_batch_set()
+{
+   touch ${CONFIG_DIR}/batch_set
+
+${UCI} batch EOF
+set batch_set.SEC0='section'
+set batch_set.SEC0.option0='value0'
+set batch_set.SEC0.option1='Hello,
+'  World\
+set batch_set.SEC1='section'
+set batch_set.SEC1.option0=value1
+
+EOF
+   ${UCI} commit
+   assertSameFile ${REF_DIR}/batch_set.result ${CONFIG_DIR}/batch_set
+}
+
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 09/16] tests: add test coverage for `uci revert' command.

2014-12-17 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/references/revert_option.result   |3 +++
 test/references/revert_option_multiline.result |2 ++
 test/tests.d/070_revert|   28 
 3 files changed, 33 insertions(+)
 create mode 100644 test/references/revert_option.result
 create mode 100644 test/references/revert_option_multiline.result
 create mode 100644 test/references/revert_section.result
 create mode 100644 test/tests.d/070_revert

diff --git a/test/references/revert_option.result 
b/test/references/revert_option.result
new file mode 100644
index 000..c45a19c
--- /dev/null
+++ b/test/references/revert_option.result
@@ -0,0 +1,3 @@
+revert.SEC0='section'
+revert.SEC0.option1='Hello,
+  World'
diff --git a/test/references/revert_option_multiline.result 
b/test/references/revert_option_multiline.result
new file mode 100644
index 000..9982d25
--- /dev/null
+++ b/test/references/revert_option_multiline.result
@@ -0,0 +1,2 @@
+revert.SEC0='section'
+revert.SEC0.option0='value0'
diff --git a/test/references/revert_section.result 
b/test/references/revert_section.result
new file mode 100644
index 000..e69de29
diff --git a/test/tests.d/070_revert b/test/tests.d/070_revert
new file mode 100644
index 000..6035f6f
--- /dev/null
+++ b/test/tests.d/070_revert
@@ -0,0 +1,28 @@
+revert_test_prepare() {
+   touch ${CONFIG_DIR}/revert
+   ${UCI} set revert.SEC0=section
+   ${UCI} set revert.SEC0.option0=value0
+   ${UCI} set revert.SEC0.option1='Hello,
+'  World\
+}
+
+test_revert_section()
+{
+   revert_test_prepare
+   ${UCI} revert revert.SEC0
+   assertSameFile ${REF_DIR}/revert_section.result $CHANGES_DIR/revert
+}
+
+test_revert_option()
+{
+   revert_test_prepare
+   ${UCI} revert revert.SEC0.option0
+   assertSameFile ${REF_DIR}/revert_option.result $CHANGES_DIR/revert
+}
+
+test_revert_option_multiline()
+{
+   revert_test_prepare
+   ${UCI} revert revert.SEC0.option1
+   assertSameFile ${REF_DIR}/revert_option_multiline.result 
$CHANGES_DIR/revert
+}
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 10/16] tests: add test coverage for uci list related commands.

2014-12-17 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/references/add_list_changes.result  |4 ++
 test/references/add_list_config.result   |6 +++
 test/references/add_list_show.result |3 ++
 test/references/del_list_config.result   |5 +++
 test/references/del_list_multiline_config.result |4 ++
 test/tests.d/080_list|   52 ++
 6 files changed, 74 insertions(+)
 create mode 100644 test/references/add_list_changes.result
 create mode 100644 test/references/add_list_config.result
 create mode 100644 test/references/add_list_show.result
 create mode 100644 test/references/del_list_config.result
 create mode 100644 test/references/del_list_multiline_config.result
 create mode 100644 test/tests.d/080_list

diff --git a/test/references/add_list_changes.result 
b/test/references/add_list_changes.result
new file mode 100644
index 000..78e78b6
--- /dev/null
+++ b/test/references/add_list_changes.result
@@ -0,0 +1,4 @@
+list_test_config.SEC0='section'
+list_test_config.SEC0.list0+='value0'
+list_test_config.SEC0.list0+='Hello
+, world'
diff --git a/test/references/add_list_config.result 
b/test/references/add_list_config.result
new file mode 100644
index 000..679
--- /dev/null
+++ b/test/references/add_list_config.result
@@ -0,0 +1,6 @@
+
+config section 'SEC0'
+   list list0 'value0'
+   list list0 'Hello
+, world'
+
diff --git a/test/references/add_list_show.result 
b/test/references/add_list_show.result
new file mode 100644
index 000..3dd83cd
--- /dev/null
+++ b/test/references/add_list_show.result
@@ -0,0 +1,3 @@
+list_test_config.SEC0=section
+list_test_config.SEC0.list0='value0' 'Hello
+, world'
diff --git a/test/references/del_list_config.result 
b/test/references/del_list_config.result
new file mode 100644
index 000..8e66bbb
--- /dev/null
+++ b/test/references/del_list_config.result
@@ -0,0 +1,5 @@
+
+config section 'SEC0'
+   list list0 'Hello
+, world'
+
diff --git a/test/references/del_list_multiline_config.result 
b/test/references/del_list_multiline_config.result
new file mode 100644
index 000..fe67784
--- /dev/null
+++ b/test/references/del_list_multiline_config.result
@@ -0,0 +1,4 @@
+
+config section 'SEC0'
+   list list0 'value0'
+
diff --git a/test/tests.d/080_list b/test/tests.d/080_list
new file mode 100644
index 000..e0a910a
--- /dev/null
+++ b/test/tests.d/080_list
@@ -0,0 +1,52 @@
+prepare_list_test() {
+   touch ${CONFIG_DIR}/list_test_config
+   ${UCI} set list_test_config.SEC0=section
+   ${UCI} add_list list_test_config.SEC0.list0=value0
+   ${UCI} add_list list_test_config.SEC0.list0='Hello
+,' world\
+}
+test_add_list_config() {
+   prepare_list_test
+   ${UCI} commit
+   assertSameFile ${REF_DIR}/add_list_config.result 
$CONFIG_DIR/list_test_config
+}
+
+test_add_list_get() {
+   # To maintain compatibility with current code, do not quote
+   # list values that do not contain blank spaces (\x20\t\r\n) within it.
+   prepare_list_test
+   value_list_get=$(${UCI} get list_test_config.SEC0.list0)
+   assertEquals $value_list_get value0 '\Hello
+, world\'
+}
+
+test_add_list_show() {
+   prepare_list_test
+   value_list_show=$(${UCI} show list_test_config)
+   value_list_show_ref=$(cat $REF_DIR/add_list_show.result)
+   assertEquals $value_list_show $value_list_show_ref
+}
+
+test_add_list_changes() {
+   prepare_list_test
+   value_list_changes=$(${UCI} changes)
+   value_list_changes_ref=$(cat $REF_DIR/add_list_changes.result)
+   assertEquals $value_list_changes $value_list_changes_ref
+}
+
+test_del_list() {
+   prepare_list_test
+   ${UCI} commit
+   ${UCI} del_list list_test_config.SEC0.list0=value0
+   ${UCI} commit
+   assertSameFile ${REF_DIR}/del_list_config.result 
$CONFIG_DIR/list_test_config
+}
+
+test_del_list_multiline() {
+   prepare_list_test
+   ${UCI} commit
+   ${UCI} del_list list_test_config.SEC0.list0='Hello
+,'' world'
+   ${UCI} commit
+   assertSameFile ${REF_DIR}/del_list_multiline_config.result 
$CONFIG_DIR/list_test_config
+}
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 03/12] tests: add more test coverage for `uci show' command.

2014-12-15 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/references/show_parsing_multiline.data|   20 +
 .../show_parsing_multiline_option.result   |   12 
 .../show_parsing_multiline_package.result  |   18 
 .../show_parsing_multiline_section.result  |   16 ++
 test/tests.d/050_show  |   31 
 5 files changed, 97 insertions(+)
 create mode 100644 test/references/show_parsing_multiline.data
 create mode 100644 test/references/show_parsing_multiline_option.result
 create mode 100644 test/references/show_parsing_multiline_package.result
 create mode 100644 test/references/show_parsing_multiline_section.result

diff --git a/test/references/show_parsing_multiline.data 
b/test/references/show_parsing_multiline.data
new file mode 100644
index 000..670e809
--- /dev/null
+++ b/test/references/show_parsing_multiline.data
@@ -0,0 +1,20 @@
+config main
+option version  1.4.1
+
+config sockd 'instance0'
+option enabled  1
+list internal_network   vpn
+list external_network   wan
+
+option extra_config '
+   user.unprivileged: nobody
+   client pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   session.max: 64
+   log: error
+   }
+
+   socks pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   log: connect
+   } '
diff --git a/test/references/show_parsing_multiline_option.result 
b/test/references/show_parsing_multiline_option.result
new file mode 100644
index 000..6f7aacf
--- /dev/null
+++ b/test/references/show_parsing_multiline_option.result
@@ -0,0 +1,12 @@
+sockd.instance0.extra_config='
+   user.unprivileged: nobody
+   client pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   session.max: 64
+   log: error
+   }
+
+   socks pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   log: connect
+   } '
diff --git a/test/references/show_parsing_multiline_package.result 
b/test/references/show_parsing_multiline_package.result
new file mode 100644
index 000..218082d
--- /dev/null
+++ b/test/references/show_parsing_multiline_package.result
@@ -0,0 +1,18 @@
+sockd.@main[0]=main
+sockd.@main[0].version='1.4.1'
+sockd.instance0=sockd
+sockd.instance0.enabled='1'
+sockd.instance0.internal_network='vpn'
+sockd.instance0.external_network='wan'
+sockd.instance0.extra_config='
+   user.unprivileged: nobody
+   client pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   session.max: 64
+   log: error
+   }
+
+   socks pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   log: connect
+   } '
diff --git a/test/references/show_parsing_multiline_section.result 
b/test/references/show_parsing_multiline_section.result
new file mode 100644
index 000..0506ac3
--- /dev/null
+++ b/test/references/show_parsing_multiline_section.result
@@ -0,0 +1,16 @@
+sockd.instance0=sockd
+sockd.instance0.enabled='1'
+sockd.instance0.internal_network='vpn'
+sockd.instance0.external_network='wan'
+sockd.instance0.extra_config='
+   user.unprivileged: nobody
+   client pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   session.max: 64
+   log: error
+   }
+
+   socks pass {
+   from: 0.0.0.0/0 to: 0.0.0.0/0
+   log: connect
+   } '
diff --git a/test/tests.d/050_show b/test/tests.d/050_show
index 7d7e160..ce0eafc 100644
--- a/test/tests.d/050_show
+++ b/test/tests.d/050_show
@@ -9,3 +9,34 @@ test_get_parsing()
assertFailWithNoReturn ${UCI_Q} show test.section.opt.val.qsdf.qsd
assertFailWithNoReturn ${UCI_Q} show test.section.opt.valqsqsd
 }
+
+prepare_get_parsing_multiline() {
+   cp ${REF_DIR}/show_parsing_multiline.data ${CONFIG_DIR}/sockd
+}
+
+test_get_parsing_multiline_package()
+{
+   prepare_get_parsing_multiline
+
+   value=$(${UCI_Q} show sockd)
+   value_ref=$(cat ${REF_DIR}/show_parsing_multiline_package.result)
+   assertEquals $value_ref $value
+}
+
+test_get_parsing_multiline_section()
+{
+   prepare_get_parsing_multiline
+
+   value=$(${UCI_Q} show sockd.instance0)
+   value_ref=$(cat ${REF_DIR}/show_parsing_multiline_section.result)
+   assertEquals $value_ref $value
+}
+
+test_get_parsing_multiline_option()
+{
+   prepare_get_parsing_multiline
+
+   value=$(${UCI_Q} show sockd.instance0.extra_config)
+   value_ref=$(cat ${REF_DIR}/show_parsing_multiline_option.result)
+   assertEquals $value_ref $value
+}
-- 
1.7.10.4

[OpenWrt-Devel] [PATCH 04/12] tests: add test coverage for `uci batch' command.

2014-12-15 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/references/batch_set.result |9 +
 test/tests.d/060_batch   |   17 +
 2 files changed, 26 insertions(+)
 create mode 100644 test/references/batch_set.result
 create mode 100644 test/tests.d/060_batch

diff --git a/test/references/batch_set.result b/test/references/batch_set.result
new file mode 100644
index 000..c726bad
--- /dev/null
+++ b/test/references/batch_set.result
@@ -0,0 +1,9 @@
+
+config section 'SEC0'
+   option option0 'value0'
+   option option1 'Hello,
+  World'
+
+config section 'SEC1'
+   option option0 'value1'
+
diff --git a/test/tests.d/060_batch b/test/tests.d/060_batch
new file mode 100644
index 000..49d15e4
--- /dev/null
+++ b/test/tests.d/060_batch
@@ -0,0 +1,17 @@
+test_batch_set()
+{
+   touch ${CONFIG_DIR}/batch_set
+
+${UCI} batch EOF
+set batch_set.SEC0='section'
+set batch_set.SEC0.option0='value0'
+set batch_set.SEC0.option1='Hello,
+'  World\
+set batch_set.SEC1='section'
+set batch_set.SEC1.option0=value1
+
+EOF
+   ${UCI} commit
+   assertSameFile ${REF_DIR}/batch_set.result ${CONFIG_DIR}/batch_set
+}
+
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 05/12] tests: add test coverage for `uci revert' command.

2014-12-15 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/references/revert_option.result   |3 +++
 test/references/revert_option_multiline.result |2 ++
 test/tests.d/070_revert|   28 
 3 files changed, 33 insertions(+)
 create mode 100644 test/references/revert_option.result
 create mode 100644 test/references/revert_option_multiline.result
 create mode 100644 test/references/revert_section.result
 create mode 100644 test/tests.d/070_revert

diff --git a/test/references/revert_option.result 
b/test/references/revert_option.result
new file mode 100644
index 000..c45a19c
--- /dev/null
+++ b/test/references/revert_option.result
@@ -0,0 +1,3 @@
+revert.SEC0='section'
+revert.SEC0.option1='Hello,
+  World'
diff --git a/test/references/revert_option_multiline.result 
b/test/references/revert_option_multiline.result
new file mode 100644
index 000..9982d25
--- /dev/null
+++ b/test/references/revert_option_multiline.result
@@ -0,0 +1,2 @@
+revert.SEC0='section'
+revert.SEC0.option0='value0'
diff --git a/test/references/revert_section.result 
b/test/references/revert_section.result
new file mode 100644
index 000..e69de29
diff --git a/test/tests.d/070_revert b/test/tests.d/070_revert
new file mode 100644
index 000..6035f6f
--- /dev/null
+++ b/test/tests.d/070_revert
@@ -0,0 +1,28 @@
+revert_test_prepare() {
+   touch ${CONFIG_DIR}/revert
+   ${UCI} set revert.SEC0=section
+   ${UCI} set revert.SEC0.option0=value0
+   ${UCI} set revert.SEC0.option1='Hello,
+'  World\
+}
+
+test_revert_section()
+{
+   revert_test_prepare
+   ${UCI} revert revert.SEC0
+   assertSameFile ${REF_DIR}/revert_section.result $CHANGES_DIR/revert
+}
+
+test_revert_option()
+{
+   revert_test_prepare
+   ${UCI} revert revert.SEC0.option0
+   assertSameFile ${REF_DIR}/revert_option.result $CHANGES_DIR/revert
+}
+
+test_revert_option_multiline()
+{
+   revert_test_prepare
+   ${UCI} revert revert.SEC0.option1
+   assertSameFile ${REF_DIR}/revert_option_multiline.result 
$CHANGES_DIR/revert
+}
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 06/12] tests: add test coverage for uci list related commands.

2014-12-15 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/references/add_list_changes.result  |4 ++
 test/references/add_list_config.result   |6 +++
 test/references/add_list_show.result |3 ++
 test/references/del_list_config.result   |5 +++
 test/references/del_list_multiline_config.result |4 ++
 test/tests.d/080_list|   50 ++
 6 files changed, 72 insertions(+)
 create mode 100644 test/references/add_list_changes.result
 create mode 100644 test/references/add_list_config.result
 create mode 100644 test/references/add_list_show.result
 create mode 100644 test/references/del_list_config.result
 create mode 100644 test/references/del_list_multiline_config.result
 create mode 100644 test/tests.d/080_list

diff --git a/test/references/add_list_changes.result 
b/test/references/add_list_changes.result
new file mode 100644
index 000..78e78b6
--- /dev/null
+++ b/test/references/add_list_changes.result
@@ -0,0 +1,4 @@
+list_test_config.SEC0='section'
+list_test_config.SEC0.list0+='value0'
+list_test_config.SEC0.list0+='Hello
+, world'
diff --git a/test/references/add_list_config.result 
b/test/references/add_list_config.result
new file mode 100644
index 000..679
--- /dev/null
+++ b/test/references/add_list_config.result
@@ -0,0 +1,6 @@
+
+config section 'SEC0'
+   list list0 'value0'
+   list list0 'Hello
+, world'
+
diff --git a/test/references/add_list_show.result 
b/test/references/add_list_show.result
new file mode 100644
index 000..3dd83cd
--- /dev/null
+++ b/test/references/add_list_show.result
@@ -0,0 +1,3 @@
+list_test_config.SEC0=section
+list_test_config.SEC0.list0='value0' 'Hello
+, world'
diff --git a/test/references/del_list_config.result 
b/test/references/del_list_config.result
new file mode 100644
index 000..8e66bbb
--- /dev/null
+++ b/test/references/del_list_config.result
@@ -0,0 +1,5 @@
+
+config section 'SEC0'
+   list list0 'Hello
+, world'
+
diff --git a/test/references/del_list_multiline_config.result 
b/test/references/del_list_multiline_config.result
new file mode 100644
index 000..fe67784
--- /dev/null
+++ b/test/references/del_list_multiline_config.result
@@ -0,0 +1,4 @@
+
+config section 'SEC0'
+   list list0 'value0'
+
diff --git a/test/tests.d/080_list b/test/tests.d/080_list
new file mode 100644
index 000..7d25b26
--- /dev/null
+++ b/test/tests.d/080_list
@@ -0,0 +1,50 @@
+prepare_list_test() {
+   touch ${CONFIG_DIR}/list_test_config
+   ${UCI} set list_test_config.SEC0=section
+   ${UCI} add_list list_test_config.SEC0.list0=value0
+   ${UCI} add_list list_test_config.SEC0.list0='Hello
+,' world\
+}
+test_add_list_config() {
+   prepare_list_test
+   ${UCI} commit
+   assertSameFile ${REF_DIR}/add_list_config.result 
$CONFIG_DIR/list_test_config
+}
+
+test_add_list_get() {
+   prepare_list_test
+   value_list_get=$(${UCI} get list_test_config.SEC0.list0)
+   assertEquals $value_list_get 'value0' '\Hello
+, world\'
+}
+
+test_add_list_show() {
+   prepare_list_test
+   value_list_show=$(${UCI} show list_test_config)
+   value_list_show_ref=$(cat $REF_DIR/add_list_show.result)
+   assertEquals $value_list_show $value_list_show_ref
+}
+
+test_add_list_changes() {
+   prepare_list_test
+   value_list_changes=$(${UCI} changes)
+   value_list_changes_ref=$(cat $REF_DIR/add_list_changes.result)
+   assertEquals $value_list_changes $value_list_changes_ref
+}
+
+test_del_list() {
+   prepare_list_test
+   ${UCI} commit
+   ${UCI} del_list list_test_config.SEC0.list0=value0
+   ${UCI} commit
+   assertSameFile ${REF_DIR}/del_list_config.result 
$CONFIG_DIR/list_test_config
+}
+
+test_del_list_multiline() {
+   prepare_list_test
+   ${UCI} commit
+   ${UCI} del_list list_test_config.SEC0.list0='Hello
+,'' world'
+   ${UCI} commit
+   assertSameFile ${REF_DIR}/del_list_multiline_config.result 
$CONFIG_DIR/list_test_config
+}
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] request for ar7 test hw / 3.14 testing

2014-12-11 Thread Jonas Gorski
Hi,

On Mon, Dec 8, 2014 at 7:19 AM, John Crispin blo...@openwrt.org wrote:
 Hi,
 also if anyone feels like testing the 3.14 i would appreciate the effort.


Flashed it onto my WAG354G, and it booted through with the expected
module load issue of acx-mac80211, and an unexpected watchdog
failure(?).


Jonas


Booting...
[0.00] Linux version 3.14.26 (jonas@newshaker64) (gcc version
4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r43560) ) #1 Thu Dec 11 19:53:05
CET 2014
[0.00] ar7-gpio: registered 32 GPIOs
[0.00] bootconsole [early0] enabled
[0.00] CPU0 revision is: 00018448 (MIPS 4KEc)
[0.00] TI AR7 (TNETD7300), ID: 0x0005, Revision: 0x27
[0.00] Determined physical RAM map:
[0.00]  memory: 0100 @ 1400 (usable)
[0.00] Initrd not found or empty - disabling initrd
...
[   20.42] acx_mac80211: Unknown symbol ieee80211_queue_stopped (err 0)
[   20.44] acx_mac80211: Unknown symbol ieee80211_free_hw (err 0)
[   20.46] acx_mac80211: Unknown symbol ieee80211_probereq_get (err 0)
[   20.48] acx_mac80211: Unknown symbol ieee80211_register_hw (err 0)
[   20.50] acx_mac80211: Unknown symbol ieee80211_restart_hw (err 0)
...
[3.32] Freeing unused kernel memory: 128K (9440 - 9442)
procd: Console is alive
procd: WDT failed to write: Bad file descriptor
procd: WDT failed to write: Bad file descriptor
procd: WDT failed to write: Bad file descriptor
procd: - preinit -
...
[   48.54] br-lan: port 3(eth0.1) entered forwarding state
[   48.64] br-lan: port 4(eth0.2) entered forwarding state
procd: - init complete -



BusyBox v1.22.1 (2014-12-08 12:48:22 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  ___ __
 |   |.-.-.-.|  |  |  |..|  |_
 |   -   ||  _  |  -__| ||  |  |  ||   _||   _|
 |___||   __|_|__|__||||__|  ||
  |__| W I R E L E S S   F R E E D O M
 -
 CHAOS CALMER (Bleeding Edge, r43578)
 -
  * 1 1/2 oz GinShake with a glassful
  * 1/4 oz Triple Sec   of broken ice and pour
  * 3/4 oz Lime Juice   unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -
root@OpenWrt:/#
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] request for ar7 test hw / 3.14 testing

2014-12-11 Thread John Crispin


On 11/12/2014 20:08, Jonas Gorski wrote:
 procd: WDT failed to write: Bad file descriptor

this is  a bug in procd. i have a fix staged already and will push it
tomorrow with 2 other fixes

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] request for ar7 test hw / 3.14 testing

2014-12-11 Thread Jonas Gorski
On Thu, Dec 11, 2014 at 8:39 PM, John Crispin blo...@openwrt.org wrote:


 On 11/12/2014 20:08, Jonas Gorski wrote:
 procd: WDT failed to write: Bad file descriptor

 this is  a bug in procd. i have a fix staged already and will push it
 tomorrow with 2 other fixes

Great, thanks for the heads up. I just pushed a fix/workaround for the
mac-acx80211 loading issue.


Jonas
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] request for ar7 test hw / 3.14 testing

2014-12-11 Thread John Crispin


On 11/12/2014 20:43, Jonas Gorski wrote:
 On Thu, Dec 11, 2014 at 8:39 PM, John Crispin blo...@openwrt.org wrote:


 On 11/12/2014 20:08, Jonas Gorski wrote:
 procd: WDT failed to write: Bad file descriptor

 this is  a bug in procd. i have a fix staged already and will push it
 tomorrow with 2 other fixes
 
 Great, thanks for the heads up. I just pushed a fix/workaround for the
 mac-acx80211 loading issue.
 
 
 Jonas
 


thanks, i think we fixed most of the left over fallout today and
tonights CC test build should yield good results which puts us on track
for a Christmas Calmer ;) (no promises though)

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] request for ar7 test hw / 3.14 testing

2014-12-09 Thread Weedy
U, I've never uses gpg but I feel like your MTC shouldn't be attaching
your private key.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] request for ar7 test hw / 3.14 testing

2014-12-08 Thread Sami Olmari
Not to be stupid, but how new device would do? I might have some age old
ZyXEL P660-H hardware lying around our hackerspace for nothing, but old
they are indeed :)

Sami Olmari
On Dec 8, 2014 8:19 AM, John Crispin blo...@openwrt.org wrote:

 Hi,

 i just bumped ar7, it is only compile tested. i tried getting my hands
 on ar7 hw, managed to get 2 boards. one does not power up and the
 other one has a uart connector welded and not soldered to it and fails
 to give stable serial output.

 does anyone have a working ar7 board that they want to send me ?

 also if anyone feels like testing the 3.14 i would appreciate the effort.

 John
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] request for ar7 test hw / 3.14 testing

2014-12-08 Thread heini66
several older avm boxes laying arround. if yo want one or more, pm me.

2014-12-08 22:33 GMT+01:00 Sami Olmari s...@olmari.fi:

 Not to be stupid, but how new device would do? I might have some age old
 ZyXEL P660-H hardware lying around our hackerspace for nothing, but old
 they are indeed :)

 Sami Olmari
 On Dec 8, 2014 8:19 AM, John Crispin blo...@openwrt.org wrote:

 Hi,

 i just bumped ar7, it is only compile tested. i tried getting my hands
 on ar7 hw, managed to get 2 boards. one does not power up and the
 other one has a uart connector welded and not soldered to it and fails
 to give stable serial output.

 does anyone have a working ar7 board that they want to send me ?

 also if anyone feels like testing the 3.14 i would appreciate the effort.

 John
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel




-- 
-BEGIN PGP PRIVATE KEY BLOCK-
Version: Keybase OpenPGP v1.1.3
Comment: https://keybase.io/crypto

xcaGBFRIHG4BEAC5PYYUn4BxFb/n+ZwLVt88LwBmYHmvJOrCNR+k6N7bCKzpYiYn
dnxNJtue881iHyCb1mJMc/YADK2pK+jna3GZszPuXcN3k5XzzTAqC2jFGlPrnp5+
NMml3ItNMR9TEnPsRkUk3lGhItDGXIupSjh/Q1vgWSFfXLnCQW3uBgiI4n64l2ck
23oAuJCJPsdeQ/7MHGjzMxLBD7brUO1mfUr+kwnayIsW6I251FPH81CBEnh3Nr/e
DDntQ4BPWFscVjZrhepOfDugIc2eFDBt2nFl3Wxy7hpoLT/Wl3zMbWRikw0jOTng
9Tn74Yl+Df66MHh/5OP/7THUp5F1gMHCXqkzsdcJq5TOHNnft7B1tAy5CM+wqHwY
CwwgTSmJIjeh/YFhLuX2frhdLuOsDsjD5JlavXCM7jjVZLlwWp9V6jYAW0AaGDKz
mzp8qnZWTZe385n9aK4HVqvb9csNfcXRW3H6U1tKsksoedPPWbb40ydfH3bcbes6
0/1exAdeVCmQZtxOlXtk7XU4fj9ng2s1n8K2dHaRWCITN64bDo9oEx7uXvYG2lDs
o4W5FqtA/1URzjMKAUey37/5Gcg57KDVeK4UfGPm8wgrPmWF7faseOzv8T+HAMpJ
Fz9EW12wlcd7U5gD9/gmBuCCwvIJAH53EhiY64NywTrVTFsOzBdOIVOG+QARAQAB
/gkDCA2j/9YLAa5FYIqNZwzILMtiY1r1d2J4FX+lFM5ZzdTrWGei7A5tTMA3GJly
LnYBVTVVoMO1n0sSRhhdeQlyYnqF3itrdcZid0GTv4yIkb3R755LDnXMGot/aj/z
2Pz9/FKLjUu3VCg0wyVw6mabMRloEBE07MjFxkzU+PALLW13HwoIsJxjun/rBeVM
A4HpgG+tqa7mvKuaXE6QZ7CCnYBnBPntzk2Xk/fkoxSlurvGlKCyP4y2nDWB1tGa
WXUhGo08J5T4nf2ANRQqBqWtzuLKyzmP5m5KEDzWfS+SWwfBF+z71u93bt0dGKFg
srh4jTI4gXIu3lTfDOJVEBUi0YghDW2v+ZVOk+L2lwqFZz7d6nDrlE0ztAU3yhSq
HgmGMAyeMwyFxfV9c+6wM6XkXL1Yx8oDaSx6XwS0CE2hG3nBZVXkzWNGQDCZxxPh
xC3k1Dt3gZ79WahvwJznnAPS2vosZsKNmqU2fh+4TCLy7MppxXFuNpmeCLdIn/T0
BOUryFdlGdS8Z5ikWSKGLGKLemIlNOGdH+qSTbv9Dj+0hVCy8HQOLex+ThLc43mJ
ZUTZhLrDiSyQBO5eb4kSWtjfaDuIKvM1dXm9oh/cuTKBTf8yM67DCcKD6rWYk7w4
t12K67nGYxzprWWEpoHv+XcnHJ7/bXGZJlP4EeiWvdLkszq/YVxnR/Tp/rkF1EDH
bm5BPqivb35TCEhdUS21bzT/odv21eGCCZ4l/OurvnCwlq2OU2PhJa+vD5xvr9U6
Kh5vSlt6yobj/QYOInAwERZp+JOUur616ZZFt9208eO9oc4XOwj08C2pNsAoyx8O
ApopMLbV5l9HRNfzMo5Tt9fr13Uu2EDa9OMKx7HYkbNQbzaicTKOPHue8KmtDTe9
D+A8bKDzu5s4VEKfizS5FpfTchx9YdmzGeucbCqUVK/S/CM3DB6zztQbU3Jx6SKJ
cRyvSa5GB1Pf10D7jHhj8A+VXvoYOrBSx9oUdflBIxHbuLrNEiewlvVbb2EqMslZ
OgroXRNeC8/Y2/Aena4dISnmR1yCsZ4bupdLldw64W+DF/64+xacYy6oFtoLZfRq
f6092OPZjVsU1Gj/0zay2Cf4+RAcD+OLFPpV+YqaNM8xrP4jWmVj2ZlhOLw+C3WY
1gDAN85uSB0MitNUR2vd6O3K9jCX/vrea7FN6rvdp8DROSfmmVD/04SFe/px20br
3oBomrrppY9R63c3gvWPYpl+uaW+optFjl9WJagR8SkzE5JJqC8MqdcWrtTaei8q
r3yO86wXtVDtCMnu8FamXZRvzuRjC8VTX9Wlwz902jWkL+1PqaVeG4lE86dQNbH0
lwAAzpzVBn5QT8UBEpqUmbg0TRg+AtUJc1n5zJmfAVfhY7GqrcKms0L0c0Sjv2PT
IUJ7SEu8VTzvrggp0gOTVel30A6JivT7fk5k5lZ86xTGI7JxvNoB0s3rRsVdu0m3
w5AvwqMsnGBAthumI+Sn5ufWQ+0y4j0H4NXMiHFi53fBUi8Lq6ZEbCj8C2lJvEQq
j+L5vfxpcdQ2ob/CEbrBkNRXVRcAmjlICYeLuZxq1dlk7QrHSqpWg2tvZ4fg6Iev
AY4xVe/mVgwiOJJEPXmyLTG2cndSwfkVI3bmbmRi7pHHLyOpVuc8Q8HrckN/QE2Z
8nZxO3J31V7ym4RoqP7Wqhen0ZFFtuGf2KJWzVZylJsBPgmV4ldXqL7Ftm9pc02z
uMwxKsVZC2HAbFwWW5hDrsvWUsn+Yo85JIU/NxL3YjNkpUPjly0UkDbNJ2tleWJh
c2UuaW8vaGVpbmk2NiA8aGVpbmk2NkBrZXliYXNlLmlvPsLBbQQTAQoAFwUCVEgc
bgIbLwMLCQcDFQoIAh4BAheAAAoJEGG7M6BETdd9AsMQALdN6V4nYS8WXIx1PGXF
CdHk3f1X4iq2dlmQNj+9GDSFTtUAhVSs4UorLDj48iU7QvdnJU8rpMKLr5swrv4N
FVxQ2tIGWMuPGbX+19G3i3oc4cuEPEK+4veTeBhKl6ISZslcc8YKYgsjvEptb6AH
Uc7FobFHOaxTvgAsi+IJmovax3pHyO9AAsTHnz/uBl4wgOk83RUPLQx1/PIon9hm
D19Btl0fY8H4QIwzshGobmyt0UuS+ggbqN7XZfrln4ChxcitKOXKO7BaH9RAid9H
9LZJL90iOnFZiPkuUnuGKMUErwTqj4Zx5ixZTPRC7hJpttbEzLM4ZmZ8ZxdUK2RN
v5hYe4DK/doEz+BmhyzF1ZWO0bjL7g4eWMsd7wFUqwTklmeTGRtWtHf5hEAgyJ4n
wvrqi/uUFcI4bwrZ9Ltvftih5rol6zS7HiWU64FsrlFXQ5lWW/D3TvnH8hNEgVWB
/zGxKqn1b1B8r1tsOMIH7S82o91LFHB+JDKVd7ZYQQE2HcTBjDk6pcwBxQ39TWGD
75voxIj+m8XBACSM4ny4SnfeaxDFBneyP2of2WXEAEN7oy9kWTODOs8AzNs4Uw10
hHZFYjhmC594Du/EAsoZhQmRNIBgMJoxWztrISewYXQs5E0Ao+O8MygAU5/zqEY9
PLeqRquNzDxUXL2dL33gEx/ux8MGBFRIHG4BCADLroo+vNvaU1mxIfbtin0Sw7+F
TUVWoLRfkPLRGEwBznNraa8H4U6yccylwUq+h2zjooHzZMS5dnOgs2+PZzFMrXO6
JX2q1ptwAYCxh4Ft2G3ptAFa3rsL2MVSgymknQvNf0OVlcHkOxrbh6O5Hp0nRnpd
pUpBsiRqFHG04tLBr5vRSkBxo3ms5xTv1bPNLUtlRg5bu+Chy5sJC8i0rCPb5f6J
IBBP0+F2z57h0xvGzUBNBYES1oQe0Ae5Shx6oosVS2aiqxPovWHxKBJol4TmtUTI
KwRK5g1cg9PSWOBJZvNgQE/UI6UQXLOO+s06ys9LknJ/Ukso+NbrNe2BeFOvABEB

[OpenWrt-Devel] request for ar7 test hw / 3.14 testing

2014-12-07 Thread John Crispin
Hi,

i just bumped ar7, it is only compile tested. i tried getting my hands
on ar7 hw, managed to get 2 boards. one does not power up and the
other one has a uart connector welded and not soldered to it and fails
to give stable serial output.

does anyone have a working ar7 board that they want to send me ?

also if anyone feels like testing the 3.14 i would appreciate the effort.

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] octeon: sysupgrade: fix test for rootfs device

2014-12-04 Thread Stijn Tintel
Signed-off-by: Stijn Tintel st...@linux-ipv6.be
---
 target/linux/octeon/base-files/lib/upgrade/platform.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh 
b/target/linux/octeon/base-files/lib/upgrade/platform.sh
index d81d7fd..1df3d17 100755
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
@@ -36,7 +36,7 @@ platform_do_upgrade() {
local board=$(octeon_board_name)
local rootfs=$(platform_get_rootfs)
 
-   [ -d ${rootfs} ] || return 1
+   [ -b ${rootfs} ] || return 1
 
case $board in
erlite)
-- 
1.8.5.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] octeon: sysupgrade: fix test for rootfs device

2014-12-04 Thread Stijn Tintel
Signed-off-by: Stijn Tintel st...@linux-ipv6.be
---
 target/linux/octeon/base-files/lib/upgrade/platform.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh 
b/target/linux/octeon/base-files/lib/upgrade/platform.sh
index d81d7fd..1df3d17 100755
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
@@ -36,7 +36,7 @@ platform_do_upgrade() {
local board=$(octeon_board_name)
local rootfs=$(platform_get_rootfs)
 
-   [ -d ${rootfs} ] || return 1
+   [ -b ${rootfs} ] || return 1
 
case $board in
erlite)
-- 
2.0.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/4] Drop test cases for deprecated ucimap-example.

2014-11-24 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/tests.d/060-ucimap_example |9 -
 1 file changed, 9 deletions(-)
 delete mode 100644 test/tests.d/060-ucimap_example

diff --git a/test/tests.d/060-ucimap_example b/test/tests.d/060-ucimap_example
deleted file mode 100644
index 984726b..000
--- a/test/tests.d/060-ucimap_example
+++ /dev/null
@@ -1,9 +0,0 @@
-test_ucimap_example()
-{
-   rm -rf ./save
-   ( cd ..; ./ucimap-example -s )  ${TMP_DIR}/ucimap_example.result
-   assertSameFile ${TMP_DIR}/ucimap_example.result 
${REF_DIR}/ucimap_example_1.result
-   ( cd ..; ./ucimap-example -s )  ${TMP_DIR}/ucimap_example.result
-   assertSameFile ${TMP_DIR}/ucimap_example.result 
${REF_DIR}/ucimap_example_2.result
-   rm -rf ./save
-}
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/4] Sync ref test result with current implementation.

2014-11-24 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/references/export.result |   10 +-
 test/references/import.result |8 
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/test/references/export.result b/test/references/export.result
index 957e687..bc06655 100644
--- a/test/references/export.result
+++ b/test/references/export.result
@@ -1,7 +1,7 @@
-package 'export'
+package export
 
-config 'type' 'section'
-   option 'opt' 'val'
-   list 'list_opt' 'val0'
-   list 'list_opt' 'val1'
+config type 'section'
+   option opt 'val'
+   list list_opt 'val0'
+   list list_opt 'val1'
 
diff --git a/test/references/import.result b/test/references/import.result
index c7e4d39..47704b8 100644
--- a/test/references/import.result
+++ b/test/references/import.result
@@ -1,6 +1,6 @@
 
-config 'type' 'section'
-   option 'opt' 'val'
-   list 'list_opt' 'val0'
-   list 'list_opt' 'val1'
+config type 'section'
+   option opt 'val'
+   list list_opt 'val0'
+   list list_opt 'val1'
 
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/4] Add test coverage for multi-line option value.

2014-11-24 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/references/add_section.result |2 +-
 test/references/export.data|7 ++-
 test/references/export.result  |5 +
 test/references/get_multiline.data |5 +
 test/references/import.data|7 ++-
 test/references/import.result  |5 +
 test/references/set_existing_option.result |2 +-
 test/references/set_existing_option_multiline.result   |2 ++
 test/references/set_named_section.result   |2 +-
 test/references/set_nonexisting_option.result  |2 +-
 .../references/set_nonexisting_option_multiline.result |2 ++
 test/references/set_parsing_multiline.data |2 ++
 test/tests.d/020_get   |9 +
 test/tests.d/030_set   |   16 
 14 files changed, 62 insertions(+), 6 deletions(-)
 create mode 100644 test/references/get_multiline.data
 create mode 100644 test/references/set_existing_option_multiline.result
 create mode 100644 test/references/set_nonexisting_option_multiline.result
 create mode 100644 test/references/set_parsing_multiline.data

diff --git a/test/references/add_section.result 
b/test/references/add_section.result
index c7daab6..37e0e7d 100644
--- a/test/references/add_section.result
+++ b/test/references/add_section.result
@@ -1 +1 @@
-+add.section=type
++add.section='type'
diff --git a/test/references/export.data b/test/references/export.data
index c7e4d39..9e4d3c9 100644
--- a/test/references/export.data
+++ b/test/references/export.data
@@ -3,4 +3,9 @@ config 'type' 'section'
option 'opt' 'val'
list 'list_opt' 'val0'
list 'list_opt' 'val1'
-
+   option mul_line_opt_sq 'line 1
+line 2 \
+line 3'
+   option mul_line_opt_dq \Hello\, \
+World.\'
+
diff --git a/test/references/export.result b/test/references/export.result
index bc06655..2fa5b48 100644
--- a/test/references/export.result
+++ b/test/references/export.result
@@ -4,4 +4,9 @@ config type 'section'
option opt 'val'
list list_opt 'val0'
list list_opt 'val1'
+   option mul_line_opt_sq 'line 1
+line 2 \
+line 3'
+   option mul_line_opt_dq 'Hello, World.'\''
+'
 
diff --git a/test/references/get_multiline.data 
b/test/references/get_multiline.data
new file mode 100644
index 000..bacb804
--- /dev/null
+++ b/test/references/get_multiline.data
@@ -0,0 +1,5 @@
+config 'type' 'section'
+   # Cannot preserve trailling whitespace with assertEquals.
+   option opt \Hello, \
+World.
+\'
diff --git a/test/references/import.data b/test/references/import.data
index 6a9b737..a7a21ef 100644
--- a/test/references/import.data
+++ b/test/references/import.data
@@ -4,4 +4,9 @@ config 'type' 'section'
option 'opt' 'val'
list 'list_opt' 'val0'
list 'list_opt' 'val1'
-
+   option mul_line_opt_sq \''line 1
+line 2 \
+line 3'\'
+   option mul_line_opt_dq \Hello, \
+World.\'
+
diff --git a/test/references/import.result b/test/references/import.result
index 47704b8..56eb96f 100644
--- a/test/references/import.result
+++ b/test/references/import.result
@@ -3,4 +3,9 @@ config type 'section'
option opt 'val'
list list_opt 'val0'
list list_opt 'val1'
+   option mul_line_opt_sq ''\''line 1
+line 2 \
+line 3'\'''
+   option mul_line_opt_dq 'Hello, World.'\''
+'
 
diff --git a/test/references/set_existing_option.result 
b/test/references/set_existing_option.result
index c88deea..902cff3 100644
--- a/test/references/set_existing_option.result
+++ b/test/references/set_existing_option.result
@@ -1 +1 @@
-set.section.opt=val
+set.section.opt='val'
diff --git a/test/references/set_existing_option_multiline.result 
b/test/references/set_existing_option_multiline.result
new file mode 100644
index 000..85e1ada
--- /dev/null
+++ b/test/references/set_existing_option_multiline.result
@@ -0,0 +1,2 @@
+set.section.opt='Hello,\'\''
+World'
diff --git a/test/references/set_named_section.result 
b/test/references/set_named_section.result
index 2a4145b..4ee5c2e 100644
--- a/test/references/set_named_section.result
+++ b/test/references/set_named_section.result
@@ -1 +1 @@
-set.section=named
+set.section='named'
diff --git a/test/references/set_nonexisting_option.result 
b/test/references/set_nonexisting_option.result
index c88deea..902cff3 100644
--- a/test/references/set_nonexisting_option.result
+++ b/test/references/set_nonexisting_option.result
@@ -1 +1 @@
-set.section.opt=val
+set.section.opt='val'
diff --git a/test/references/set_nonexisting_option_multiline.result 
b/test/references/set_nonexisting_option_multiline.result
new file mode 100644
index 000..85e1ada
--- /dev/null
+++ b/test/references/set_nonexisting_option_multiline.result
@@ -0,0 +1,2

[OpenWrt-Devel] please test target au1000 and gemini with kernel 3.10

2014-07-06 Thread Hauke Mehrtens
I pushed the au1000 and gemini target to kernel 3.10 because all older
kernel versions are not supported any more in trunk. I do *not* have a
device to test this, these new kernel versions are untested on these boards.

If someone owns a Cortina Systems CS351x or a RMI/AMD AU1x00 board
please build OpenWrt for this target with kernel 3.10.44 activated and
test it on your device and report back. When someone confirms that it is
still working and I haven't introduced any new regressions I will change
the default kernel to 3.10.XX.

Hauke
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] please test target au1000 and gemini with kernel 3.10

2014-07-06 Thread Roman Yeryomin
On 6 July 2014 21:34, Hauke Mehrtens ha...@hauke-m.de wrote:
 I pushed the au1000 and gemini target to kernel 3.10 because all older
 kernel versions are not supported any more in trunk. I do *not* have a
 device to test this, these new kernel versions are untested on these boards.

 If someone owns a Cortina Systems CS351x or a RMI/AMD AU1x00 board
 please build OpenWrt for this target with kernel 3.10.44 activated and
 test it on your device and report back. When someone confirms that it is
 still working and I haven't introduced any new regressions I will change
 the default kernel to 3.10.XX.

I have Raidsonic NAS 4220-B (board is marked as MP-LNU23SL-V1.21).
As far as I know it's based on CS351x (there is a radiator glued on
top of it) but image/Makefile should be modified to make an image for
that board.
I will try to do that in next few days.


Regards,
Roman
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] please test target au1000 and gemini with kernel 3.10

2014-07-06 Thread Hauke Mehrtens
On 07/06/2014 10:10 PM, Roman Yeryomin wrote:
 On 6 July 2014 21:34, Hauke Mehrtens ha...@hauke-m.de wrote:
 I pushed the au1000 and gemini target to kernel 3.10 because all older
 kernel versions are not supported any more in trunk. I do *not* have a
 device to test this, these new kernel versions are untested on these boards.

 If someone owns a Cortina Systems CS351x or a RMI/AMD AU1x00 board
 please build OpenWrt for this target with kernel 3.10.44 activated and
 test it on your device and report back. When someone confirms that it is
 still working and I haven't introduced any new regressions I will change
 the default kernel to 3.10.XX.
 
 I have Raidsonic NAS 4220-B (board is marked as MP-LNU23SL-V1.21).
 As far as I know it's based on CS351x (there is a radiator glued on
 top of it) but image/Makefile should be modified to make an image for
 that board.
 I will try to do that in next few days.
 
 
Thanks for the effort, but I think it would be best if someone who owns
an already supported board would test it. It could be that you get some
other problems or do not see problems someone else with an already
supported board will see.

Hauke
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] please test target au1000 and gemini with kernel 3.10

2014-07-06 Thread Roman Yeryomin
On 6 July 2014 23:16, Hauke Mehrtens ha...@hauke-m.de wrote:
 On 07/06/2014 10:10 PM, Roman Yeryomin wrote:
 On 6 July 2014 21:34, Hauke Mehrtens ha...@hauke-m.de wrote:
 I pushed the au1000 and gemini target to kernel 3.10 because all older
 kernel versions are not supported any more in trunk. I do *not* have a
 device to test this, these new kernel versions are untested on these boards.

 If someone owns a Cortina Systems CS351x or a RMI/AMD AU1x00 board
 please build OpenWrt for this target with kernel 3.10.44 activated and
 test it on your device and report back. When someone confirms that it is
 still working and I haven't introduced any new regressions I will change
 the default kernel to 3.10.XX.

 I have Raidsonic NAS 4220-B (board is marked as MP-LNU23SL-V1.21).
 As far as I know it's based on CS351x (there is a radiator glued on
 top of it) but image/Makefile should be modified to make an image for
 that board.
 I will try to do that in next few days.


 Thanks for the effort, but I think it would be best if someone who owns
 an already supported board would test it. It could be that you get some
 other problems or do not see problems someone else with an already
 supported board will see.

I was planning to give it a try anyway :)


Regards,
Roman
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] please test target mpc52xx and mpc83xx with kernel 3.10

2014-07-06 Thread Hauke Mehrtens
On 07/06/2014 08:34 PM, Hauke Mehrtens wrote:
 I pushed the au1000 and gemini target to kernel 3.10 because all older
 kernel versions are not supported any more in trunk. I do *not* have a
 device to test this, these new kernel versions are untested on these boards.
 
 If someone owns a Cortina Systems CS351x or a RMI/AMD AU1x00 board
 please build OpenWrt for this target with kernel 3.10.44 activated and
 test it on your device and report back. When someone confirms that it is
 still working and I haven't introduced any new regressions I will change
 the default kernel to 3.10.XX.

I also added basic compile tested support for kernel 3.10 to target
mpc52xx and mpc83xx. It would be nice if someone could test a supported
Freescale MPC83xx or Freescale MPC52xx board with OpenWrt trunk and
kernel 3.10. To compile with kernel 3.10 replace the kernel version with
LINUX_VERSION:=3.10.44 in the target's Makefile.

I will make kernel 3.10 the default kernel when I get some positive reports.

Hauke
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Add cable testing support for ar8327. A cable test can take some time. swconfig dev switch0 port 1 set cabletest 1 # start swconfig dev switch0 port 1 get cabletest # get resul

2013-08-13 Thread Alexander Couzens
Signed-off-by: Alexander Couzens lyn...@fe80.eu
---
 .../linux/generic/files/drivers/net/phy/ar8216.c   | 119 +
 .../linux/generic/files/drivers/net/phy/ar8216.h   |   7 ++
 2 files changed, 126 insertions(+)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c 
b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 3a696c2..1725161 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -1894,6 +1894,117 @@ unlock:
return ret;
 }
 
+static int
+ar8327_sw_cabletest_start(struct switch_dev *dev,
+  const struct switch_attr *attr,
+  struct switch_val *val)
+{
+   struct mii_bus *bus = swdev_to_ar8xxx(dev)-phy-bus;
+   /* port 1 = phy 0 */
+   int phy = val-port_vlan - 1;
+   unsigned int pair;
+   u16 writes;
+
+   if (!chip_is_ar8327(swdev_to_ar8xxx(dev))) {
+   pr_info(switch: Only ar8327 is supported for cable testing\n);
+   return -EINVAL;
+   }
+
+   if (phy  0 || phy = AR8327_NUM_PHYS)
+   return -EINVAL;
+
+   mutex_lock(bus-mdio_lock);
+   for (pair = 0; pair  4; pair++) {
+   writes = pair  AR8327_CBLTEST_CTRL_SELECT_BIT;
+   bus-write(bus, phy, AR8327_MII_CBLTEST_CTRL,
+pair  AR8327_CBLTEST_CTRL_SELECT_BIT);
+
+   /* check for a still running test */
+   if (bus-read(bus, phy, AR8327_MII_CBLTEST_CTRL)  0x1) {
+   pr_err(switch: cable testing is busy [pair %i], pair);
+   continue;
+   }
+
+   /* start cable test */
+   bus-write(bus, phy, AR8327_MII_CBLTEST_CTRL, 0x1);
+   }
+   mutex_unlock(bus-mdio_lock);
+
+   return 0;
+}
+
+static int
+ar8327_sw_cabletest_get(struct switch_dev *dev,
+  const struct switch_attr *attr,
+  struct switch_val *val)
+{
+   struct mii_bus *bus = swdev_to_ar8xxx(dev)-phy-bus;
+   u16 reads;
+   u16 writes;
+   unsigned int pair;
+   /* length multiply *0.824m */
+   u8 cablelength;
+   u8 state;
+   char buf[2048];
+   int len = 0;
+   /* port 1 = phy 0 */
+   int phy = val-port_vlan - 1;
+
+   if (!chip_is_ar8327(swdev_to_ar8xxx(dev))) {
+   pr_info(switch: Only ar8327 is supported for cable testing\n);
+   return -EINVAL;
+   }
+
+   if (phy  0 || phy = AR8327_NUM_PHYS)
+   return -EINVAL;
+
+   mutex_lock(bus-mdio_lock);
+
+   /* check active cable test */
+   reads = bus-read(bus, phy, AR8327_MII_CBLTEST_CTRL);
+   if (reads  0x1) {
+   len += snprintf(buf + len, sizeof(buf) - len,
+   Error: Cabletest still running\n);
+   goto out;
+   }
+
+   for (pair = 0; pair  4; pair++) {
+   writes = pair  AR8327_CBLTEST_CTRL_SELECT_BIT;
+   bus-write(bus, phy, AR8327_MII_CBLTEST_CTRL,
+   pair  AR8327_CBLTEST_CTRL_SELECT_BIT);
+   usleep_range(1000, 2000); /* wait for the switch to propagate */
+   reads = bus-read(bus, phy, AR8327_MII_CBLTEST_RESULTS);
+   cablelength = reads  0xFF;
+   state = reads  AR8327_CBLTEST_CTRL_STATUS_BIT;
+   len += snprintf(buf + len, sizeof(buf) - len,
+   pair %i, len %i (0.824m), state ,
+   pair, cablelength);
+   switch (state) {
+   case AR8327_CBLTEST_CTRL_STATUS_OK:
+   len += snprintf(buf + len, sizeof(buf) - len,
+   ok, no link\n);
+   break;
+   case AR8327_CBLTEST_CTRL_STATUS_LINK:
+   len += snprintf(buf + len, sizeof(buf) - len,
+   link up\n);
+   break;
+   default:
+   len += snprintf(buf + len, sizeof(buf) - len,
+   broken 0x%x\n, state);
+   break;
+   }
+   }
+
+out:
+   mutex_unlock(bus-mdio_lock);
+
+   val-value.s = buf;
+   val-len = len;
+   return 0;
+}
+
+
+
 static struct switch_attr ar8xxx_sw_attr_globals[] = {
{
.type = SWITCH_TYPE_INT,
@@ -2006,6 +2117,14 @@ static struct switch_attr ar8xxx_sw_attr_port[] = {
.set = NULL,
.get = ar8xxx_sw_get_port_mib,
},
+   {
+   .type = SWITCH_TYPE_STRING,
+   .name = cabletest,
+   .description = Use set to start a cabletest on port and use
+get to fetch the result,
+   .set = ar8327_sw_cabletest_start,
+   .get = ar8327_sw_cabletest_get

[OpenWrt-Devel] [PATCH] [packages] tinc: init: useless directory existence test

2013-03-20 Thread Alessio Caiazza
From: Alessio Caiazza nol...@abisso.org

Currently tinc init script will delete the generated configuration
folder and then check if it will not exists in order to create it. This
patch will first check if the generated configuration folder exists and
then delete it, after that it will always create the configuration
folder.

Signed-off-by: Alessio Caiazza nol...@abisso.org 
---
Hello, this is my first openwrt patch, I developed it on attitude
adjustment branch for fixing the bug about the not deleted conf
directory; after reading all the patch submission guide I found it to
be already fixed in trunk. 

Anyhow the commited patch is whitespace indented in a tab indented file
and did that always-true check. So I decided to rebase my work on trunk
and submit it in order to get used to the  patch submission process.
Index: tinc.init
===
diff --git a/packages/net/tinc/files/tinc.init 
b/packages/net/tinc/files/tinc.init
--- a/packages/net/tinc/files/tinc.init (revision 36094)
+++ b/packages/net/tinc/files/tinc.init (working copy)
@@ -135,10 +135,8 @@
 
section_enabled $s || return 1
 
-# rm old config
-rm -rf $TMP_TINC/$s/
-
-   [ ! -d $TMP_TINC/$s ]  mkdir -p $TMP_TINC/$s
+   [ -d $TMP_TINC/$s ]  rm -rf $TMP_TINC/$s/
+   mkdir -p $TMP_TINC/$s
[ -d /etc/tinc/$s ]  cp -r /etc/tinc/$s $TMP_TINC/
 
# append flags




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [packages] libjpeg-turbo: add package for test utils, move appropriate targets there

2013-02-18 Thread Florian Fainelli



On 01/19/2013 08:09 PM, Russell Senior wrote:


Trying to figure out where jpeggut came from, found a) that it was a
typo and b) that it was renamed in r643 from jpegut to tjunittest.  In
the same revision, jpegtest became tjbench, and later in r733, jcstest
was added to test jpeg color space extentions.  Since these tools will
only be desirable for testing, added a new package libjpeg-turbo-tests
to provide these utilities.  The utilities needed libturbojpeg, so
added what had been a commented out library to the new package.

The libturbojpeg are currently commented out in InstallDev as well.
If external packages begin to rely on libturbojpeg functions for some
reason, the library should be added back.

Signed-off-by: Russell Senior russ...@personaltelco.net


Applied in r35655, thanks!
--
Florian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [packages] libjpeg-turbo: add package for test utils, move appropriate targets there

2013-01-19 Thread Russell Senior

Trying to figure out where jpeggut came from, found a) that it was a
typo and b) that it was renamed in r643 from jpegut to tjunittest.  In
the same revision, jpegtest became tjbench, and later in r733, jcstest
was added to test jpeg color space extentions.  Since these tools will
only be desirable for testing, added a new package libjpeg-turbo-tests
to provide these utilities.  The utilities needed libturbojpeg, so
added what had been a commented out library to the new package.

The libturbojpeg are currently commented out in InstallDev as well.
If external packages begin to rely on libturbojpeg functions for some
reason, the library should be added back.

Signed-off-by: Russell Senior russ...@personaltelco.net
---
 libs/libjpeg-turbo/Makefile | 24 
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/libs/libjpeg-turbo/Makefile b/libs/libjpeg-turbo/Makefile
index 9ae15a6..546bf9b 100644
--- a/libs/libjpeg-turbo/Makefile
+++ b/libs/libjpeg-turbo/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libjpeg-turbo
 PKG_VERSION:=1.2.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/libjpeg-turbo
@@ -43,6 +43,14 @@ define Package/jpeg-tools
   TITLE+= manipulation tools
 endef
 
+define Package/libjpeg-turbo-tests
+  $(call Package/libjpeg-turbo/Default)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+libjpeg-turbo
+  TITLE+= testing utilities
+endef
+
 TARGET_CFLAGS += $(FPIC)
 
 CONFIGURE_ARGS += \
@@ -69,17 +77,25 @@ endef
 define Package/libjpeg-turbo/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/.libs/libjpeg.{a,so*} $(1)/usr/lib/
-#  $(CP) $(PKG_BUILD_DIR)/.libs/libturbojpeg.{a,so*} $(1)/usr/lib/
 endef
 
 define Package/jpeg-tools/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{c,d}jpeg $(1)/usr/bin/
-   $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/jpeg{tran,gut} $(1)/usr/bin/
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/jpegtran $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{rd,wr}jpgcom $(1)/usr/bin/
-   $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/jpgtest $(1)/usr/bin/
+endef
+
+define Package/libjpeg-turbo-tests/install
+   $(INSTALL_DIR) $(1)/usr/bin
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/tjbench $(1)/usr/bin
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/tjunittest $(1)/usr/bin
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/jcstest $(1)/usr/bin
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP) $(PKG_BUILD_DIR)/.libs/libturbojpeg.{a,so*} $(1)/usr/lib/
 endef
 
 $(eval $(call HostBuild))
 $(eval $(call BuildPackage,libjpeg-turbo))
 $(eval $(call BuildPackage,jpeg-tools))
+$(eval $(call BuildPackage,libjpeg-turbo-tests))
-- 
1.7.12


-- 
Russell Senior, President
russ...@personaltelco.net
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


  1   2   >