* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include <dirent.h>
#include <sys/types.h>
#include <sys/utsname.h>
-#include <libkmod.h>
+#include <shared/util.h>
+
+#include <libkmod/libkmod.h>
#include "testsuite.h"
if (err < 0)
exit(EXIT_FAILURE);
- if (strcmp(u.release, TEST_UNAME) != 0) {
+ if (!streq(u.release, TEST_UNAME)) {
char *ldpreload = getenv("LD_PRELOAD");
ERR("u.release=%s should be %s\n", u.release, TEST_UNAME);
ERR("LD_PRELOAD=%s\n", ldpreload);
if (n != 1)
return EXIT_FAILURE;
- if (strcmp(s, "kmod-test-chroot-works") != 0)
+ if (!streq(s, "kmod-test-chroot-works"))
return EXIT_FAILURE;
return EXIT_SUCCESS;
buf[done] = '\0';
- if (strcmp(buf, "kmod-test-chroot-works\n") != 0)
+ if (!streq(buf, "kmod-test-chroot-works\n"))
return EXIT_FAILURE;
return EXIT_SUCCESS;
},
.need_spawn = true);
-static const struct test *tests[] = {
- &stestsuite_uname,
- &stestsuite_rootfs_fopen,
- &stestsuite_rootfs_open,
- &stestsuite_rootfs_stat_access,
- &stestsuite_rootfs_opendir,
- NULL,
-};
-
-TESTSUITE_MAIN(tests);
+TESTSUITE_MAIN();