diff mbox series

[2/2] tests/hwsim: include UML defconfig

Message ID 20200325194544.15811-2-thomas@adapt-ip.com
State Superseded
Headers show
Series [1/2] tests/hwsim: convert kernel-config to defconfig | expand

Commit Message

Thomas Pedersen March 25, 2020, 7:45 p.m. UTC
Include a defconfig for building kernel as UML. Also
update the README with a few notes related to UML.

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
---
 tests/hwsim/vm/README            |  24 ++++--
 tests/hwsim/vm/kernel-config.uml | 124 +++++++++++++++++++++++++++++++
 2 files changed, 143 insertions(+), 5 deletions(-)
 create mode 100644 tests/hwsim/vm/kernel-config.uml

Comments

Johannes Berg March 25, 2020, 9:13 p.m. UTC | #1
On Wed, 2020-03-25 at 12:45 -0700, Thomas Pedersen wrote:
> Include a defconfig for building kernel as UML. Also
> update the README with a few notes related to UML.

Ohh, great, thank you! I kept forgetting this :)

> +++ b/tests/hwsim/vm/kernel-config.uml

That looks pretty good, but perhaps add

CONFIG_MACSEC=y

to support those tests, and

CONFIG_FTRACE=y

to make the trace-cmd stuff work? I think, actually not 100% sure what's
needed to make that work ...

Thanks!

johannes
Thomas Pedersen March 26, 2020, 4:57 p.m. UTC | #2
On 3/25/20 2:13 PM, Johannes Berg wrote:
> On Wed, 2020-03-25 at 12:45 -0700, Thomas Pedersen wrote:
>> Include a defconfig for building kernel as UML. Also
>> update the README with a few notes related to UML.
> 
> Ohh, great, thank you! I kept forgetting this :)
> 
>> +++ b/tests/hwsim/vm/kernel-config.uml
> 
> That looks pretty good, but perhaps add
> 
> CONFIG_MACSEC=y

I started down the path of adding macsec support, but gave up after a
while. Will give it another go.
 
> to support those tests, and
> 
> CONFIG_FTRACE=y
> 
> to make the trace-cmd stuff work? I think, actually not 100% sure what's
> needed to make that work ...

Yes it would be helpful to have that working by default.

> Thanks!
> 
> johannes
> 
> 
> _______________________________________________
> Hostap mailing list
> Hostap@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/hostap
>
Jouni Malinen March 27, 2020, 5:58 p.m. UTC | #3
On Thu, Mar 26, 2020 at 09:57:04AM -0700, Thomas Pedersen wrote:
> On 3/25/20 2:13 PM, Johannes Berg wrote:
> > That looks pretty good, but perhaps add
> > 
> > CONFIG_MACSEC=y
> 
> I started down the path of adding macsec support, but gave up after a
> while. Will give it another go.

I'm attaching the kernel .config that I'm using and that has support for
all the test cases.

> > to support those tests, and
> > 
> > CONFIG_FTRACE=y
> > 
> > to make the trace-cmd stuff work? I think, actually not 100% sure what's
> > needed to make that work ...
> 
> Yes it would be helpful to have that working by default.

That's included in the attached version as well.
Thomas Pedersen March 27, 2020, 7:11 p.m. UTC | #4
On 3/27/20 10:58 AM, Jouni Malinen wrote:
> On Thu, Mar 26, 2020 at 09:57:04AM -0700, Thomas Pedersen wrote:
>> On 3/25/20 2:13 PM, Johannes Berg wrote:
>>> That looks pretty good, but perhaps add
>>>
>>> CONFIG_MACSEC=y
>>
>> I started down the path of adding macsec support, but gave up after a
>> while. Will give it another go.
> 
> I'm attaching the kernel .config that I'm using and that has support for
> all the test cases.
> 
>>> to support those tests, and
>>>
>>> CONFIG_FTRACE=y
>>>
>>> to make the trace-cmd stuff work? I think, actually not 100% sure what's
>>> needed to make that work ...
>>
>> Yes it would be helpful to have that working by default.
> 
> That's included in the attached version as well.

Thanks!
diff mbox series

Patch

diff --git a/tests/hwsim/vm/README b/tests/hwsim/vm/README
index 4cea85b982cd..224d65a26109 100644
--- a/tests/hwsim/vm/README
+++ b/tests/hwsim/vm/README
@@ -1,9 +1,23 @@ 
-These scripts allow you to run the hwsim tests inside a KVM virtual machine.
+These scripts allow you to run the hwsim tests inside a KVM virtual machine or
+as a UML (User Mode Linux) program.
 
-To set it up, first compile a kernel with the kernel-config file as the
-.config. You can adjust it as needed, the configuration is for a 64-bit
-x86 system and should be close to minimal. The architecture must be the
-same as your host since the host's filesystem is used.
+To set it up, first compile a kernel with the kernel-config[.uml] file as the
+.config. You can adjust it as needed, the configuration is for a 64-bit x86
+system and should be close to minimal. The architecture must be the same as
+your host since the host's filesystem is used.
+
+To build the regular x86_64 kernel, simply issue
+
+yes "" | make -j <n_cpus>
+
+or to build UML:
+
+yes "" | ARCH=um make -j <n_cpus>
+
+Running a UML kernel is recommended as it can optimize out any sleep()s or
+kernel timers by taking advantage of UML time travel mode, greatly increasing
+test efficiency (~3200 tests can be run in under 5 minutes using parallel-vm.py
+on a 24 core CPU).
 
 Install the required tools: at least 'kvm', if you want tracing trace-cmd,
 valgrind if you want, etc.
diff --git a/tests/hwsim/vm/kernel-config.uml b/tests/hwsim/vm/kernel-config.uml
new file mode 100644
index 000000000000..c4ae4d524263
--- /dev/null
+++ b/tests/hwsim/vm/kernel-config.uml
@@ -0,0 +1,124 @@ 
+# CONFIG_LOCALVERSION_AUTO is not set
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+# CONFIG_CROSS_MEMORY_ATTACH is not set
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_XACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
+CONFIG_LOG_BUF_SHIFT=21
+CONFIG_SGETMASK_SYSCALL=y
+# CONFIG_FHANDLE is not set
+CONFIG_EMBEDDED=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_MCORE2=y
+CONFIG_HOSTFS=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_SECCOMP is not set
+CONFIG_UML_TIME_TRAVEL_SUPPORT=y
+CONFIG_SSL=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_MAC_PARTITION=y
+# CONFIG_COMPACTION is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+# CONFIG_INET_DIAG is not set
+CONFIG_NETFILTER=y
+CONFIG_BRIDGE_NETFILTER=y
+CONFIG_NF_TABLES=y
+CONFIG_NETFILTER_XTABLES=y
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
+CONFIG_NF_TABLES_BRIDGE=y
+CONFIG_BRIDGE_NF_EBTABLES=y
+CONFIG_BRIDGE_EBT_T_FILTER=y
+CONFIG_BRIDGE_EBT_ARP=y
+CONFIG_BRIDGE_EBT_IP=y
+CONFIG_BRIDGE_EBT_IP6=y
+CONFIG_BRIDGE_EBT_PKTTYPE=y
+CONFIG_BRIDGE_EBT_ARPREPLY=y
+CONFIG_BRIDGE=y
+CONFIG_VLAN_8021Q=y
+CONFIG_CFG80211=y
+CONFIG_CFG80211_DEVELOPER_WARNINGS=y
+CONFIG_CFG80211_DEBUGFS=y
+CONFIG_CFG80211_WEXT=y
+CONFIG_MAC80211=y
+CONFIG_MAC80211_MESH=y
+CONFIG_MAC80211_DEBUGFS=y
+CONFIG_MAC80211_MESSAGE_TRACING=y
+CONFIG_MAC80211_DEBUG_MENU=y
+CONFIG_MAC80211_NOINLINE=y
+CONFIG_MAC80211_VERBOSE_DEBUG=y
+CONFIG_MAC80211_MLME_DEBUG=y
+CONFIG_MAC80211_STA_DEBUG=y
+CONFIG_MAC80211_HT_DEBUG=y
+CONFIG_MAC80211_IBSS_DEBUG=y
+CONFIG_MAC80211_PS_DEBUG=y
+CONFIG_MAC80211_TDLS_DEBUG=y
+CONFIG_RFKILL=y
+CONFIG_NET_9P=y
+CONFIG_UEVENT_HELPER=y
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+# CONFIG_BLK_DEV is not set
+CONFIG_DUMMY=y
+# CONFIG_ETHERNET is not set
+CONFIG_MAC80211_HWSIM=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_HW_RANDOM is not set
+CONFIG_POWER_SUPPLY=y
+CONFIG_THERMAL=y
+CONFIG_VIRT_DRIVERS=y
+CONFIG_MAILBOX=y
+# CONFIG_IOMMU_SUPPORT is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_INOTIFY_USER is not set
+CONFIG_ISO9660_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_CONFIGFS_FS=y
+# CONFIG_MISC_FILESYSTEMS is not set
+CONFIG_9P_FS=y
+CONFIG_9P_FS_POSIX_ACL=y
+CONFIG_NLS=y
+CONFIG_CRYPTO_ECHAINIV=y
+CONFIG_CRYPTO_CRCT10DIF=y
+CONFIG_CRYPTO_ARC4=y
+# CONFIG_CRYPTO_HW is not set
+CONFIG_PRINTK_TIME=y
+CONFIG_DYNAMIC_DEBUG=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_INFO_REDUCED=y
+CONFIG_FRAME_WARN=1024
+CONFIG_DEBUG_SECTION_MISMATCH=y
+CONFIG_PAGE_EXTENSION=y
+CONFIG_DEBUG_PAGEALLOC=y
+CONFIG_DEBUG_OBJECTS=y
+CONFIG_DEBUG_OBJECTS_SELFTEST=y
+CONFIG_DEBUG_OBJECTS_FREE=y
+CONFIG_DEBUG_OBJECTS_TIMERS=y
+CONFIG_DEBUG_OBJECTS_WORK=y
+CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
+CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
+CONFIG_SLUB_DEBUG_ON=y
+CONFIG_DEBUG_KMEMLEAK=y
+CONFIG_DEBUG_STACK_USAGE=y
+CONFIG_PANIC_ON_OOPS=y
+CONFIG_SOFTLOCKUP_DETECTOR=y
+CONFIG_PROVE_LOCKING=y
+CONFIG_LOCK_STAT=y
+CONFIG_DEBUG_LOCKDEP=y
+CONFIG_DEBUG_KOBJECT=y
+CONFIG_DEBUG_LIST=y
+CONFIG_DEBUG_NOTIFIERS=y
+CONFIG_LATENCYTOP=y