mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 13:28:27 +00:00
fault: allow to check dont_use_freeze_cgroup
Adds a new "fault" to call dont_use_freeze_cgroup. Signed-off-by: Andrei Vagin <avagin@google.com>
This commit is contained in:
parent
651df375bd
commit
e1331a4b60
@ -1,6 +1,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "criu-log.h"
|
#include "criu-log.h"
|
||||||
#include "fault-injection.h"
|
#include "fault-injection.h"
|
||||||
|
#include "seize.h"
|
||||||
|
|
||||||
enum faults fi_strategy;
|
enum faults fi_strategy;
|
||||||
|
|
||||||
@ -21,5 +22,13 @@ int fault_injection_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fi_strategy = start;
|
fi_strategy = start;
|
||||||
|
|
||||||
|
switch (fi_strategy) {
|
||||||
|
case FI_DISABLE_FREEZE_CGROUP:
|
||||||
|
dont_use_freeze_cgroup();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
};
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ enum faults {
|
|||||||
FI_CORRUPT_EXTREGS = 134,
|
FI_CORRUPT_EXTREGS = 134,
|
||||||
FI_DONT_USE_PAGEMAP_SCAN = 135,
|
FI_DONT_USE_PAGEMAP_SCAN = 135,
|
||||||
FI_DUMP_CRASH = 136,
|
FI_DUMP_CRASH = 136,
|
||||||
|
FI_DISABLE_FREEZE_CGROUP = 137,
|
||||||
FI_MAX,
|
FI_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#define __CR_SEIZE_H__
|
#define __CR_SEIZE_H__
|
||||||
|
|
||||||
extern int collect_pstree(void);
|
extern int collect_pstree(void);
|
||||||
|
struct pstree_item;
|
||||||
extern void pstree_switch_state(struct pstree_item *root_item, int st);
|
extern void pstree_switch_state(struct pstree_item *root_item, int st);
|
||||||
extern const char *get_real_freezer_state(void);
|
extern const char *get_real_freezer_state(void);
|
||||||
extern bool alarm_timeouted(void);
|
extern bool alarm_timeouted(void);
|
||||||
|
@ -40,6 +40,10 @@ fi
|
|||||||
# also check for the main thread corruption
|
# also check for the main thread corruption
|
||||||
./test/zdtm.py run -t zdtm/static/fpu00 --fault 134 -f h --norst || fail
|
./test/zdtm.py run -t zdtm/static/fpu00 --fault 134 -f h --norst || fail
|
||||||
|
|
||||||
|
# check dont_use_freeze_cgroup
|
||||||
|
./test/zdtm.py run -t zdtm/static/env00 --freezecg zdtm:t --fault 137
|
||||||
|
./test/zdtm.py run -t zdtm/static/env00 --freezecg zdtm:t --fault 137 --norst
|
||||||
|
|
||||||
if ./test/zdtm.py run -t zdtm/static/vfork00 --fault 136 --report report -f h ; then
|
if ./test/zdtm.py run -t zdtm/static/vfork00 --fault 136 --report report -f h ; then
|
||||||
fail
|
fail
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user