diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/boot/bootdev.c | 1 | ||||
-rw-r--r-- | test/boot/bootflow.c | 10 | ||||
-rw-r--r-- | test/boot/bootm.c | 1 | ||||
-rw-r--r-- | test/boot/bootmeth.c | 1 | ||||
-rw-r--r-- | test/boot/cedit.c | 217 | ||||
-rw-r--r-- | test/boot/expo.c | 214 | ||||
-rw-r--r-- | test/boot/measurement.c | 1 | ||||
-rw-r--r-- | test/boot/upl.c | 1 | ||||
-rw-r--r-- | test/cmd/fdt.c | 1 | ||||
-rw-r--r-- | test/cmd/hash.c | 1 | ||||
-rw-r--r-- | test/cmd/mem_copy.c | 1 | ||||
-rw-r--r-- | test/cmd/mem_search.c | 1 | ||||
-rw-r--r-- | test/cmd/setexpr.c | 1 | ||||
-rw-r--r-- | test/common/test_autoboot.c | 1 | ||||
-rw-r--r-- | test/dm/blkmap.c | 1 | ||||
-rw-r--r-- | test/dm/button.c | 1 | ||||
-rw-r--r-- | test/dm/dsa.c | 1 | ||||
-rw-r--r-- | test/dm/fastboot.c | 1 | ||||
-rw-r--r-- | test/dm/part.c | 1 | ||||
-rw-r--r-- | test/env/fdt.c | 1 | ||||
-rw-r--r-- | test/hush/dollar.c | 1 | ||||
-rw-r--r-- | test/hush/if.c | 1 | ||||
-rw-r--r-- | test/hush/loop.c | 1 | ||||
-rw-r--r-- | test/lib/Makefile | 1 | ||||
-rw-r--r-- | test/lib/abuf.c | 105 | ||||
-rw-r--r-- | test/lib/efi_device_path.c | 1 | ||||
-rw-r--r-- | test/lib/slre.c | 58 | ||||
-rw-r--r-- | test/py/conftest.py | 10 | ||||
-rw-r--r-- | test/py/tests/test_efi_loader.py | 2 | ||||
-rw-r--r-- | test/py/tests/test_fpga.py | 4 | ||||
-rw-r--r-- | test/py/tests/test_net.py | 2 |
31 files changed, 586 insertions, 58 deletions
diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c index 9af94786870..a5f3d4462a9 100644 --- a/test/boot/bootdev.c +++ b/test/boot/bootdev.c @@ -10,6 +10,7 @@ #include <dm.h> #include <bootdev.h> #include <bootflow.h> +#include <env.h> #include <mapmem.h> #include <os.h> #include <test/ut.h> diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c index b261bd5f620..8de5a310add 100644 --- a/test/boot/bootflow.c +++ b/test/boot/bootflow.c @@ -14,6 +14,7 @@ #include <dm.h> #include <efi.h> #include <efi_loader.h> +#include <env.h> #include <expo.h> #include <mapmem.h> #ifdef CONFIG_SANDBOX @@ -857,7 +858,7 @@ static int check_font(struct unit_test_state *uts, struct scene *scn, uint id, txt = scene_obj_find(scn, id, SCENEOBJT_TEXT); ut_assertnonnull(txt); - ut_asserteq(font_size, txt->font_size); + ut_asserteq(font_size, txt->gen.font_size); return 0; } @@ -877,9 +878,10 @@ static int bootflow_menu_theme(struct unit_test_state *uts) ut_assertok(scan_mmc4_bootdev(uts)); ut_assertok(bootflow_menu_new(&exp)); + ut_assertok(bootflow_menu_add_all(exp)); node = ofnode_path("/bootstd/theme"); ut_assert(ofnode_valid(node)); - ut_assertok(bootflow_menu_apply_theme(exp, node)); + ut_assertok(expo_apply_theme(exp, node)); scn = expo_lookup_scene_id(exp, MAIN); ut_assertnonnull(scn); @@ -890,8 +892,8 @@ static int bootflow_menu_theme(struct unit_test_state *uts) * * Check both menu items, since there are two bootflows */ - ut_assertok(check_font(uts, scn, OBJ_PROMPT, font_size)); - ut_assertok(check_font(uts, scn, OBJ_POINTER, font_size)); + for (i = OBJ_PROMPT1A; i <= OBJ_AUTOBOOT; i++) + ut_assertok(check_font(uts, scn, i, font_size)); for (i = 0; i < 2; i++) { ut_assertok(check_font(uts, scn, ITEM_DESC + i, font_size)); ut_assertok(check_font(uts, scn, ITEM_KEY + i, font_size)); diff --git a/test/boot/bootm.c b/test/boot/bootm.c index 1d1efe71ad5..ed60094f3c1 100644 --- a/test/boot/bootm.c +++ b/test/boot/bootm.c @@ -6,6 +6,7 @@ */ #include <bootm.h> +#include <env.h> #include <asm/global_data.h> #include <test/test.h> #include <test/ut.h> diff --git a/test/boot/bootmeth.c b/test/boot/bootmeth.c index 577f259fb37..2ef3569ad83 100644 --- a/test/boot/bootmeth.c +++ b/test/boot/bootmeth.c @@ -9,6 +9,7 @@ #include <bootmeth.h> #include <bootstd.h> #include <dm.h> +#include <env.h> #include <test/ut.h> #include "bootstd_common.h" diff --git a/test/boot/cedit.c b/test/boot/cedit.c index 4d1b99bc2ea..dbf781902fb 100644 --- a/test/boot/cedit.c +++ b/test/boot/cedit.c @@ -5,11 +5,13 @@ */ #include <cedit.h> +#include <dm.h> #include <env.h> #include <expo.h> #include <mapmem.h> #include <dm/ofnode.h> #include <test/ut.h> +#include <test/video.h> #include "bootstd_common.h" #include <test/cedit-test.h> #include "../../boot/scene_internal.h" @@ -46,7 +48,7 @@ static int cedit_base(struct unit_test_state *uts) txt = scene_obj_find(scn, menu->title_id, SCENEOBJT_NONE); ut_assertnonnull(txt); - ut_asserteq_str("AC Power", expo_get_str(exp, txt->str_id)); + ut_asserteq_str("AC Power", expo_get_str(exp, txt->gen.str_id)); ut_asserteq(ID_AC_ON, menu->cur_item_id); @@ -61,6 +63,7 @@ static int cedit_fdt(struct unit_test_state *uts) struct video_priv *vid_priv; extern struct expo *cur_exp; struct scene_obj_menu *menu; + struct udevice *dev; ulong addr = 0x1000; struct ofprop prop; struct scene *scn; @@ -70,9 +73,12 @@ static int cedit_fdt(struct unit_test_state *uts) void *fdt; int i; + ut_assertok(uclass_first_device_err(UCLASS_VIDEO, &dev)); + vid_priv = dev_get_uclass_priv(dev); + ut_assertok(run_command("cedit load hostfs - cedit.dtb", 0)); - ut_asserteq(ID_SCENE1, cedit_prepare(cur_exp, &vid_priv, &scn)); + ut_asserteq(ID_SCENE1, cedit_prepare(cur_exp, dev, &scn)); /* get a menu to fiddle with */ menu = scene_obj_find(scn, ID_CPU_SPEED, SCENEOBJT_MENU); @@ -132,12 +138,16 @@ static int cedit_env(struct unit_test_state *uts) struct video_priv *vid_priv; extern struct expo *cur_exp; struct scene_obj_menu *menu; + struct udevice *dev; struct scene *scn; char *str; ut_assertok(run_command("cedit load hostfs - cedit.dtb", 0)); - ut_asserteq(ID_SCENE1, cedit_prepare(cur_exp, &vid_priv, &scn)); + ut_assertok(uclass_first_device_err(UCLASS_VIDEO, &dev)); + vid_priv = dev_get_uclass_priv(dev); + + ut_asserteq(ID_SCENE1, cedit_prepare(cur_exp, dev, &scn)); /* get a menu to fiddle with */ menu = scene_obj_find(scn, ID_CPU_SPEED, SCENEOBJT_MENU); @@ -187,11 +197,14 @@ static int cedit_cmos(struct unit_test_state *uts) struct scene_obj_menu *menu, *menu2; struct video_priv *vid_priv; extern struct expo *cur_exp; + struct udevice *dev; struct scene *scn; ut_assertok(run_command("cedit load hostfs - cedit.dtb", 0)); - ut_asserteq(ID_SCENE1, cedit_prepare(cur_exp, &vid_priv, &scn)); + ut_assertok(uclass_first_device_err(UCLASS_VIDEO, &dev)); + vid_priv = dev_get_uclass_priv(dev); + ut_asserteq(ID_SCENE1, cedit_prepare(cur_exp, dev, &scn)); /* get the menus to fiddle with */ menu = scene_obj_find(scn, ID_CPU_SPEED, SCENEOBJT_MENU); @@ -220,3 +233,199 @@ static int cedit_cmos(struct unit_test_state *uts) return 0; } BOOTSTD_TEST(cedit_cmos, UTF_CONSOLE); + +/* Check the cedit displays correctly */ +static int cedit_render(struct unit_test_state *uts) +{ + struct scene_obj_menu *menu; + struct video_priv *vid_priv; + extern struct expo *cur_exp; + struct expo_action evt; + struct expo_action act; + struct udevice *dev, *con; + struct stdio_dev *sdev; + struct scene *scn; + struct expo *exp; + int i; + + ut_assertok(run_command("cedit load hostfs - cedit.dtb", 0)); + + exp = cur_exp; + sdev = stdio_get_by_name("vidconsole"); + ut_assertnonnull(sdev); + con = sdev->priv; + + dev = dev_get_parent(con); + vid_priv = dev_get_uclass_priv(dev); + ut_asserteq(ID_SCENE1, cedit_prepare(exp, dev, &scn)); + + menu = scene_obj_find(scn, ID_POWER_LOSS, SCENEOBJT_MENU); + ut_assertnonnull(menu); + ut_asserteq(ID_AC_OFF, menu->cur_item_id); + + ut_assertok(expo_render(exp)); + ut_asserteq(4929, video_compress_fb(uts, dev, false)); + ut_assertok(video_check_copy_fb(uts, dev)); + + /* move to the second menu */ + act.type = EXPOACT_POINT_OBJ; + act.select.id = ID_POWER_LOSS; + ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); + ut_assertok(expo_render(exp)); + ut_asserteq(4986, video_compress_fb(uts, dev, false)); + + /* open the menu */ + act.type = EXPOACT_OPEN; + act.select.id = ID_POWER_LOSS; + ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); + ut_assertok(expo_render(exp)); + ut_asserteq(5393, video_compress_fb(uts, dev, false)); + + /* close the menu */ + act.type = EXPOACT_CLOSE; + act.select.id = ID_POWER_LOSS; + ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); + ut_assertok(expo_render(exp)); + ut_asserteq(4986, video_compress_fb(uts, dev, false)); + + /* open the menu again to check it looks the same */ + act.type = EXPOACT_OPEN; + act.select.id = ID_POWER_LOSS; + ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); + ut_assertok(expo_render(exp)); + ut_asserteq(5393, video_compress_fb(uts, dev, false)); + + /* close the menu */ + act.type = EXPOACT_CLOSE; + act.select.id = ID_POWER_LOSS; + ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); + ut_assertok(expo_render(exp)); + ut_asserteq(4986, video_compress_fb(uts, dev, false)); + + act.type = EXPOACT_OPEN; + act.select.id = ID_POWER_LOSS; + ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); + ut_assertok(expo_render(exp)); + ut_asserteq(5393, video_compress_fb(uts, dev, false)); + + act.type = EXPOACT_POINT_ITEM; + act.select.id = ID_AC_ON; + ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); + ut_assertok(expo_render(exp)); + ut_asserteq(5365, video_compress_fb(uts, dev, false)); + + /* select it */ + act.type = EXPOACT_SELECT; + act.select.id = ID_AC_ON; + ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); + ut_assertok(expo_render(exp)); + ut_asserteq(4980, video_compress_fb(uts, dev, false)); + + ut_asserteq(ID_AC_ON, menu->cur_item_id); + + /* move to the line-edit field */ + act.type = EXPOACT_POINT_OBJ; + act.select.id = ID_MACHINE_NAME; + ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); + ut_assertok(expo_render(exp)); + ut_asserteq(4862, video_compress_fb(uts, dev, false)); + + /* open it */ + act.type = EXPOACT_OPEN; + act.select.id = ID_MACHINE_NAME; + ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); + ut_assertok(expo_render(exp)); + ut_asserteq(4851, video_compress_fb(uts, dev, false)); + + /* + * Send some keypresses. Note that the console must be enabled so that + * the characters actually reach the putc_xy() in console_truetype, + * since in scene_textline_send_key(), the lineedit restores the + * vidconsole state, outputs the character and then saves the state + * again. If the character is never output, then the state won't be + * updated and the lineedit will be inconsistent. + */ + ut_unsilence_console(uts); + for (i = 'a'; i < 'd'; i++) + ut_assertok(scene_send_key(scn, i, &evt)); + ut_silence_console(uts); + ut_assertok(cedit_arange(exp, vid_priv, scn->id)); + ut_assertok(expo_render(exp)); + ut_asserteq(4996, video_compress_fb(uts, dev, false)); + + expo_destroy(exp); + cur_exp = NULL; + + return 0; +} +BOOTSTD_TEST(cedit_render, UTF_DM | UTF_SCAN_FDT); + +/* Check the cedit displays lineedits correctly */ +static int cedit_render_lineedit(struct unit_test_state *uts) +{ + struct scene_obj_textline *tline; + struct video_priv *vid_priv; + extern struct expo *cur_exp; + struct expo_action evt; + struct expo_action act; + struct udevice *dev, *con; + struct stdio_dev *sdev; + struct scene *scn; + struct expo *exp; + char *str; + int i; + + ut_assertok(run_command("cedit load hostfs - cedit.dtb", 0)); + + exp = cur_exp; + sdev = stdio_get_by_name("vidconsole"); + ut_assertnonnull(sdev); + con = sdev->priv; + + dev = dev_get_parent(con); + vid_priv = dev_get_uclass_priv(dev); + ut_asserteq(ID_SCENE1, cedit_prepare(exp, dev, &scn)); + + /* set up an initial value for the textline */ + tline = scene_obj_find(scn, ID_MACHINE_NAME, SCENEOBJT_TEXTLINE); + ut_assertnonnull(tline); + str = abuf_data(&tline->buf); + strcpy(str, "my-machine"); + ut_asserteq(20, tline->pos); + + ut_assertok(expo_render(exp)); + ut_asserteq(5336, video_compress_fb(uts, dev, false)); + ut_assertok(video_check_copy_fb(uts, dev)); + + /* move to the line-edit field */ + act.type = EXPOACT_POINT_OBJ; + act.select.id = ID_MACHINE_NAME; + ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); + ut_assertok(expo_render(exp)); + ut_asserteq(5363, video_compress_fb(uts, dev, false)); + + /* open it */ + act.type = EXPOACT_OPEN; + act.select.id = ID_MACHINE_NAME; + ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); + // ut_asserteq(0, tline->pos); + ut_assertok(expo_render(exp)); + ut_asserteq(5283, video_compress_fb(uts, dev, false)); + + /* delete some characters */ + ut_unsilence_console(uts); + for (i = 0; i < 3; i++) + ut_assertok(scene_send_key(scn, '\b', &evt)); + ut_silence_console(uts); + ut_asserteq_str("my-mach", str); + + ut_assertok(cedit_arange(exp, vid_priv, scn->id)); + ut_assertok(expo_render(exp)); + ut_asserteq(5170, video_compress_fb(uts, dev, false)); + + expo_destroy(exp); + cur_exp = NULL; + + return 0; +} +BOOTSTD_TEST(cedit_render_lineedit, UTF_DM | UTF_SCAN_FDT); diff --git a/test/boot/expo.c b/test/boot/expo.c index 1d283a2ac95..ddfb739f9cf 100644 --- a/test/boot/expo.c +++ b/test/boot/expo.c @@ -11,6 +11,7 @@ #include <video.h> #include <linux/input.h> #include <test/ut.h> +#include <test/video.h> #include "bootstd_common.h" #include <test/cedit-test.h> #include "../../boot/scene_internal.h" @@ -24,14 +25,20 @@ enum { OBJ_LOGO, OBJ_TEXT, OBJ_TEXT2, + OBJ_TEXT3, OBJ_MENU, OBJ_MENU_TITLE, + OBJ_BOX, + OBJ_BOX2, + OBJ_TEXTED, /* strings */ STR_SCENE_TITLE, STR_TEXT, STR_TEXT2, + STR_TEXT3, + STR_TEXTED, STR_MENU_TITLE, STR_POINTER_TEXT, @@ -270,8 +277,8 @@ static int expo_object_attr(struct unit_test_state *uts) ut_assert(id > 0); ut_assertok(scene_obj_set_pos(scn, OBJ_LOGO, 123, 456)); - ut_asserteq(123, img->obj.dim.x); - ut_asserteq(456, img->obj.dim.y); + ut_asserteq(123, img->obj.bbox.x0); + ut_asserteq(456, img->obj.bbox.y0); ut_asserteq(-ENOENT, scene_obj_set_pos(scn, OBJ_TEXT2, 0, 0)); @@ -280,8 +287,8 @@ static int expo_object_attr(struct unit_test_state *uts) strcpy(name, "font2"); ut_assertok(scene_txt_set_font(scn, OBJ_TEXT, name, 42)); - ut_asserteq_ptr(name, txt->font_name); - ut_asserteq(42, txt->font_size); + ut_asserteq_ptr(name, txt->gen.font_name); + ut_asserteq(42, txt->gen.font_size); ut_asserteq(-ENOENT, scene_txt_set_font(scn, OBJ_TEXT2, name, 42)); @@ -296,7 +303,7 @@ static int expo_object_attr(struct unit_test_state *uts) node = ofnode_path("/bootstd/theme"); ut_assert(ofnode_valid(node)); ut_assertok(expo_apply_theme(exp, node)); - ut_asserteq(30, txt->font_size); + ut_asserteq(30, txt->gen.font_size); expo_destroy(exp); @@ -360,8 +367,8 @@ static int expo_object_menu(struct unit_test_state *uts) ut_asserteq(0, menu->pointer_id); ut_assertok(scene_obj_set_pos(scn, OBJ_MENU, 50, 400)); - ut_asserteq(50, menu->obj.dim.x); - ut_asserteq(400, menu->obj.dim.y); + ut_asserteq(50, menu->obj.bbox.x0); + ut_asserteq(400, menu->obj.bbox.y0); id = scene_txt_str(scn, "title", OBJ_MENU_TITLE, STR_MENU_TITLE, "Main Menu", &tit); @@ -407,24 +414,24 @@ static int expo_object_menu(struct unit_test_state *uts) ut_asserteq(id, menu->cur_item_id); /* the title should be at the top */ - ut_asserteq(menu->obj.dim.x, tit->obj.dim.x); - ut_asserteq(menu->obj.dim.y, tit->obj.dim.y); + ut_asserteq(menu->obj.bbox.x0, tit->obj.bbox.x0); + ut_asserteq(menu->obj.bbox.y0, tit->obj.bbox.y0); /* the first item should be next */ - ut_asserteq(menu->obj.dim.x, name1->obj.dim.x); - ut_asserteq(menu->obj.dim.y + 32, name1->obj.dim.y); + ut_asserteq(menu->obj.bbox.x0, name1->obj.bbox.x0); + ut_asserteq(menu->obj.bbox.y0 + 32, name1->obj.bbox.y0); - ut_asserteq(menu->obj.dim.x + 230, key1->obj.dim.x); - ut_asserteq(menu->obj.dim.y + 32, key1->obj.dim.y); + ut_asserteq(menu->obj.bbox.x0 + 230, key1->obj.bbox.x0); + ut_asserteq(menu->obj.bbox.y0 + 32, key1->obj.bbox.y0); - ut_asserteq(menu->obj.dim.x + 200, ptr->obj.dim.x); - ut_asserteq(menu->obj.dim.y + 32, ptr->obj.dim.y); + ut_asserteq(menu->obj.bbox.x0 + 200, ptr->obj.bbox.x0); + ut_asserteq(menu->obj.bbox.y0 + 32, ptr->obj.bbox.y0); - ut_asserteq(menu->obj.dim.x + 280, desc1->obj.dim.x); - ut_asserteq(menu->obj.dim.y + 32, desc1->obj.dim.y); + ut_asserteq(menu->obj.bbox.x0 + 280, desc1->obj.bbox.x0); + ut_asserteq(menu->obj.bbox.y0 + 32, desc1->obj.bbox.y0); - ut_asserteq(-4, prev1->obj.dim.x); - ut_asserteq(menu->obj.dim.y + 32, prev1->obj.dim.y); + ut_asserteq(-4, prev1->obj.bbox.x0); + ut_asserteq(menu->obj.bbox.y0 + 32, prev1->obj.bbox.y0); ut_asserteq(true, prev1->obj.flags & SCENEOF_HIDE); /* check iterating through scene items */ @@ -457,6 +464,7 @@ static int expo_render_image(struct unit_test_state *uts) { struct scene_obj_menu *menu; struct scene *scn, *scn2; + struct abuf orig, *text; struct expo_action act; struct scene_obj *obj; struct udevice *dev; @@ -487,6 +495,15 @@ static int expo_render_image(struct unit_test_state *uts) 60)); ut_assertok(scene_obj_set_pos(scn, OBJ_TEXT2, 200, 600)); + /* this string is clipped as it extends beyond its bottom bound */ + id = scene_txt_str(scn, "text", OBJ_TEXT3, STR_TEXT3, + "this is yet\nanother string, with word-wrap and it goes on for quite a while", + NULL); + ut_assert(id > 0); + ut_assertok(scene_txt_set_font(scn, OBJ_TEXT3, "nimbus_sans_l_regular", + 60)); + ut_assertok(scene_obj_set_bbox(scn, OBJ_TEXT3, 500, 200, 1000, 350)); + id = scene_menu(scn, "main", OBJ_MENU, &menu); ut_assert(id > 0); @@ -534,6 +551,22 @@ static int expo_render_image(struct unit_test_state *uts) ut_assertok(scene_obj_set_pos(scn, OBJ_MENU, 50, 400)); + id = scene_box(scn, "box", OBJ_BOX, 3, NULL); + ut_assert(id > 0); + ut_assertok(scene_obj_set_bbox(scn, OBJ_BOX, 40, 390, 1000, 510)); + + id = scene_box(scn, "box2", OBJ_BOX2, 1, NULL); + ut_assert(id > 0); + ut_assertok(scene_obj_set_bbox(scn, OBJ_BOX, 500, 200, 1000, 350)); + + id = scene_texted(scn, "editor", OBJ_TEXTED, STR_TEXTED, NULL); + ut_assert(id > 0); + ut_assertok(scene_obj_set_bbox(scn, OBJ_TEXTED, 100, 200, 400, 650)); + ut_assertok(expo_edit_str(exp, STR_TEXTED, &orig, &text)); + + abuf_printf(text, "This\nis the initial contents of the text editor " + "but it is quite likely that more will be added later"); + scn2 = expo_lookup_scene_id(exp, SCENE1); ut_asserteq_ptr(scn, scn2); scn2 = expo_lookup_scene_id(exp, SCENE2); @@ -548,46 +581,98 @@ static int expo_render_image(struct unit_test_state *uts) /* check dimensions of text */ obj = scene_obj_find(scn, OBJ_TEXT, SCENEOBJT_NONE); ut_assertnonnull(obj); - ut_asserteq(400, obj->dim.x); - ut_asserteq(100, obj->dim.y); - ut_asserteq(126, obj->dim.w); - ut_asserteq(40, obj->dim.h); + ut_asserteq(400, obj->bbox.x0); + ut_asserteq(100, obj->bbox.y0); + ut_asserteq(400 + 126, obj->bbox.x1); + ut_asserteq(100 + 40, obj->bbox.y1); /* check dimensions of image */ obj = scene_obj_find(scn, OBJ_LOGO, SCENEOBJT_NONE); ut_assertnonnull(obj); - ut_asserteq(50, obj->dim.x); - ut_asserteq(20, obj->dim.y); - ut_asserteq(160, obj->dim.w); - ut_asserteq(160, obj->dim.h); + ut_asserteq(50, obj->bbox.x0); + ut_asserteq(20, obj->bbox.y0); + ut_asserteq(50 + 160, obj->bbox.x1); + ut_asserteq(20 + 160, obj->bbox.y1); /* check dimensions of menu labels - both should be the same width */ obj = scene_obj_find(scn, ITEM1_LABEL, SCENEOBJT_NONE); ut_assertnonnull(obj); - ut_asserteq(50, obj->dim.x); - ut_asserteq(436, obj->dim.y); - ut_asserteq(29, obj->dim.w); - ut_asserteq(18, obj->dim.h); + ut_asserteq(50, obj->bbox.x0); + ut_asserteq(436, obj->bbox.y0); + ut_asserteq(50 + 29, obj->bbox.x1); + ut_asserteq(436 + 18, obj->bbox.y1); obj = scene_obj_find(scn, ITEM2_LABEL, SCENEOBJT_NONE); ut_assertnonnull(obj); - ut_asserteq(50, obj->dim.x); - ut_asserteq(454, obj->dim.y); - ut_asserteq(29, obj->dim.w); - ut_asserteq(18, obj->dim.h); + ut_asserteq(50, obj->bbox.x0); + ut_asserteq(454, obj->bbox.y0); + ut_asserteq(50 + 29, obj->bbox.x1); + ut_asserteq(454 + 18, obj->bbox.y1); + + /* same for the key */ + obj = scene_obj_find(scn, ITEM1_KEY, SCENEOBJT_NONE); + ut_assertnonnull(obj); + ut_asserteq(280, obj->bbox.x0); + ut_asserteq(436, obj->bbox.y0); + ut_asserteq(280 + 9, obj->bbox.x1); + ut_asserteq(436 + 18, obj->bbox.y1); + + obj = scene_obj_find(scn, ITEM2_KEY, SCENEOBJT_NONE); + ut_assertnonnull(obj); + ut_asserteq(280, obj->bbox.x0); + ut_asserteq(454, obj->bbox.y0); + ut_asserteq(280 + 9, obj->bbox.x1); + ut_asserteq(454 + 18, obj->bbox.y1); + + /* and the description */ + obj = scene_obj_find(scn, ITEM1_DESC, SCENEOBJT_NONE); + ut_assertnonnull(obj); + ut_asserteq(330, obj->bbox.x0); + ut_asserteq(436, obj->bbox.y0); + ut_asserteq(330 + 89, obj->bbox.x1); + ut_asserteq(436 + 18, obj->bbox.y1); + + obj = scene_obj_find(scn, ITEM2_DESC, SCENEOBJT_NONE); + ut_assertnonnull(obj); + ut_asserteq(330, obj->bbox.x0); + ut_asserteq(454, obj->bbox.y0); + ut_asserteq(330 + 89, obj->bbox.x1); + ut_asserteq(454 + 18, obj->bbox.y1); /* check dimensions of menu */ obj = scene_obj_find(scn, OBJ_MENU, SCENEOBJT_NONE); ut_assertnonnull(obj); - ut_asserteq(50, obj->dim.x); - ut_asserteq(400, obj->dim.y); - ut_asserteq(160, obj->dim.w); - ut_asserteq(160, obj->dim.h); + ut_asserteq(50, obj->bbox.x0); + ut_asserteq(400, obj->bbox.y0); + ut_asserteq(50 + 160, obj->bbox.x1); + ut_asserteq(400 + 160, obj->bbox.y1); + + scene_obj_set_width(scn, OBJ_MENU, 170); + ut_asserteq(50 + 170, obj->bbox.x1); + scene_obj_set_bbox(scn, OBJ_MENU, 60, 410, 50 + 160, 400 + 160); + ut_asserteq(60, obj->bbox.x0); + ut_asserteq(410, obj->bbox.y0); + ut_asserteq(50 + 160, obj->bbox.x1); + ut_asserteq(400 + 160, obj->bbox.y1); + + /* reset back to normal */ + scene_obj_set_bbox(scn, OBJ_MENU, 50, 400, 50 + 160, 400 + 160); /* render it */ expo_set_scene_id(exp, SCENE1); ut_assertok(expo_render(exp)); + ut_asserteq(0, scn->highlight_id); + ut_assertok(scene_arrange(scn)); + ut_asserteq(0, scn->highlight_id); + + scene_set_highlight_id(scn, OBJ_MENU); + ut_assertok(scene_arrange(scn)); + ut_asserteq(OBJ_MENU, scn->highlight_id); + ut_assertok(expo_render(exp)); + + ut_asserteq(19704, video_compress_fb(uts, dev, false)); + /* move down */ ut_assertok(expo_send_key(exp, BKEY_DOWN)); @@ -595,7 +680,31 @@ static int expo_render_image(struct unit_test_state *uts) ut_asserteq(EXPOACT_POINT_ITEM, act.type); ut_asserteq(ITEM2, act.select.id); + ut_assertok(scene_menu_select_item(scn, OBJ_MENU, act.select.id)); + ut_asserteq(ITEM2, scene_menu_get_cur_item(scn, OBJ_MENU)); + ut_assertok(scene_arrange(scn)); + ut_assertok(expo_render(exp)); + ut_asserteq(19673, video_compress_fb(uts, dev, false)); + ut_assertok(video_check_copy_fb(uts, dev)); + + /* hide the text editor since the following tets don't need it */ + scene_obj_set_hide(scn, OBJ_TEXTED, true); + + /* do some alignment checks */ + ut_assertok(scene_obj_set_halign(scn, OBJ_TEXT3, SCENEOA_CENTRE)); + ut_assertok(expo_render(exp)); + ut_asserteq(16368, video_compress_fb(uts, dev, false)); + ut_assertok(scene_obj_set_halign(scn, OBJ_TEXT3, SCENEOA_RIGHT)); + ut_assertok(expo_render(exp)); + ut_asserteq(16321, video_compress_fb(uts, dev, false)); + + ut_assertok(scene_obj_set_halign(scn, OBJ_TEXT3, SCENEOA_LEFT)); + ut_assertok(scene_obj_set_valign(scn, OBJ_TEXT3, SCENEOA_CENTRE)); + ut_assertok(expo_render(exp)); + ut_asserteq(18763, video_compress_fb(uts, dev, false)); + ut_assertok(scene_obj_set_valign(scn, OBJ_TEXT3, SCENEOA_BOTTOM)); ut_assertok(expo_render(exp)); + ut_asserteq(18714, video_compress_fb(uts, dev, false)); /* make sure only the preview for the second item is shown */ obj = scene_obj_find(scn, ITEM1_PREVIEW, SCENEOBJT_NONE); @@ -617,6 +726,12 @@ static int expo_render_image(struct unit_test_state *uts) /* make sure there was no console output */ ut_assert_console_end(); + /* now try with the highlight */ + exp->show_highlight = true; + ut_assertok(scene_arrange(scn)); + ut_assertok(expo_render(exp)); + ut_asserteq(18844, video_compress_fb(uts, dev, false)); + /* now try in text mode */ expo_set_text_mode(exp, true); ut_assertok(expo_render(exp)); @@ -635,6 +750,7 @@ static int expo_render_image(struct unit_test_state *uts) ut_asserteq(EXPOACT_POINT_ITEM, act.type); ut_asserteq(ITEM1, act.select.id); + ut_assertok(scene_menu_select_item(scn, OBJ_MENU, act.select.id)); ut_assertok(expo_render(exp)); ut_assert_nextline("U-Boot : Boot Menu"); @@ -658,6 +774,7 @@ static int expo_test_build(struct unit_test_state *uts) struct scene_obj_menu *menu; struct scene_menitem *item; struct scene_obj_txt *txt; + struct abuf orig, *copy; struct scene_obj *obj; struct scene *scn; struct expo *exp; @@ -678,7 +795,7 @@ static int expo_test_build(struct unit_test_state *uts) ut_assertnonnull(scn); ut_asserteq_str("main", scn->name); ut_asserteq(ID_SCENE1, scn->id); - ut_asserteq(ID_DYNAMIC_START + 1, scn->title_id); + ut_asserteq(ID_DYNAMIC_START, scn->title_id); ut_asserteq(0, scn->highlight_id); /* check the title */ @@ -690,7 +807,8 @@ static int expo_test_build(struct unit_test_state *uts) ut_asserteq(scn->title_id, obj->id); ut_asserteq(SCENEOBJT_TEXT, obj->type); ut_asserteq(0, obj->flags); - ut_asserteq_str("Test Configuration", expo_get_str(exp, txt->str_id)); + ut_asserteq_str("Test Configuration", + expo_get_str(exp, txt->gen.str_id)); /* check the menu */ menu = scene_obj_find(scn, ID_CPU_SPEED, SCENEOBJT_NONE); @@ -702,7 +820,7 @@ static int expo_test_build(struct unit_test_state *uts) ut_asserteq(0, obj->flags); txt = scene_obj_find(scn, menu->title_id, SCENEOBJT_NONE); - ut_asserteq_str("CPU speed", expo_get_str(exp, txt->str_id)); + ut_asserteq_str("CPU speed", expo_get_str(exp, txt->gen.str_id)); ut_asserteq(0, menu->cur_item_id); ut_asserteq(0, menu->pointer_id); @@ -719,11 +837,21 @@ static int expo_test_build(struct unit_test_state *uts) ut_asserteq(0, item->value); txt = scene_obj_find(scn, item->label_id, SCENEOBJT_NONE); - ut_asserteq_str("2 GHz", expo_get_str(exp, txt->str_id)); + ut_asserteq_str("2 GHz", expo_get_str(exp, txt->gen.str_id)); count = list_count_nodes(&menu->item_head); ut_asserteq(3, count); + /* try editing some text */ + ut_assertok(expo_edit_str(exp, txt->gen.str_id, &orig, ©)); + ut_asserteq_str("2 GHz", orig.data); + ut_asserteq_str("2 GHz", copy->data); + + /* change it and check that things look right */ + abuf_printf(copy, "atlantic %d", 123); + ut_asserteq_str("2 GHz", orig.data); + ut_asserteq_str("atlantic 123", copy->data); + expo_destroy(exp); return 0; diff --git a/test/boot/measurement.c b/test/boot/measurement.c index 1d38663fc0f..71f503f1567 100644 --- a/test/boot/measurement.c +++ b/test/boot/measurement.c @@ -7,6 +7,7 @@ */ #include <bootm.h> +#include <env.h> #include <malloc.h> #include <test/test.h> #include <test/ut.h> diff --git a/test/boot/upl.c b/test/boot/upl.c index eec89026fc3..e2dc3d51eda 100644 --- a/test/boot/upl.c +++ b/test/boot/upl.c @@ -7,6 +7,7 @@ */ #include <abuf.h> +#include <env.h> #include <mapmem.h> #include <upl.h> #include <dm/ofnode.h> diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c index c11c181c807..96a8488e172 100644 --- a/test/cmd/fdt.c +++ b/test/cmd/fdt.c @@ -6,6 +6,7 @@ */ #include <console.h> +#include <env.h> #include <fdt_support.h> #include <mapmem.h> #include <asm/global_data.h> diff --git a/test/cmd/hash.c b/test/cmd/hash.c index 296dd762b31..bb96380c351 100644 --- a/test/cmd/hash.c +++ b/test/cmd/hash.c @@ -6,6 +6,7 @@ */ #include <command.h> +#include <env.h> #include <dm.h> #include <dm/test.h> #include <test/test.h> diff --git a/test/cmd/mem_copy.c b/test/cmd/mem_copy.c index 3e904fc4e4b..8e551f18a85 100644 --- a/test/cmd/mem_copy.c +++ b/test/cmd/mem_copy.c @@ -4,6 +4,7 @@ */ #include <command.h> +#include <compiler.h> #include <console.h> #include <mapmem.h> #include <dm/test.h> diff --git a/test/cmd/mem_search.c b/test/cmd/mem_search.c index df8938bdb6c..61de0dfb9a9 100644 --- a/test/cmd/mem_search.c +++ b/test/cmd/mem_search.c @@ -7,6 +7,7 @@ */ #include <console.h> +#include <env.h> #include <mapmem.h> #include <dm/test.h> #include <test/ut.h> diff --git a/test/cmd/setexpr.c b/test/cmd/setexpr.c index 85803eb54b8..93b0c4b68f5 100644 --- a/test/cmd/setexpr.c +++ b/test/cmd/setexpr.c @@ -7,6 +7,7 @@ */ #include <console.h> +#include <env.h> #include <mapmem.h> #include <dm/test.h> #include <test/ut.h> diff --git a/test/common/test_autoboot.c b/test/common/test_autoboot.c index e3050d02c60..5feff57c271 100644 --- a/test/common/test_autoboot.c +++ b/test/common/test_autoboot.c @@ -6,6 +6,7 @@ */ #include <autoboot.h> +#include <env.h> #include <test/common.h> #include <test/test.h> #include <test/ut.h> diff --git a/test/dm/blkmap.c b/test/dm/blkmap.c index a6a0b4d4e20..d04b68b50ae 100644 --- a/test/dm/blkmap.c +++ b/test/dm/blkmap.c @@ -7,6 +7,7 @@ #include <blk.h> #include <blkmap.h> #include <dm.h> +#include <env.h> #include <asm/test.h> #include <dm/test.h> #include <test/test.h> diff --git a/test/dm/button.c b/test/dm/button.c index 3612f308f02..f05f4ca27ce 100644 --- a/test/dm/button.c +++ b/test/dm/button.c @@ -8,6 +8,7 @@ #include <dm.h> #include <adc.h> #include <button.h> +#include <env.h> #include <power/regulator.h> #include <power/sandbox_pmic.h> #include <asm/gpio.h> diff --git a/test/dm/dsa.c b/test/dm/dsa.c index 9a31ae39d95..46e48741fba 100644 --- a/test/dm/dsa.c +++ b/test/dm/dsa.c @@ -3,6 +3,7 @@ * Copyright 2020-2021 NXP */ +#include <env.h> #include <net/dsa.h> #include <dm/test.h> #include <test/ut.h> diff --git a/test/dm/fastboot.c b/test/dm/fastboot.c index 73c43f82924..5b51b6bf9dd 100644 --- a/test/dm/fastboot.c +++ b/test/dm/fastboot.c @@ -4,6 +4,7 @@ */ #include <dm.h> +#include <env.h> #include <fastboot.h> #include <fb_mmc.h> #include <mmc.h> diff --git a/test/dm/part.c b/test/dm/part.c index c5c4b3fdba1..caae23bd4aa 100644 --- a/test/dm/part.c +++ b/test/dm/part.c @@ -4,6 +4,7 @@ */ #include <dm.h> +#include <env.h> #include <mmc.h> #include <part.h> #include <part_efi.h> diff --git a/test/env/fdt.c b/test/env/fdt.c index c495ac7b307..3652563f330 100644 --- a/test/env/fdt.c +++ b/test/env/fdt.c @@ -1,4 +1,5 @@ #include <command.h> +#include <env.h> #include <env_attr.h> #include <test/env.h> #include <test/ut.h> diff --git a/test/hush/dollar.c b/test/hush/dollar.c index 820110799a2..b83a64d091d 100644 --- a/test/hush/dollar.c +++ b/test/hush/dollar.c @@ -5,6 +5,7 @@ */ #include <command.h> +#include <env.h> #include <env_attr.h> #include <test/hush.h> #include <test/ut.h> diff --git a/test/hush/if.c b/test/hush/if.c index 8939b7a6c86..ea615b246a9 100644 --- a/test/hush/if.c +++ b/test/hush/if.c @@ -5,6 +5,7 @@ */ #include <command.h> +#include <env.h> #include <env_attr.h> #include <vsprintf.h> #include <test/hush.h> diff --git a/test/hush/loop.c b/test/hush/loop.c index 7154b9bc0ae..ea72ac773ba 100644 --- a/test/hush/loop.c +++ b/test/hush/loop.c @@ -5,6 +5,7 @@ */ #include <command.h> +#include <env.h> #include <env_attr.h> #include <test/hush.h> #include <test/ut.h> diff --git a/test/lib/Makefile b/test/lib/Makefile index d620510f998..ff4ff63270d 100644 --- a/test/lib/Makefile +++ b/test/lib/Makefile @@ -29,6 +29,7 @@ obj-$(CONFIG_SHA256) += test_sha256_hmac.o obj-$(CONFIG_HKDF_MBEDTLS) += test_sha256_hkdf.o obj-$(CONFIG_GETOPT) += getopt.o obj-$(CONFIG_CRC8) += test_crc8.o +obj-$(CONFIG_REGEX) += slre.o obj-$(CONFIG_UT_LIB_CRYPT) += test_crypt.o obj-$(CONFIG_UT_TIME) += time.o obj-$(CONFIG_$(PHASE_)UT_UNICODE) += unicode.o diff --git a/test/lib/abuf.c b/test/lib/abuf.c index b38690fe1a9..97b128c01c0 100644 --- a/test/lib/abuf.c +++ b/test/lib/abuf.c @@ -419,3 +419,108 @@ static int lib_test_abuf_init(struct unit_test_state *uts) return 0; } LIB_TEST(lib_test_abuf_init, 0); + +/* Test abuf_copy() */ +static int lib_test_abuf_copy(struct unit_test_state *uts) +{ + struct abuf buf, copy; + ulong start; + + start = ut_check_free(); + + abuf_init_set(&buf, test_data, TEST_DATA_LEN); + ut_assert(abuf_copy(&buf, ©)); + ut_asserteq(buf.size, copy.size); + ut_assert(buf.data != copy.data); + ut_assert(copy.alloced); + abuf_uninit(©); + abuf_uninit(&buf); + + /* Check for memory leaks */ + ut_assertok(ut_check_delta(start)); + + return 0; +} +LIB_TEST(lib_test_abuf_copy, 0); + +/* Test abuf_init_size() */ +static int lib_test_abuf_init_size(struct unit_test_state *uts) +{ + struct abuf buf; + ulong start; + + start = ut_check_free(); + + ut_assert(abuf_init_size(&buf, TEST_DATA_LEN)); + ut_assertnonnull(buf.data); + ut_asserteq(TEST_DATA_LEN, buf.size); + ut_asserteq(true, buf.alloced); + abuf_uninit(&buf); + + /* Check for memory leaks */ + ut_assertok(ut_check_delta(start)); + + return 0; +} +LIB_TEST(lib_test_abuf_init_size, 0); + +/* Test abuf_printf() */ +static int lib_test_abuf_printf(struct unit_test_state *uts) +{ + struct abuf buf, fmt; + ulong start; + char *ptr; + + start = ut_check_free(); + + /* start with a fresh buffer */ + abuf_init(&buf); + + /* check handling of out-of-memory condition */ + malloc_enable_testing(0); + ut_asserteq(-ENOMEM, abuf_printf(&buf, "%s", "")); + malloc_enable_testing(1); + + ut_asserteq(0, abuf_printf(&buf, "%s", "")); + ut_asserteq(1, buf.size); + ut_asserteq(true, buf.alloced); + ut_asserteq_str("", buf.data); + + /* check expanding it, initially failing */ + ut_asserteq(-ENOMEM, abuf_printf(&buf, "%s", "testing")); + malloc_disable_testing(); + + ut_asserteq(7, abuf_printf(&buf, "%s", "testing")); + ut_asserteq(8, buf.size); + ut_asserteq_str("testing", buf.data); + + ut_asserteq(11, abuf_printf(&buf, "testing %d", 123)); + ut_asserteq(12, buf.size); + ut_asserteq_str("testing 123", buf.data); + + /* make it smaller; buffer should not shrink */ + ut_asserteq(9, abuf_printf(&buf, "test %d", 456)); + ut_asserteq(12, buf.size); + ut_asserteq_str("test 456", buf.data); + + /* test the maximum size */ + abuf_init(&fmt); + ut_assert(abuf_realloc(&fmt, 4100)); + memset(fmt.data, 'x', 4100); + ptr = fmt.data; + ptr[4096] = '\0'; + + /* we are allowed up to 4K including the terminator */ + ut_asserteq(-E2BIG, abuf_printf(&buf, "%s", ptr)); + ptr[4095] = '\0'; + ut_asserteq(4095, abuf_printf(&buf, "%s", ptr)); + + abuf_uninit(&fmt); + abuf_uninit(&buf); + + /* Check for memory leaks */ + ut_assertok(ut_check_delta(start)); + + return 0; +} +LIB_TEST(lib_test_abuf_printf, 0); diff --git a/test/lib/efi_device_path.c b/test/lib/efi_device_path.c index 5cc001e209e..5a358ddcb93 100644 --- a/test/lib/efi_device_path.c +++ b/test/lib/efi_device_path.c @@ -5,6 +5,7 @@ * Copyright (c) 2020 Heinrich Schuchardt <xypron.glpk@gmx.de> */ +#include <efi_device_path.h> #include <efi_loader.h> #include <test/lib.h> #include <test/test.h> diff --git a/test/lib/slre.c b/test/lib/slre.c new file mode 100644 index 00000000000..ff2386d614a --- /dev/null +++ b/test/lib/slre.c @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT + +#include <test/lib.h> +#include <test/ut.h> +#include <slre.h> + +struct re_test { + const char *str; + const char *re; + int match; +}; + +static const struct re_test re_test[] = { + { "123", "^\\d+$", 1}, + { "x23", "^\\d+$", 0}, + { "banana", "^([bn]a)*$", 1}, + { "panama", "^([bn]a)*$", 0}, + { "xby", "^a|b", 1}, + { "xby", "b|^a", 1}, + { "xby", "b|c$", 1}, + { "xby", "c$|b", 1}, + { "", "x*$", 1}, + { "", "^x*$", 1}, + { "yy", "x*$", 1}, + { "yy", "^x*$", 0}, + { "Gadsby", "^[^eE]*$", 1}, + { "Ernest", "^[^eE]*$", 0}, + { "6d41f0a39d6", "^[0123456789abcdef]*$", 1 }, + /* DIGIT is 17 */ + { "##\x11%%\x11", "^[#%\\d]*$", 0 }, + { "##23%%45", "^[#%\\d]*$", 1 }, + { "U-Boot", "^[B-Uo-t]*$", 0 }, + { "U-Boot", "^[A-Zm-v-]*$", 1 }, + { "U-Boot", "^[-A-Za-z]*$", 1 }, + /* The range --C covers both - and B. */ + { "U-Boot", "^[--CUot]*$", 1 }, + { "U-Boot", "^[^0-9]*$", 1 }, + { "U-Boot", "^[^0-9<->]*$", 1 }, + { "U-Boot", "^[^0-9<\\->]*$", 0 }, + {} +}; + +static int lib_slre(struct unit_test_state *uts) +{ + const struct re_test *t; + + for (t = re_test; t->str; t++) { + struct slre slre; + + ut_assert(slre_compile(&slre, t->re)); + ut_assertf(!!slre_match(&slre, t->str, strlen(t->str), NULL) == t->match, + "'%s' unexpectedly %s '%s'\n", t->str, + t->match ? "didn't match" : "matched", t->re); + } + + return 0; +} +LIB_TEST(lib_slre, 0); diff --git a/test/py/conftest.py b/test/py/conftest.py index 5aea85647af..6c3ac67979a 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -711,9 +711,13 @@ def setup_buildconfigspec(item): """ for options in item.iter_markers('buildconfigspec'): - option = options.args[0] - if not ubconfig.buildconfig.get('config_' + option.lower(), None): - pytest.skip('.config feature "%s" not enabled' % option.lower()) + nomatch = True + for arg in options.args: + if ubconfig.buildconfig.get('config_' + arg.lower(), None): + nomatch = False + if nomatch: + argsString = ', '.join(options.args) + pytest.skip(f'.config features "{argsString}" not enabled') for options in item.iter_markers('notbuildconfigspec'): option = options.args[0] if ubconfig.buildconfig.get('config_' + option.lower(), None): diff --git a/test/py/tests/test_efi_loader.py b/test/py/tests/test_efi_loader.py index 91f151d09cd..dc58c0d4dbd 100644 --- a/test/py/tests/test_efi_loader.py +++ b/test/py/tests/test_efi_loader.py @@ -98,7 +98,7 @@ def test_efi_setup_dhcp(ubman): global net_set_up net_set_up = True -@pytest.mark.buildconfigspec('net') +@pytest.mark.buildconfigspec('net', 'net_lwip') def test_efi_setup_static(ubman): """Set up the network using a static IP configuration. diff --git a/test/py/tests/test_fpga.py b/test/py/tests/test_fpga.py index 74cd42b910e..299a8653f74 100644 --- a/test/py/tests/test_fpga.py +++ b/test/py/tests/test_fpga.py @@ -506,7 +506,7 @@ def test_fpga_loadfs(ubman): @pytest.mark.buildconfigspec('cmd_fpga_load_secure') @pytest.mark.buildconfigspec('cmd_net') @pytest.mark.buildconfigspec('cmd_dhcp') -@pytest.mark.buildconfigspec('net') +@pytest.mark.buildconfigspec('net', 'net_lwip') def test_fpga_secure_bit_auth(ubman): test_net.test_net_dhcp(ubman) @@ -534,7 +534,7 @@ def test_fpga_secure_bit_auth(ubman): @pytest.mark.buildconfigspec('cmd_fpga_load_secure') @pytest.mark.buildconfigspec('cmd_net') @pytest.mark.buildconfigspec('cmd_dhcp') -@pytest.mark.buildconfigspec('net') +@pytest.mark.buildconfigspec('net', 'net_lwip') def test_fpga_secure_bit_img_auth_kup(ubman): test_net.test_net_dhcp(ubman) diff --git a/test/py/tests/test_net.py b/test/py/tests/test_net.py index 27cdd73fd49..6ef02e53389 100644 --- a/test/py/tests/test_net.py +++ b/test/py/tests/test_net.py @@ -201,7 +201,7 @@ def test_net_dhcp6(ubman): global net6_set_up net6_set_up = True -@pytest.mark.buildconfigspec('net') +@pytest.mark.buildconfigspec('net', 'net_lwip') def test_net_setup_static(ubman): """Set up a static IP configuration. |