generic: posix acl extended attribute memory corruption test
[xfstests-dev.git] / src / Makefile
index 4b08f6e9309cee24dc3f42329a5f3342024a4bb9..ae09eb0a1d4efec5edd838d14f121596f6868e51 100644 (file)
@@ -1,33 +1,6 @@
-# 
-# Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
-# 
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of version 2 of the GNU General Public License as
-# published by the Free Software Foundation.
-# 
-# This program is distributed in the hope that it would be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# 
-# Further, this software is distributed without any warranty that it is
-# free of the rightful claim of any third person regarding infringement
-# or the like.  Any license provided herein, whether implied or
-# otherwise, applies only to this software file.  Patent licenses, if
-# any, provided herein do not apply to combinations of this program with
-# other software, or any other product whatsoever.
-# 
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston MA 02111-1307, USA.
-# 
-# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
-# Mountain View, CA  94043, or:
-# 
-# http://www.sgi.com 
-# 
-# For further information regarding this notice, see: 
-# 
-# http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
+# SPDX-License-Identifier: GPL-2.0
+#
+# Copyright (c) 2000-2005 Silicon Graphics, Inc.  All Rights Reserved.
 #
 
 TOPDIR = ..
@@ -36,9 +9,45 @@ include $(TOPDIR)/include/builddefs
 TARGETS = dirstress fill fill2 getpagesize holes lstat64 \
        nametest permname randholes runas truncfile usemem \
        mmapcat append_reader append_writer dirperf metaperf \
-       devzero feature alloc fault fstest t_access_root  
+       devzero feature alloc fault fstest t_access_root \
+       godown resvtest writemod writev_on_pagefault makeextents itrash rename \
+       multi_open_unlink dmiperf unwritten_sync genhashnames t_holes \
+       t_mmap_writev t_truncate_cmtime dirhash_collide t_rename_overwrite \
+       holetest t_truncate_self t_mmap_dio af_unix t_mmap_stale_pmd \
+       t_mmap_cow_race t_mmap_fallocate fsync-err t_mmap_write_ro \
+       t_ext4_dax_journal_corruption t_ext4_dax_inline_corruption \
+       t_ofd_locks t_locks_execve t_mmap_collision
+
+LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \
+       preallo_rw_pattern_writer ftrunc trunc fs_perms testx looptest \
+       locktest unwritten_mmap bulkstat_unlink_test \
+       bulkstat_unlink_test_modified t_dir_offset t_futimens t_immutable \
+       stale_handle pwrite_mmap_blocked t_dir_offset2 seek_sanity_test \
+       seek_copy_test t_readdir_1 t_readdir_2 fsync-tester nsexec cloner \
+       renameat2 t_getcwd e4compact test-nextquota punch-alternating \
+       attr-list-by-handle-cursor-test listxattr dio-interleaved t_dir_type \
+       dio-invalidate-cache stat_test t_encrypted_d_revalidate \
+       attr_replace_test swapon mkswap t_attr_corruption
+
+SUBDIRS = log-writes perf
+
+LLDLIBS = $(LIBATTR) $(LIBHANDLE) $(LIBACL) -lpthread
+
+ifeq ($(HAVE_XLOG_ASSIGN_LSN), true)
+LINUX_TARGETS += loggen
+endif
 
-LINUX_TARGETS = loggen xfsctl resvtest godown bstat t_mtab
+ifeq ($(HAVE_FIEMAP), true)
+LINUX_TARGETS += fiemap-tester t_stripealign
+endif
+
+ifeq ($(HAVE_OPEN_BY_HANDLE_AT), true)
+LINUX_TARGETS += open_by_handle
+endif
+
+ifeq ($(HAVE_FALLOCATE), true)
+LCFLAGS += -DHAVE_FALLOCATE
+endif
 
 ifeq ($(PKG_PLATFORM),linux)
 TARGETS += $(LINUX_TARGETS)
@@ -46,58 +55,41 @@ endif
 
 ifeq ($(HAVE_DB), true)
 TARGETS += dbtest
+LLDLIBS += $(LIBGDBM)
 endif
 
-ifeq ($(PKG_PLATFORM),linux)
-TARGETS += t_immutable
+ifeq ($(HAVE_AIO), true)
+SUBDIRS += aio-dio-regress
+LLDLIBS += -laio
 endif
 
 CFILES = $(TARGETS:=.c)
-LDIRT = $(TARGETS)
-
-default: $(TARGETS)
+LDIRT = $(TARGETS) fssum
 
-include $(BUILDRULES)
-LINKTEST = $(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS)
-
-randholes: randholes.o $(LIBTEST)
-       $(LINKTEST) $(LIBTEST) $(LDLIBS)
-
-truncfile: truncfile.o $(LIBTEST)
-       $(LINKTEST) $(LIBTEST) $(LDLIBS)
-
-dbtest:        dbtest.o $(LIBTEST)
-       $(LINKTEST) $(LIBTEST) $(LIBGDBM) $(LDLIBS)
 
-nametest: nametest.o $(LIBTEST)
-       $(LINKTEST) $(LIBTEST) $(LDLIBS)
+default: depend $(LDIRT) $(SUBDIRS)
 
-bstat: bstat.o $(LIBHANDLE)
-       $(LINKTEST) $(LIBHANDLE) $(LDLIBS)
+depend: .dep
 
-t_immutable: t_immutable.o $(LIBHANDLE) $(LIBACL)
-       $(LINKTEST) $(LIBACL) $(LIBHANDLE) $(LDLIBS)
-
-loggen:        loggen.o
-       $(LINKTEST) $(LDLIBS)
-
-fstest:        fstest.o
-       $(LINKTEST)
+include $(BUILDRULES)
 
-resvtest: resvtest.o
-       $(LINKTEST)
+fssum: fssum.c md5.c
+       @echo "    [CC]    $@"
+       $(Q)$(LTLINK) fssum.c md5.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS)
 
-#scaleread: scaleread.o $(LDLIBS)
-#      $(LINKTEST)
+$(TARGETS): $(LIBTEST)
+       @echo "    [CC]    $@"
+       $(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LIBTEST)
 
-acl_get: acl_get.o $(LIBACL) $(LIBATTR)
-       $(LINKTEST) $(LIBACL) $(LIBATTR) $(LDLIBS)
+LINKTEST = $(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS)
 
+install: default $(addsuffix -install,$(SUBDIRS))
+       $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/src
+       $(LTINSTALL) -m 755 $(LDIRT) $(PKG_LIB_DIR)/src
+       $(LTINSTALL) -m 755 dmerror fill2attr fill2fs fill2fs_check scaleread.sh $(PKG_LIB_DIR)/src
+       $(LTINSTALL) -m 644 dumpfile $(PKG_LIB_DIR)/src
 
-ifeq ($(PKG_PLATFORM),irix)
-fill2: fill2.o 
-       $(LINKTEST)  -lgen
+%-install:
+       $(MAKE) -C $* install
 
-runas: runas.o 
-       $(LINKTEST)  -lgen
-endif
\ No newline at end of file
+-include .dep