From 46593baa8941a05e8871baac4528bcfbf249570c Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Thu, 8 Dec 2022 20:04:37 +0200 Subject: 15243 test-runner: tell us when there was no tests to run Reviewed by: Andrew Stormont Reviewed by: Andy Fiddaman Approved by: Dan McDonald --- usr/src/test/test-runner/cmd/run | 1 + 1 file changed, 1 insertion(+) diff --git a/usr/src/test/test-runner/cmd/run b/usr/src/test/test-runner/cmd/run index 21da73daff..8399c3203a 100644 --- a/usr/src/test/test-runner/cmd/run +++ b/usr/src/test/test-runner/cmd/run @@ -834,6 +834,7 @@ class TestRun(object): def summary(self): if Result.total == 0: + print('No tests to run') return print('\nResults Summary') -- cgit v1.2.3 From 4e320a8a375380e6f3963134cd6c1001e2bdb7fa Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Fri, 9 Dec 2022 09:53:02 +0200 Subject: 15245 zfs_clone_010_pos: fix python statement Reviewed by: Marcel Telka Reviewed by: Andy Fiddaman Approved by: Dan McDonald --- .../zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_010_pos.ksh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/src/test/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_010_pos.ksh b/usr/src/test/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_010_pos.ksh index cd471999e0..cd364bb957 100644 --- a/usr/src/test/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_010_pos.ksh +++ b/usr/src/test/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_010_pos.ksh @@ -220,7 +220,7 @@ fs=$TESTPOOL/$TESTFS1 log_must zfs create $fs log_must zfs snapshot $fs@snap while((i < 7)); do - log_must zfs clone $fs@snap $fs/$TESTCLONE$(python -c 'print "x" * 200').$i + log_must zfs clone $fs@snap $fs/$TESTCLONE$(printf %0.sx {1..200}).$i ((i=i+1)) ((j=j+200)) done -- cgit v1.2.3 From 9e3aeadeb229d472ee0ae8425dc913dfe7e81ea2 Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Wed, 7 Dec 2022 11:43:06 +0000 Subject: 15238 prom_reboot/panic should be machdep Reviewed by: Igor Kozhukhov Reviewed by: Keith M Wesolowski Reviewed by: Toomas Soome Approved by: Dan McDonald --- usr/src/uts/i86pc/Makefile.files | 2 ++ usr/src/uts/i86pc/Makefile.rules | 5 ++++ usr/src/uts/i86pc/promif/prom_panic.c | 51 ++++++++++++++++++++++++++++++++++ usr/src/uts/i86pc/promif/prom_reboot.c | 45 ++++++++++++++++++++++++++++++ usr/src/uts/i86xpv/Makefile.files | 3 ++ usr/src/uts/i86xpv/Makefile.rules | 4 +++ usr/src/uts/intel/Makefile.files | 2 -- usr/src/uts/intel/promif/prom_panic.c | 51 ---------------------------------- usr/src/uts/intel/promif/prom_reboot.c | 47 ------------------------------- 9 files changed, 110 insertions(+), 100 deletions(-) create mode 100644 usr/src/uts/i86pc/promif/prom_panic.c create mode 100644 usr/src/uts/i86pc/promif/prom_reboot.c delete mode 100644 usr/src/uts/intel/promif/prom_panic.c delete mode 100644 usr/src/uts/intel/promif/prom_reboot.c diff --git a/usr/src/uts/i86pc/Makefile.files b/usr/src/uts/i86pc/Makefile.files index 064cda8548..11f6af52ee 100644 --- a/usr/src/uts/i86pc/Makefile.files +++ b/usr/src/uts/i86pc/Makefile.files @@ -113,6 +113,8 @@ CORE_OBJS += \ pci_orion.o \ pmem.o \ ppage.o \ + prom_panic.o \ + prom_reboot.o \ pwrnow.o \ speedstep.o \ ssp.o \ diff --git a/usr/src/uts/i86pc/Makefile.rules b/usr/src/uts/i86pc/Makefile.rules index 9fe73c00f5..af57055292 100644 --- a/usr/src/uts/i86pc/Makefile.rules +++ b/usr/src/uts/i86pc/Makefile.rules @@ -24,6 +24,7 @@ # Copyright 2015 Igor Kozhukhov # Copyright 2019 Joyent, Inc. # Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2022 Oxide Computer Company # # This Makefile defines the build rules for the directory uts/i86pc @@ -173,6 +174,10 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/os/cpupm/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) +$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/promif/%.c + $(COMPILE.c) -o $@ $< + $(CTFCONVERT_O) + $(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/boot/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) diff --git a/usr/src/uts/i86pc/promif/prom_panic.c b/usr/src/uts/i86pc/promif/prom_panic.c new file mode 100644 index 0000000000..181d13bead --- /dev/null +++ b/usr/src/uts/i86pc/promif/prom_panic.c @@ -0,0 +1,51 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#include +#include +#include +#include +#include + +void +prom_panic(char *s) +{ + const char fmt[] = "%s: prom_panic: %s\n"; + + if (s == NULL) + s = "unknown panic"; + +#if defined(_KMDB) + prom_printf(fmt, "kmdb", s); +#elif defined(_KERNEL) + prom_printf(fmt, "kernel", s); + if (boothowto & RB_DEBUG) + kmdb_enter(); +#else +#error "configuration error" +#endif + prom_reboot_prompt(); + prom_reboot(NULL); +} diff --git a/usr/src/uts/i86pc/promif/prom_reboot.c b/usr/src/uts/i86pc/promif/prom_reboot.c new file mode 100644 index 0000000000..be651c2783 --- /dev/null +++ b/usr/src/uts/i86pc/promif/prom_reboot.c @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#include +#include +#include +#include + +void +prom_reboot_prompt(void) +{ + prom_printf("Press any key to reboot.\n"); + (void) prom_getchar(); + prom_printf("Resetting...\n"); +} + +/*ARGSUSED*/ +void +prom_reboot(char *bootstr) +{ + reset(); +} diff --git a/usr/src/uts/i86xpv/Makefile.files b/usr/src/uts/i86xpv/Makefile.files index 5c9acfabed..40d22b6029 100644 --- a/usr/src/uts/i86xpv/Makefile.files +++ b/usr/src/uts/i86xpv/Makefile.files @@ -23,6 +23,7 @@ # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. # # Copyright 2019 Joyent, Inc. +# Copyright 2022 Oxide Computer Company # # This Makefile defines file modules in the directory uts/i86xpv @@ -95,6 +96,8 @@ CORE_OBJS += \ pci_orion.o \ pmem.o \ ppage.o \ + prom_reboot.o \ + prom_panic.o \ startup.o \ ssp.o \ xpv_timestamp.o \ diff --git a/usr/src/uts/i86xpv/Makefile.rules b/usr/src/uts/i86xpv/Makefile.rules index dfabbd6897..85d91a3a87 100644 --- a/usr/src/uts/i86xpv/Makefile.rules +++ b/usr/src/uts/i86xpv/Makefile.rules @@ -90,6 +90,10 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/i86xpv/vm/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) +$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/promif/%.c + $(COMPILE.c) -o $@ $< + $(CTFCONVERT_O) + $(OBJS_DIR)/%.o: $(UTSBASE)/i86xpv/boot/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) diff --git a/usr/src/uts/intel/Makefile.files b/usr/src/uts/intel/Makefile.files index 4336f77a23..20d5e89ec9 100644 --- a/usr/src/uts/intel/Makefile.files +++ b/usr/src/uts/intel/Makefile.files @@ -74,7 +74,6 @@ GENUNIX_OBJS += \ lwp_private.o \ prom_enter.o \ prom_exit.o \ - prom_panic.o \ sendsig.o \ syscall.o @@ -91,7 +90,6 @@ GENUNIX_OBJS += \ prom_printf.o \ prom_prop.o \ prom_putchar.o \ - prom_reboot.o \ prom_version.o # diff --git a/usr/src/uts/intel/promif/prom_panic.c b/usr/src/uts/intel/promif/prom_panic.c deleted file mode 100644 index 181d13bead..0000000000 --- a/usr/src/uts/intel/promif/prom_panic.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include -#include -#include -#include -#include - -void -prom_panic(char *s) -{ - const char fmt[] = "%s: prom_panic: %s\n"; - - if (s == NULL) - s = "unknown panic"; - -#if defined(_KMDB) - prom_printf(fmt, "kmdb", s); -#elif defined(_KERNEL) - prom_printf(fmt, "kernel", s); - if (boothowto & RB_DEBUG) - kmdb_enter(); -#else -#error "configuration error" -#endif - prom_reboot_prompt(); - prom_reboot(NULL); -} diff --git a/usr/src/uts/intel/promif/prom_reboot.c b/usr/src/uts/intel/promif/prom_reboot.c deleted file mode 100644 index be7de23a23..0000000000 --- a/usr/src/uts/intel/promif/prom_reboot.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include -#include -#include -#include - -void -prom_reboot_prompt(void) -{ - prom_printf("Press any key to reboot.\n"); - (void) prom_getchar(); - prom_printf("Resetting...\n"); -} - -/*ARGSUSED*/ -void -prom_reboot(char *bootstr) -{ - reset(); -} -- cgit v1.2.3 From 8b4261085e0d677be9a3253ff6b4c290e402576d Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Thu, 8 Dec 2022 20:25:58 +0200 Subject: 15244 zfs-tests: zfstest should accept multiple -c options Reviewed by: Andrew Stormont Reviewed by: Andy Fiddaman Approved by: Dan McDonald --- usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh b/usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh index 93325a63c0..3d53ef5fae 100644 --- a/usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh +++ b/usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh @@ -140,8 +140,13 @@ while getopts ac:l:qT: c; do auto_detect=true ;; 'c') - runfiles=$OPTARG - [[ -f $runfiles ]] || fail "Cannot read file: $runfiles" + runfile=$OPTARG + [[ -f $runfile ]] || fail "Cannot read file: $runfile" + if [[ -z $runfiles ]]; then + runfiles=$runfile + else + runfiles+=",$runfile" + fi ;; 'l') logfile=$OPTARG -- cgit v1.2.3