lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 9 Aug 2021 16:59:53 +0200 From: Christoph Hellwig <hch@....de> To: Bart Van Assche <bvanassche@....org> Cc: Christoph Hellwig <hch@....de>, Joel Becker <jlbec@...lplan.org>, linux-kernel@...r.kernel.org, Bodo Stroesser <bostroesser@...il.com>, "Martin K . Petersen" <martin.petersen@...cle.com>, Brendan Higgins <brendanhiggins@...gle.com>, Yanko Kaneti <yaneti@...lera.com> Subject: Re: [PATCH v4 3/3] configfs: Add unit tests > text and binary attribute support. This is how I run these tests: > > set -e > if [ -e .config ]; then > make ARCH=um mrproper > fi > if [ ! -e .kunit/.kunitconfig ]; then > cat <<EOF >.kunit/.kunitconfig > CONFIG_CONFIGFS_FS=y > CONFIG_CONFIGFS_KUNIT_TEST=y > CONFIG_KUNIT=y > CONFIG_PROVE_LOCKING=y > CONFIG_SYSFS=y > CONFIG_UBSAN=y > EOF > cp .kunit/.kunitconfig .kunit/.config > fi > ./tools/testing/kunit/kunit.py run This is very useful documentation, but shouldn't it go into a README.kunit or similar instead of a commit message? > +config CONFIGFS_KUNIT_TEST > + bool "Configfs Kunit test" if !KUNIT_ALL_TESTS > + depends on CONFIGFS_FS && KUNIT=y > + default KUNIT_ALL_TESTS Why does it depend on KUNIT=y? What is the issue with a modular KUNIT build? > +static int mkdir(const char *name, umode_t mode) > +{ > + struct dentry *dentry; > + struct path path; > + int err; > + > + err = get_file_mode(name); > + if (err >= 0 && S_ISDIR(err)) > + return 0; > + > + dentry = kern_path_create(AT_FDCWD, name, &path, LOOKUP_DIRECTORY); > + if (IS_ERR(dentry)) > + return PTR_ERR(dentry); > + > + err = vfs_mkdir(&init_user_ns, d_inode(path.dentry), dentry, mode); > + done_path_create(&path, dentry); To me this sounds like userspace would be a better place for these kinds of tests.
Powered by blists - more mailing lists